https://github.com/sukiboo/persona_simulation
Simulate people with GPT models and generate response statistics
https://github.com/sukiboo/persona_simulation
behavioral-science gpt simulation
Last synced: over 1 year ago
JSON representation
Simulate people with GPT models and generate response statistics
- Host: GitHub
- URL: https://github.com/sukiboo/persona_simulation
- Owner: sukiboo
- License: gpl-3.0
- Created: 2023-07-22T20:17:30.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-26T14:56:56.000Z (almost 3 years ago)
- Last Synced: 2025-01-21T12:35:52.515Z (over 1 year ago)
- Topics: behavioral-science, gpt, simulation
- Language: Python
- Homepage:
- Size: 53.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Persona Simulation
Simulate people with GPT models and generate response statistics.
Not sure how to do any of these things yet but we're working on it.
## Collecting Responses
A simulated survey is generated from a prompt file in `./prompts/` directory.
Prompt file should consist by a series of prompts separated by `---`.
For example, a prompt file:
```
prompt1
---
prompt2
---
prompt3
```
will result in the following conversation:
```
user: prompt1
assistant: response1
user: prompt2
assistant: response2
user: prompt3
assistant: response3
```
Use a prompt file `prompt_name.txt` to simulate a survey with `num` participants via the command
```
python -m collect_responses -p prompt_name -n num
```
The default values for the arguments are `prompt_name=baseline` and `num=10`.
A survey will be saved in `./data/prompt_name/` as a series of `.json` files numbered after each simulated participant.