Use this file to discover all available pages before exploring further.
Note:This page provides information about EDSL code methods for launching surveys, gathering human responses, and analyzing results from your workspace. For more information about building surveys interactively, see the Survey Builder page. For more information about launching studies with Prolific participants, see the Prolific studies page.
Run your survey with agents and language models, generating a formatted dataset of Results.
3
Generate a web version of your survey with the humanize method, which provides a link for human respondents and a project page at your account where you can access responses interactively.
4
Share the web survey with human respondents. (See the Prolific studies page for information about launching studies with Prolific participants.)
5
Collect the responses using Expected Parrot methods to gather the responses in a Results object.
# Import modules from EDSLfrom edsl import ( QuestionYesNo, QuestionNumerical, QuestionLinearScale, Survey, Agent, Model, Coop)# Create a survey with different question typesq1 = QuestionYesNo( question_name="drive", question_text="Do you drive?")q2 = QuestionNumerical( question_name="count", question_text="How many vehicles do you currently own or lease?",)q3 = QuestionLinearScale( question_name="enjoy", question_text="On a scale from 1 to 10, how much do you enjoy driving?", question_options=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], option_labels={1: "Hate it", 10: "Love it"},)# Create a survey with the questionssurvey = Survey(questions=[q1, q2, q3])# Create an AI agent to respond to the surveyagent = Agent( traits={ "persona": "You are a middle-aged mom working on a software startup.", "location": "Massachusetts", })# Select a language model to generate the responsesmodel = Model("gemini-1.5-pro", service_name="google")# Run the survey with the AI agent and modelresults = survey.by(agent).by(model).run()# Generate a web-based version of the survey for human respondentsweb_survey_info = survey.humanize()# Create an Expected Parrot client instancecoop = Coop()# Get human responses from Expected Parrothuman_results = coop.get_project_human_responses(web_survey_info["uuid"])# Combine results (you can add Results objects for the same survey)combined_results = results + human_results
We are continually adding features for launching hybrid LLM and human surveys, so check back for updates!If you are interested in testing new features please reach out at anytime for credits and access.