Skip to main content
EDSL is an open-source library for simulating surveys and experiements with language models. Please see our documentation page for tips and tutorials on getting started. ThanksLori Berenberg for inspiring this demo!

Constructing a question

EDSL comes with a variety of 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 QuestionFreeText to create a question prompt to return a textual response. We compose the question with a writing sample, and then use Scenario objects to run the question for any different topics that we want the agent to write about. This allows us to run all the versions of the question at once:

Generating content

We simulate responses by adding the scenarios to the question and running it. This generates a Results object that we can readily analyze (learn more about built-in methods for analyzing results):
Here we select the topics and responses and print them in a table:
Check out our documentation page for many other demo notebooks and tutorials!