Create and analyze LLM-based surveys
Project description
Expected Parrot Domain-Specific Language
The Expected Parrot Domain-Specific Language (EDSL) package lets you conduct computational social science and market research with AI. Use it to design surveys and experiments, simulate responses with large language models, and perform data labeling and other research tasks. Results are formatted as specified datasets and come with built-in methods for analyzing, visualizing, and sharing.
๐ Links
๐ Hello, World!
A quick example:
# Import a question type
from edsl.questions import QuestionMultipleChoice
# Construct a question using the question type template
q = QuestionMultipleChoice(
question_name="example_question",
question_text="How do you feel today?",
question_options=["Bad", "OK", "Good"]
)
# Run it with the default language model
results = q.run()
# Inspect the results in a dataset
results.select("example_question").print()
Output:
โโโโโโโโโโโโโโโโโโโโโ
โ answer โ
โ .example_question โ
โกโโโโโโโโโโโโโโโโโโโโฉ
โ Good โ
โโโโโโโโโโโโโโโโโโโโโ
๐ป Requirements
- EDSL is compatible with Python 3.9 - 3.12.
- API keys for large language models that you want to use, stored in a
.env
file. See instructions on storing API keys.
๐ก Contributions, feature requests & bugs
Interested in contributing? Want us to add a new feature? Found a bug for us to squash? Please send us an email at info@expectedparrot.com or message us at our Discord channel.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for edsl-0.1.31.dev4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5714119a987ec97f4e1984e5d721e9de50f8bcbaa936ccbe05eed4db10a2bf3e |
|
MD5 | d9bad6c135f41e193d619e2cfb6099b6 |
|
BLAKE2b-256 | 442d173cc09c07980cb349873a16f117709d2010044cd0a45516792a65819196 |