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:
from edsl import QuestionMultipleChoice
q = QuestionMultipleChoice(
question_name="example_question",
question_text="How do you feel today?",
question_options=["Bad", "OK", "Good"]
)
results = q.run()
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.