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.29.dev5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3a21468b0cda725c1abbe7b520d36c9ac37cfba9b76b76bfe8ab50e503dbf7a |
|
MD5 | 70bf42a4b1ab4c4aa76b2b0702c74b82 |
|
BLAKE2b-256 | e3a66a88b1a41ba3eefcfa6d2f644e7f1ac1a9a43d88b7f07f02ac86b0dd7255 |