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
๐ก 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.
๐ป 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.
๐ 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 โ
โโโโโโโโโโโโโโโโโโโโโ
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.29.dev1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57888afaed3b4a8e1070e5994f91243022dfd61eebbe4661dbdae875e2b331c0 |
|
MD5 | ab01f2da5cec6cec1aadfe317a0e1339 |
|
BLAKE2b-256 | 3cd8cb84478c70fcef35355e214a22e794c40e80e608fee017e71d89b47fe3cd |