Skip to main content
Before running the code below please see instructions for getting started using EDSL, and tips and tutorials at our documentation page.

Create a question

We start by creating a question to prompt a language model to suggest some names for a yoga studio. EDSL comes with many common question types that we can choose from based on the form of the response that we want to get back from the model - multiple choice, free text, linear scale, etc. Here we use QuestionList to prompt a model to return a list of items:

Select some models to answer the question

EDSL works with many popular language models that we can select to generate responses to questions. A list of current available models and pricing and performance information is available here. To see a list of all service providers:
To select models to use with a question or survey:

Run the question

We administer a question to a language model by calling the run() method on it. This generates a formatted dataset of Results:

Inspect the results

EDSL comes with built-in methods for analyzing results. Here we inspect the responses for each model:

Use the responses in new questions

We can format the responses to use them as options to new questions:
We can optionally randomize the list of options:

Constructing a survey

Here we create some new questions in different types and combine them into a survey to administer them together:
Survey # questions: 2; question_name list: [‘favorite’, ‘pick’];

Designing agents to answer the survey

Next we can design AI agents with relevant traits to answer the questions. Here we use a model to draft some personas, and then create “agent” objects for them to use with the survey:

Run the survey with the agents

Here we add the agents to the survey and run it with the language models we selected above (to compare responses):
We could also solicit feedback on individual names. This can be done by creating a “scenario” of each question for each name:

Posting to Expected Parrot

Expected Parrot is a platform for creating, storing and sharing LLM-based research. It is fully integrated with EDSL and accessible from your workspace or Expected Parrot account page. Learn more about creating an account and the platform. Here we demonstrate how to post this notebook to share with others (visibility can be public, private or unlisted by default):
To update an object at Expected Parrot: