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 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
File details
Details for the file edsl-0.1.37.dev6.tar.gz
.
File metadata
- Download URL: edsl-0.1.37.dev6.tar.gz
- Upload date:
- Size: 321.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ff4c7b58bcd35937b9bab4a915d5422566d48d36e04f3381003eac43f759eb4 |
|
MD5 | cb88f3fc9ac861797446537661870db0 |
|
BLAKE2b-256 | 2c1dce4f3cd884e4a20c69eb3293e36b6eaf6975d9704b812d2c4ac612062db2 |
File details
Details for the file edsl-0.1.37.dev6-py3-none-any.whl
.
File metadata
- Download URL: edsl-0.1.37.dev6-py3-none-any.whl
- Upload date:
- Size: 429.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.1 Windows/11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d0ed12781b9af22f3117455df1b52830afb4982566b145a7ade81ea86496cd8 |
|
MD5 | 46341a115ea80e50e5229638096d1f7c |
|
BLAKE2b-256 | b07e891a54c7e10e354e03590afa87749080c70e78b973bfce28528c1c5fc64e |