Skip to main content

Create and analyze LLM-based surveys

Project description

Expected Parrot Domain-Specific Language

edsl.png

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

edsl-0.1.38.dev1.tar.gz (323.2 kB view details)

Uploaded Source

Built Distribution

edsl-0.1.38.dev1-py3-none-any.whl (426.2 kB view details)

Uploaded Python 3

File details

Details for the file edsl-0.1.38.dev1.tar.gz.

File metadata

  • Download URL: edsl-0.1.38.dev1.tar.gz
  • Upload date:
  • Size: 323.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.7 Darwin/23.6.0

File hashes

Hashes for edsl-0.1.38.dev1.tar.gz
Algorithm Hash digest
SHA256 37ffe9cfea862665182e3a74ffbd55197a813bce050918a445aa7eb45c58d499
MD5 3bfb6903e350317663333b473d6861c9
BLAKE2b-256 64ccee552c1f9af9a38236800170d8ad81c90bc951445aa80abf806a84c802a8

See more details on using hashes here.

File details

Details for the file edsl-0.1.38.dev1-py3-none-any.whl.

File metadata

  • Download URL: edsl-0.1.38.dev1-py3-none-any.whl
  • Upload date:
  • Size: 426.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.7 Darwin/23.6.0

File hashes

Hashes for edsl-0.1.38.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 c94777c38feffe8f09654b96a682dedcaeaa4c2d9555d0c43f88a34acec2d47d
MD5 99b6221af73fbd9772f8b38db7a71613
BLAKE2b-256 cd1dc86e2b290d5748a213d020343a87ca2595bf3373449fc7bc2e71898fdb56

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page