Overview
Using a dataset of mock customer service tickets as an example, we demonstrate how to:1
Import data into EDSL as scenarios
2
Create questions about the data
3
Design an AI agent to answer the questions
4
Select a language model to generate responses
5
Analyze results as a formatted dataset

Selecting data for review
First we identify some data for review. Data can be created in EDSL or imported from other sources (CSV, PDF, PNG, MP4, DOC, tables, lists, dicts, etc.). For purposes of demonstration we import a set of hypothetical customer tickets for a transportation app:Constructing questions about the data
Next we create some questions about the data. EDSL provides 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, checkbox, linear scale, etc.). Learn more about question types.Note:Note that we use a
{{ placeholder }} in each question text in order to parameterize the questions with the individual ticket contents in the next step:Building a survey
We combine the questions into a survey in order to administer them together: from edsl import Survey survey = Survey( questions=[ q_issues, q_primary_issue, q_accident, q_sentiment, q_refund, q_priority, ] ) Survey questions are administered asynchronously by default. Learn more about adding conditional logic and memory to your survey. Here we inspect them:Designing AI agents
A key feature of EDSL is the ability to create personas for AI agents that the language models are prompted to use in generating responses to the questions. This is done by passing a dictionary of traits to Agent objects:Selecting language models
EDSL allows us to select the language models to use in generating results. See themodel pricing page <>__ for pricing and performance information for available models.
Here we select gpt-4o (if no model is specified, the default model is used – run Model() to verify the current default model):
Adding data to the questions
We add the contents of each ticket into each question as an independent “scenario” for review. This allows us to create versions of the questions for each job post and deliver them to the model all at once:Running the survey
We run the survey by adding the scenarios, agent and model with theby() method and then calling the run() method:
Results that includes information about all the components, including the prompts and responses. We can see a list of all the components:
