Getting Started

To use EDSL, you need to install the package and choose how to access language models. Please see links to sections below for more details on each step.

1. Installation

Run the following command to install the EDSL package:

pip install edsl

If you have previously installed EDSL, you can check which version you have by running:

pip show edsl

(Compare it to the version shown at PyPI.) If it is out of date you can update it with the following command:

pip install --upgrade edsl

You can also access the source code at GitHub. If you are using EDSL with Google Colab, please see the Colab Setup section for special instructions.

See Installation instructions for more details and troubleshooting tips.

2. Create an account

Sign up for a free account with your email address. This allows you to run surveys at the Expected Parrot server and collaborate with other users at Coop. Your account comes with $25 in credits for API calls to any available models.

3. Choose where to run surveys

You can use EDSL to run surveys locally on your own machine or remotely at the Expected Parrot server. To activate remote inference, navigate to the Settings page of your account and toggle on remote inference:

Toggle on remote inference

This allows you to use remote caching features and automatically store all your survey results. See the Remote Inference and Remote Caching sections for details.

To run surveys locally you must provide your own keys from service providers. See the next step below for details.

4. Manage API keys for language models

API keys are required to run surveys with language models. EDSL works with many language models from popular service providers, including Anthropic, Azure, Bedrock, DeepInfra, DeepSeek, Google, Mistral, OpenAI, Perplexity, Together and Xai. Current model pricing and performance information is available here.

When you run a survey you can choose whether to use your own keys from service providers and/or an Expected Parrot API key to access all available models at once. There are several ways to manage your keys:

  • Manage keys at your Coop account (recommended)

  • Store keys in a .env file on your computer

  • Store keys directly in your EDSL code (not recommended for security reasons)

If you have your own keys from service providers you can add them to your Keys page. You can also choose whether to grant access to other users and set usage limits:

Keys page view showing stored keys

If you are running surveys locally, or only want to post and retrieve content at Coop without running your surveys remotely, you can store your keys in a .env file on your computer. This file should be in the same directory as your EDSL code and contain the following lines:

EXPECTED_PARROT_API_KEY=your_expected_parrot_key # required for remote inference and caching and posting content at Coop

ANTHROPIC_API_KEY=your_anthropic_key
GOOGLE_API_KEY=your_google_key
OPENAI_API_KEY=your_openai_key

# etc.

See the Managing Keys section for details on this method of managing keys.

Note that if you use your own keys, you will be charged directly by the service provider for API calls. If you use your Expected Parrot API key, credits are deducted from your account based on the model and number of tokens used in the survey.

5. Run a survey

Read the Starter Tutorial and download a notebook to create a survey and run it. See examples for many other use cases and tips on using EDSL effectively in the documentation.

Support

If you have any questions or need help, please send a message to info@expectedparrot.com. You can also open at issue at GitHub to report bugs or request new features.

Please also join our Discord channel to ask questions and chat with other users!