tool · draft
EDSL (Expected Parrot)
Open-source Python package from Expected Parrot for running surveys and experiments on language models and simulated respondents with set traits, with tools to send the same survey to real people for comparison.
What is reusable: open sourceunknown dataAPIopen participation MITResults run on the Expected Parrot server are cached and can be retrieved by anyone with the code at no cost.
EDSL, the Expected Parrot Domain-Specific Language, is a Python package for asking questions of language models at scale, with or without a persona attached.2 It is made by the company Expected Parrot, which also runs a hosted service for it.1,2 Its documentation says it is for researchers who want to simulate hundreds of demographically varied respondents, test different wordings of a question, compare answers across models, and label large text datasets.1
You write a survey in Python from typed questions: multiple choice, linear scales, free text, lists and others, with skip logic and the ability to pipe one answer into the next question.2 You define agents by their traits, such as a persona, age or occupation, and send the survey to many agents and many models at once.2 Results come back as a table with built-in tools for analysis.2 Questions can be filled in from data files, so the same machinery serves for labelling and cleaning data.2 The documentation includes a notebook on AI polling and one that rebuilds the CES 2022 pre-election questionnaire, a US election survey, inside EDSL.4
It installs with pip and runs either on your own computer with your own keys to model providers, in which case it costs nothing beyond those providers' charges (local models through Ollama also work), or on Expected Parrot's server with its key and prepaid credits.2,3,4 A free account includes some credits, and the company offers more to research projects on request.3 Results run on the server are cached. Others can retrieve the same outputs without keys or cost and so reproduce a study.1,2 A feature called Humanize turns the same survey into a web form for real respondents, including through the Prolific panel.1,4
The README states the limit: agent answers come from what a model learned in training and reflect statistical patterns, not the actual opinions of any demographic group.2 It recommends simulated answers for prototyping and pre-testing a survey, and real human data for measuring actual attitudes or behaviour.2 The package is MIT-licensed and was updated in October 2026.2
- form
- open-source Python package with a hosted service
- group
- People and populations
- homepage
- https://docs.expectedparrot.com/en/latest/
- licence
- MIT
- cost
- free with your own model keys; or buy credits for the hosted service (1 USD buys 100 credits; free credits on signup, more on request for research)
does a similar job
-
Experimental Python library from Microsoft that simulates people with set personalities, beliefs and jobs using a language model, for simulated focus groups, interviews and market surveys.
open sourceopen participation
-
Research code from Stanford for language-model characters that remember, reflect and plan, shown in Smallville, a small game town of 25 agents; a 2024 follow-up repository builds agents from interviews and survey answers and lets researchers put questions to them.
open sourcepartly open dataopen participation
alternative to
-
Experimental Python library from Microsoft that simulates people with set personalities, beliefs and jobs using a language model, for simulated focus groups, interviews and market surveys.
open sourceopen participation
Tags: synthetic respondents, survey, LLM agents, market research, data labelling, Expected Parrot