EP Logo

Getting started

This page is designed to help you get started using our tools for conducting AI-powered research.

EDSL

EDSL (Expected Parrot Domain-Specific Language) is an open-source Python library for conducting AI-powered research. EDSL simplifies the creation and execution of surveys, experiments, data labeling tasks and other research activities involving large numbers of AI agents and language models. Its primary goal is to facilitate complex AI-based research tasks with ease and efficiency.

Please see instructions on installing EDSL and storing your API keys for LLMs. Then explore a Starter Tutorial and other resources in the EDSL Docs.

Tip

Please see the EDSL Docs for an overview, templates, tutorials and in-depth documentation for the EDSL library.

Coop

The Coop (as in birdcoop and also cooperative) is a web application for storing and sharing your work and exploring other AI-powered research. Use the Coop to store and retrieve EDSL content, use remote caching to save your LLM call results, and use remote inference to run your workflows on Coop (consumes seed).

Learn more about the Coop and how to use it by creating an account and exploring examples in the Coop documentation page.

Coop is still in development. Let us know if you're interested in trying it out!

Community

Need help? Have a feature request? Want to talk to others with a passion for AI-powered research? Join the Expected Parrot community!

Installing EDSL

This page provides instructions for installing the EDSL library on your system.

Requirements: Python 3.9 and above


Tip

View this page in the EDSL Docs where you can also find troubleshooting tips, starter tutorials and in-depth documentation.

Quickstart Installation

Open your terminal and verify that you have not previously installed EDSL on your system:

pip show edsl

To install the latest version of EDSL through pip:

pip install edsl

To update to the latest version of EDSL:

pip install --upgrade edsl

Advanced Installation

The Quickstart Installation steps will install EDSL globally on your system. Sometimes, you may face problems with conflicts between EDSL and other libraries. To avoid such problems, we recommend that you use a virtual environment.

Open your terminal and run the following command:

python3 -m venv myenv

This will create a folder called myenv. Next, activate your virtual environment:

MacOS and Linux:

source myenv/bin/activate

Windows:

myenv\Scripts\activate

You can now install EDSL through pip within your virtual environment:

pip install edsl

You will have access to EDSL while your virtual environment is activated.

You can deactivate the virtual environment at any time by running:

deactivate

To delete the virtual environment, simply delete the myenv folder.

Next: Storing your API keys for LLMs

API Keys for LLMs

API keys are required in order to use EDSL with large language models (LLMs) such as OpenAI's GPTs, Google's Gemini, Anthropic's Claude, Llama 2 and other models.

If you are looking for information about your API key for accessing the Coop, please see instructions here.


There are two methods for storing your API keys to use them with EDSL:

1. Store your API keys in a .env file (recommended)

This method allows you to store your keys once instead of providing them each time you start a new session with EDSL.

Create a file named .env in your current working directory and populate it with your API keys as shown below.

Replace 'your_key_here' with your actual API key for each service that you plan to use:

ANTHROPIC_API_KEY = 'your_key_here'
DEEP_INFRA_API_KEY = 'your_key_here'
GOOGLE_API_KEY = 'your_key_here'
OPENAI_API_KEY = 'your_key_here'

2. Setting API keys in your Python code

Alternatively, you can set your API keys in your Python script by running the following code before using EDSL. This will store the keys in your system's memory only for the duration of a session:

import os

os.environ['ANTHROPIC_API_KEY'] = 'your_key_here'
os.environ['DEEP_INFRA_API_KEY'] = 'your_key_here'
os.environ['GOOGLE_API_KEY'] = 'your_key_here'
os.environ['OPENAI_API_KEY'] = 'your_key_here'

Caution

Your API keys are sensitive information, like passwords. Do not share them publicly.

Troubleshooting tips

See the EDSL Docs for troubleshooting tips, installation instructions, tutorials, templates and in-depth documentation for the components of the EDSL library.

Coop: How it works

The Coop is a web application for storing and sharing your work and exploring other AI-powered research.

Steps for using the Coop:


1. Create an account

Go to the Coop login page and select Sign up. You can sign up using your email address and a password, or with your Google/Microsoft account.


2. Create a username

Go to your Profile page and choose a username. Your username will be associated with content that you post on the Coop. (You can change this at any time, and you can also post content anonymously.)


3. Store your Expected Parrot API key

Go to the API page of your Account and copy your API key. You will need to provide this key to EDSL to post, download and update objects on the Coop.

Then add the following line to your .env file in your current working directory (this is the same file where you store API keys for language models that you use with EDSL):

EXPECTED_PARROT_API_KEY = 'your_api_key_here'

This will load your API key as an environment variable that EDSL can access. You can regenerate your API key (and update your .env file) at any time.


4. Create EDSL objects

Create objects using the EDSL library: Agent, AgentList, Cache, Jobs, Results, Scenario, ScenarioList, and Survey.

* Coming soon: Features for uploading notebooks and other work products! *


5. Post objects to the Coop

Post objects to the Coop using the edsl.coop.Coop module or object methods. See the Coop documentation page for details and examples of methods for uploading, downloading and updating objects.


6. Choose the visibility of your objects

You can set the visibility of an object when you post it to the Coop or update it later.
There are 3 options:

  • public: share with everyone

  • private: share with no one

  • unlisted: share with people who have the link

By default, objects are posted as unlisted.
See Coop documentation page for details and examples for setting the visibility of an object.


7. Explore other users' content

Search for other users' public content by object type, keyword, author, topic, etc.
Copy code and examples to your own workspace to modify or rerun them.

To access objects that are unlisted you must have the object span uuid or the link to the object.

Coop: Hosted simulations

Coming soon!

XDSL: How it works

XDSL lets you automatically generate surveys and simulate responses for key audiences - no coding required.

How it works:

  • Open the XDSL app (see instructions) and enter a research topic. In a few words, describe an ideal audience for your survey.
  • This information is used to generate a survey of questions about your topic, and personas for AI agents that will simulate responses to it.

  • Review the suggested survey questions and edit however you want.
  • Finalize questions by selecting question types and answer options (for multiple choice and other types). Access built-in features for cognitive testing to suggest improvements and appropriate answer options.

  • Generate personas for AI agents that will simulate responses to the survey.
  • See an example persona with lists of relevant dimensions. Edit the dimensions however you want, and then select the number of agents that you want to generate.

  • Run the survey and inspect the results.
  • Easily post your content to the Coop or export it to files or other platforms.

1. Describe your research

Enter a research topic and short description of your ideal respondents:

2. Review auto-generated questions

Review auto-generated survey questions and select answer options, with tools for cognitive testing:

3. Select AI agents

Select relevant personas for AI agents that will respond to your survey:

4. Inspect and export results

Evaluate responses and share your survey:

5. Share your work

Publish surveys, agents and results in the Coop!