Analyzing course evaluations

This notebook provides sample EDSL code for using a language model to analyze course evaluations. The analysis is designed as a survey of questions about a set of evaluations that we prompt an AI agent to answer, using a language model to generate the responses as a dataset.

EDSL is an open-source library for simulating surveys, experiments and other research with AI agents and large language models. Before running the code below, please ensure that you have installed the EDSL library and either activated remote inference from your Coop account or stored API keys for the language models that you want to use with EDSL. Please also see our documentation page for tips and tutorials on getting started.

Create questions

We start by creating questions about a set of course evaluations for an agent to answer. 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 a model (multiple choice, linear scale, checkbox, free text, numerical, dictionary, etc.). We can use a {{ placeholder }} in the question texts to parameterize them with each evaluation. This allows us to create different “scenarios” of the questions that we can administer at once.

We start by importing some question types and composing questions in the relevant templates (see examples of all types in the docs):

[1]:
from edsl import QuestionList, QuestionMultipleChoice
[2]:
q_sentiment = QuestionMultipleChoice(
    question_name="sentiment",
    question_text="What is the overall sentiment of this evaluation: {{ evaluation }}",
    question_options=["Positive", "Neutral", "Negative"],
)

q_themes = QuestionList(
    question_name="themes",
    question_text="Summarize the key points of this evaluation: {{ evaluation }}",
    max_list_items=3,  # Optional
)

q_improvements = QuestionList(
    question_name="improvements",
    question_text="Identify areas for improvement based on this evaluation: {{ evaluation }}",
    max_list_items=3,
)

Construct a survey

Next we combine our questions into a survey. This allows us to administer the questions asynchronously (by default), or according to any desired survey logic or rules that we want to add, such as skip/stop rules or giving an agent “memories” of other questions in the survey. Here we create a simple asynchronous survey by passing the list of questions to a Survey object:

[3]:
from edsl import Survey

survey = Survey(questions=[q_sentiment, q_themes, q_improvements])

Select data for review

Next we identify the data to be analyzed. Here we use some mock evaluations for an Econ 101 course stored as a list of texts:

[4]:
evaluations = [
    "I found the course very engaging and informative. The professor did an excellent job breaking down complex concepts, making them accessible to those of us new to economics. However, the pace was a bit fast, and I sometimes struggled to keep up with the weekly readings.",
    "This class was a struggle for me. The material felt dry and difficult to connect with real-world applications, which I think could have made it more interesting. More examples from current events would definitely have helped spark my interest.",
    "Excellent introductory course! The professor was enthusiastic and always willing to offer extra help during office hours. The interactive lectures and the practical assignments made the theory much more digestible and engaging.",
    "As someone with a strong background in math, I appreciated the analytical rigor of this course. However, I wish there had been more discussions that connected the theories we learned to everyday economic issues. It felt a bit isolated from practical realities at times.",
    "I enjoyed the course, especially the group projects, which were both challenging and rewarding. It was great to apply economic concepts to solve real-life problems. I did feel, however, that the feedback on assignments could be more detailed to help us understand our mistakes.",
    "The course content was well-organized, but the lectures were somewhat monotonous and hard to follow. I would suggest incorporating more visual aids and maybe some guest lectures from industry professionals to liven up the sessions.",
    "This was my favorite class this semester! The mix of theory and case studies was perfect, and the exams were fair. I also really appreciated the diversity of perspectives we explored in class, especially in terms of global economic policies.",
    "I found the textbook to be overly complex for an introductory course. It often used jargon that hadn't been explained in lectures, which was confusing. Simpler reading materials or more explanatory lectures would make a big difference for newcomers to economics.",
    "The professor was knowledgeable and clearly passionate about economics, but I felt the course relied too heavily on tests rather than more creative forms of assessment. More varied assignments would make the course more accessible to students with different learning styles.",
    "This class was a solid introduction to economics, though it leaned heavily on theoretical aspects. I would have liked more opportunities to discuss the real-world implications of economic theories, which I believe would enhance understanding and retention of the material.",
]

Add data to the questions

Next we create a ScenarioList with a Scenario containing a key/value for each evaluation that we will add to the questions when we run the survey. EDSL provides methods for generating scenarios from many data sources (PDFs, CSVs, images, tables, dicts, etc.); here we import a list and match the key to our question texts placeholder:

[5]:
from edsl import ScenarioList

scenarios = ScenarioList.from_list("evaluation", evaluations)

Design AI agents

Next we design agents with relevant traits and personas for a language model to use in answering the questions. This can be useful if we want to compare responses among different audiences. We do this by passing dictionaries of traits to Agent objects. We can also choose whether to give an agent additional instructions for answering the survey (independent of individual question texts). Please see documentation for more details and example code for creating agents to use with surveys.

Here we create a persona for the professor of the course and pass it some special instructions:

[6]:
from edsl import Agent

persona = "You are a professor reviewing student evaluations for your recent Econ 101 course."
instruction = "Be very specific and constructive in providing feedback and suggestions."

agent = Agent(traits={"persona": persona}, instruction=instruction)

Select language models

EDSL works with many popular language models that we can use to generate responses for our survey. We can see a current list of all available models:

[7]:
from edsl import Model
[8]:
# Model.available()

We select models to use with a survey by creating Model objects for them. The default model is GPT 4 Preview, meaning that EDSL will use it to run our survey if we do not specify a different model. Here’s we’ll specify that GPT 4o should be used:

[9]:
model = Model("gemini-1.5-flash")
model
[9]:

gemini-1.5-flash

  key value
0 model gemini-1.5-flash
1 parameters:temperature 0.500000
2 parameters:topP 1
3 parameters:topK 1
4 parameters:maxOutputTokens 2048
5 parameters:stopSequences []
6 inference_service google

Run the survey

Next we add the scenarios and agent to the survey, and then run it with the specified model. This will generate a dataset of Results that we can store and begin analyzing:

[10]:
results = survey.by(scenarios).by(agent).by(model).run()
Job Status (2025-02-07 20:27:29)
Job UUID f221d49e-53ec-4a5f-b824-698d3329c88e
Progress Bar URL https://www.expectedparrot.com/home/remote-job-progress/f221d49e-53ec-4a5f-b824-698d3329c88e
Exceptions Report URL None
Results UUID 94c9d429-7f8d-4629-99ae-4e7d064aff77
Results URL https://www.expectedparrot.com/content/94c9d429-7f8d-4629-99ae-4e7d064aff77
Current Status: Job completed and Results stored on Coop: https://www.expectedparrot.com/content/94c9d429-7f8d-4629-99ae-4e7d064aff77

Analyzing results

EDSL comes with built-in methods for analyzing results in data tables, dataframes, SQL queries and other formats. We can print a list of all the components that can be accessed:

[11]:
results.columns
[11]:
  0
0 agent.agent_index
1 agent.agent_instruction
2 agent.agent_name
3 agent.persona
4 answer.improvements
5 answer.sentiment
6 answer.themes
7 cache_keys.improvements_cache_key
8 cache_keys.sentiment_cache_key
9 cache_keys.themes_cache_key
10 cache_used.improvements_cache_used
11 cache_used.sentiment_cache_used
12 cache_used.themes_cache_used
13 comment.improvements_comment
14 comment.sentiment_comment
15 comment.themes_comment
16 generated_tokens.improvements_generated_tokens
17 generated_tokens.sentiment_generated_tokens
18 generated_tokens.themes_generated_tokens
19 iteration.iteration
20 model.inference_service
21 model.maxOutputTokens
22 model.model
23 model.model_index
24 model.stopSequences
25 model.temperature
26 model.topK
27 model.topP
28 prompt.improvements_system_prompt
29 prompt.improvements_user_prompt
30 prompt.sentiment_system_prompt
31 prompt.sentiment_user_prompt
32 prompt.themes_system_prompt
33 prompt.themes_user_prompt
34 question_options.improvements_question_options
35 question_options.sentiment_question_options
36 question_options.themes_question_options
37 question_text.improvements_question_text
38 question_text.sentiment_question_text
39 question_text.themes_question_text
40 question_type.improvements_question_type
41 question_type.sentiment_question_type
42 question_type.themes_question_type
43 raw_model_response.improvements_cost
44 raw_model_response.improvements_one_usd_buys
45 raw_model_response.improvements_raw_model_response
46 raw_model_response.sentiment_cost
47 raw_model_response.sentiment_one_usd_buys
48 raw_model_response.sentiment_raw_model_response
49 raw_model_response.themes_cost
50 raw_model_response.themes_one_usd_buys
51 raw_model_response.themes_raw_model_response
52 scenario.evaluation
53 scenario.scenario_index

Here we select just the responses to the questions and display them in a table:

[12]:
results.select("sentiment", "themes", "themes_generated_tokens", "improvements")
[12]:
  answer.sentiment answer.themes generated_tokens.themes_generated_tokens answer.improvements
0 Positive ['Engaging and informative course content', 'Effective explanation of complex concepts', 'Fast pace and challenging readings'] ["Engaging and informative course content", "Effective explanation of complex concepts", "Fast pace and challenging readings"] The student found the course to be highly engaging and well-taught, but noted the pace was too fast, impacting their ability to keep up with the readings. These three points capture the essence of the feedback. ['Adjust the pace of lectures and incorporate more opportunities for student engagement.', 'Provide more structured guidance on tackling the weekly readings, perhaps by suggesting specific questions to consider.', 'Consider offering supplemental resources, such as online tutorials or practice problems, to reinforce concepts.']
1 Negative ['Student found the material dry and difficult', 'Lack of real-world connection and examples cited', 'Desire for more current event examples to increase engagement'] ["Student found the material dry and difficult", "Lack of real-world connection and examples cited", "Desire for more current event examples to increase engagement"] The three points directly address the student's criticisms and are concise. They avoid subjective interpretations and focus on the student's stated concerns. ['Incorporate more real-world examples and case studies', 'Connect course material to current events', 'Develop more engaging teaching methods to improve student comprehension']
2 Positive ['Excellent instruction and enthusiasm', 'Effective interactive lectures and practical assignments', 'Readily available extra help during office hours'] ["Excellent instruction and enthusiasm", "Effective interactive lectures and practical assignments", "Readily available extra help during office hours"] The three points chosen directly reflect the student's positive feedback on teaching quality, course structure, and accessibility of the instructor. They are concise and capture the essence of the evaluation. ['Consider incorporating more diverse case studies', 'Explore alternative assessment methods to gauge deeper understanding beyond practical assignments', 'Enhance online resources and accessibility for students with varying learning styles']
3 Neutral ['Appreciated analytical rigor', 'Desired more real-world application discussions', 'Felt disconnect between theory and practice'] ["Appreciated analytical rigor", "Desired more real-world application discussions", "Felt disconnect between theory and practice"] The student's feedback highlights both a positive aspect (strong math foundation) and a key area for improvement (linking theory to practical examples). The three points concisely capture the essence of the evaluation. ['Incorporate real-world case studies into lectures', 'Dedicate class time for discussions linking theoretical concepts to current events', 'Assign application-based problem sets or projects']
4 Positive ['Enjoyed the course and group projects', 'Project application of concepts was valuable', 'Feedback on assignments needs improvement'] ["Enjoyed the course and group projects", "Project application of concepts was valuable", "Feedback on assignments needs improvement"] The student enjoyed the course material and found the group projects particularly engaging and beneficial for applying economic concepts. However, they clearly identified a need for more detailed feedback on assignments to improve learning. This summarizes the key points concisely and addresses both positive and negative aspects. ['Enhance feedback detail on assignments', 'Consider providing more specific rubric criteria', 'Explore alternative assessment methods to complement group projects']
5 Neutral ['Well-organized course content', 'Monotonous and hard-to-follow lectures', 'Suggestions for improvement: visual aids and guest lecturers'] ["Well-organized course content", "Monotonous and hard-to-follow lectures", "Suggestions for improvement: visual aids and guest lecturers"] The summary accurately reflects the student's main points: positive feedback on organization, negative feedback on lecture style, and concrete suggestions for improvement. The three points are concise and capture the essence of the evaluation. ['Incorporate more visual aids into lectures', 'Consider inviting guest lecturers from the industry', 'Review lecture delivery to improve clarity and engagement']
6 Positive ['Enjoyed the balance of theory and case studies', 'Exams perceived as fair', 'Appreciated diverse perspectives on global economic policies'] ["Enjoyed the balance of theory and case studies", "Exams perceived as fair", "Appreciated diverse perspectives on global economic policies"] The student's positive feedback highlights three key aspects: the course structure, assessment fairness, and the inclusion of diverse viewpoints. These are valuable points for course improvement and demonstrate student engagement. ['Increase quantitative problem sets', 'Explore alternative assessment methods alongside exams', 'Incorporate more interactive class discussions']
7 Negative ['Textbook complexity', 'Unexplained jargon', 'Need for simpler materials or more explanatory lectures'] ["Textbook complexity", "Unexplained jargon", "Need for simpler materials or more explanatory lectures"] The student clearly identifies three interconnected issues: the textbook's difficulty, the use of undefined jargon, and the resulting need for either simpler readings or more thorough lecture explanations. These are the core complaints and represent the most important points to address. ['Simplify textbook selection or supplement with clearer materials', 'Incorporate textbook jargon into lectures with explicit definitions', 'Designate additional time for clarifying complex concepts']
8 Neutral ['Professor possesses strong subject matter expertise and enthusiasm', 'Course over-reliance on testing limits accessibility for diverse learners', 'More varied assignments needed to cater to different learning styles'] ["Professor possesses strong subject matter expertise and enthusiasm", "Course over-reliance on testing limits accessibility for diverse learners", "More varied assignments needed to cater to different learning styles"] The summary focuses on the core strengths and weaknesses highlighted in the evaluation, prioritizing conciseness and clarity for efficient review. ['Incorporate more diverse assessment methods (e.g., group projects, presentations, essays)', 'Explore alternative ways to evaluate understanding beyond high-stakes exams', 'Design assignments catering to varied learning styles and preferences']
9 Neutral ["Positive assessment of the course's introductory nature", 'Critique of insufficient real-world application focus', 'Suggestion for increased emphasis on practical examples'] ["Positive assessment of the course's introductory nature", "Critique of insufficient real-world application focus", "Suggestion for increased emphasis on practical examples"] The three points accurately reflect the student's main concerns and suggestions, capturing both positive and negative feedback concisely. ['Incorporate more case studies illustrating real-world applications of economic theories', 'Design in-class activities and discussions focusing on current economic events and their theoretical underpinnings', 'Assign projects or papers requiring students to analyze real-world economic issues using the concepts learned in class']

We can do a quick tally of the sentiments:

[13]:
results.select("sentiment").tally()
[13]:
  answer.sentiment count
0 Positive 4
1 Neutral 4
2 Negative 2

We can also transform the results into a dataframe:

[14]:
df = results.to_pandas()
df.head()
[14]:
answer.improvements answer.themes answer.sentiment scenario.scenario_index scenario.evaluation agent.agent_index agent.agent_instruction agent.persona agent.agent_name model.topP ... comment.sentiment_comment generated_tokens.sentiment_generated_tokens generated_tokens.themes_generated_tokens generated_tokens.improvements_generated_tokens cache_used.themes_cache_used cache_used.improvements_cache_used cache_used.sentiment_cache_used cache_keys.sentiment_cache_key cache_keys.improvements_cache_key cache_keys.themes_cache_key
0 ['Adjust the pace of lectures and incorporate ... ['Engaging and informative course content', 'E... Positive 0 I found the course very engaging and informati... 0 Be very specific and constructive in providing... You are a professor reviewing student evaluati... Agent_0 1 ... The student clearly expresses overall positive... Positive\n\nThe student clearly expresses over... ["Engaging and informative course content", "E... ["Adjust the pace of lectures and incorporate ... True True True e87ac1ab46560676c8556b25de720b5b 045a6cd433b9f8a594e69c16650dc906 4cc05ab07126f12c0286e8d4017ee4e9
1 ['Incorporate more real-world examples and cas... ['Student found the material dry and difficult... Negative 1 This class was a struggle for me. The material... 0 Be very specific and constructive in providing... You are a professor reviewing student evaluati... Agent_1 1 ... The student explicitly states the class was a ... Negative\n\nThe student explicitly states the ... ["Student found the material dry and difficult... ["Incorporate more real-world examples and cas... True True True fae9b208b15d5716d7cf557f161b1da1 c9a6ea81091088296924b083c0f5277e 7e35a3d2becc5f4fe912e97490c496ce
2 ['Consider incorporating more diverse case stu... ['Excellent instruction and enthusiasm', 'Effe... Positive 2 Excellent introductory course! The professor w... 0 Be very specific and constructive in providing... You are a professor reviewing student evaluati... Agent_2 1 ... The student uses overwhelmingly positive langu... Positive\n\nThe student uses overwhelmingly po... ["Excellent instruction and enthusiasm", "Effe... ["Consider incorporating more diverse case stu... True True True 1ac91057e39cf9900951ee30cc7928fe 22262c2d5bb750a06b3707026b3bdee3 13432bad75496e0aebe8a06ba32a4550
3 ['Incorporate real-world case studies into lec... ['Appreciated analytical rigor', 'Desired more... Neutral 3 As someone with a strong background in math, I... 0 Be very specific and constructive in providing... You are a professor reviewing student evaluati... Agent_3 1 ... The evaluation contains both positive and nega... Neutral\n\nThe evaluation contains both positi... ["Appreciated analytical rigor", "Desired more... ["Incorporate real-world case studies into lec... True True True 265dbbf39a6f044e3d9ac8879834a0a5 c093f46806b11c1a6f3bb185458ca959 45750924adf6ee05ff3fb690a17b0f49
4 ['Enhance feedback detail on assignments', 'Co... ['Enjoyed the course and group projects', 'Pro... Positive 4 I enjoyed the course, especially the group pro... 0 Be very specific and constructive in providing... You are a professor reviewing student evaluati... Agent_4 1 ... The student clearly enjoyed the course and fou... Positive\n\nThe student clearly enjoyed the co... ["Enjoyed the course and group projects", "Pro... ["Enhance feedback detail on assignments", "Co... True True True 957ab53fb4cae05d4e89dc02cda69b43 5dabf9b39b444bd678989962dbe91e65 c5d6a3a504fbb6afb1c48f60981619a2

5 rows × 54 columns

We can also use pandas methods by first converting:

[15]:
df_sentiment = results.to_pandas()["answer.sentiment"]
df_sentiment.value_counts()
[15]:
answer.sentiment
Positive    4
Neutral     4
Negative    2
Name: count, dtype: int64

Use responses to construct new questions

We can use the responses to our initial questions to construct more questions about the texts. For example, we can prompt a model to condense the individual lists of themes and areas for improvement into short lists, and then use the new lists to quantify the topics across the set of evaluations.

Here we take the lists of themes in each evaluation, flatten them into a (duplicative) list, and then create a new question prompting a model to condense it for us:

[16]:
results.select("themes", "themes_generated_tokens")
[16]:
  answer.themes generated_tokens.themes_generated_tokens
0 ['Engaging and informative course content', 'Effective explanation of complex concepts', 'Fast pace and challenging readings'] ["Engaging and informative course content", "Effective explanation of complex concepts", "Fast pace and challenging readings"] The student found the course to be highly engaging and well-taught, but noted the pace was too fast, impacting their ability to keep up with the readings. These three points capture the essence of the feedback.
1 ['Student found the material dry and difficult', 'Lack of real-world connection and examples cited', 'Desire for more current event examples to increase engagement'] ["Student found the material dry and difficult", "Lack of real-world connection and examples cited", "Desire for more current event examples to increase engagement"] The three points directly address the student's criticisms and are concise. They avoid subjective interpretations and focus on the student's stated concerns.
2 ['Excellent instruction and enthusiasm', 'Effective interactive lectures and practical assignments', 'Readily available extra help during office hours'] ["Excellent instruction and enthusiasm", "Effective interactive lectures and practical assignments", "Readily available extra help during office hours"] The three points chosen directly reflect the student's positive feedback on teaching quality, course structure, and accessibility of the instructor. They are concise and capture the essence of the evaluation.
3 ['Appreciated analytical rigor', 'Desired more real-world application discussions', 'Felt disconnect between theory and practice'] ["Appreciated analytical rigor", "Desired more real-world application discussions", "Felt disconnect between theory and practice"] The student's feedback highlights both a positive aspect (strong math foundation) and a key area for improvement (linking theory to practical examples). The three points concisely capture the essence of the evaluation.
4 ['Enjoyed the course and group projects', 'Project application of concepts was valuable', 'Feedback on assignments needs improvement'] ["Enjoyed the course and group projects", "Project application of concepts was valuable", "Feedback on assignments needs improvement"] The student enjoyed the course material and found the group projects particularly engaging and beneficial for applying economic concepts. However, they clearly identified a need for more detailed feedback on assignments to improve learning. This summarizes the key points concisely and addresses both positive and negative aspects.
5 ['Well-organized course content', 'Monotonous and hard-to-follow lectures', 'Suggestions for improvement: visual aids and guest lecturers'] ["Well-organized course content", "Monotonous and hard-to-follow lectures", "Suggestions for improvement: visual aids and guest lecturers"] The summary accurately reflects the student's main points: positive feedback on organization, negative feedback on lecture style, and concrete suggestions for improvement. The three points are concise and capture the essence of the evaluation.
6 ['Enjoyed the balance of theory and case studies', 'Exams perceived as fair', 'Appreciated diverse perspectives on global economic policies'] ["Enjoyed the balance of theory and case studies", "Exams perceived as fair", "Appreciated diverse perspectives on global economic policies"] The student's positive feedback highlights three key aspects: the course structure, assessment fairness, and the inclusion of diverse viewpoints. These are valuable points for course improvement and demonstrate student engagement.
7 ['Textbook complexity', 'Unexplained jargon', 'Need for simpler materials or more explanatory lectures'] ["Textbook complexity", "Unexplained jargon", "Need for simpler materials or more explanatory lectures"] The student clearly identifies three interconnected issues: the textbook's difficulty, the use of undefined jargon, and the resulting need for either simpler readings or more thorough lecture explanations. These are the core complaints and represent the most important points to address.
8 ['Professor possesses strong subject matter expertise and enthusiasm', 'Course over-reliance on testing limits accessibility for diverse learners', 'More varied assignments needed to cater to different learning styles'] ["Professor possesses strong subject matter expertise and enthusiasm", "Course over-reliance on testing limits accessibility for diverse learners", "More varied assignments needed to cater to different learning styles"] The summary focuses on the core strengths and weaknesses highlighted in the evaluation, prioritizing conciseness and clarity for efficient review.
9 ["Positive assessment of the course's introductory nature", 'Critique of insufficient real-world application focus', 'Suggestion for increased emphasis on practical examples'] ["Positive assessment of the course's introductory nature", "Critique of insufficient real-world application focus", "Suggestion for increased emphasis on practical examples"] The three points accurately reflect the student's main concerns and suggestions, capturing both positive and negative feedback concisely.
[17]:
themes = results.select("themes").to_list(flatten = True)

Next we construct a question to condense the list into a new list:

[18]:
q_condensed_themes = QuestionList(
    question_name="condensed_themes",
    question_text="""Combine the following list of themes extracted from the evaluations
    into a consolidated, non-redundant list: """
    + ", ".join(themes),
    max_list_items=10,
)

Now we run the question and select the new list. Note that we can choose whether we want to use the agent for this question by not adding it to the question when we run it:

[19]:
condensed_themes = q_condensed_themes.run().select("condensed_themes").to_list()[0]
condensed_themes
Job Status (2025-02-07 20:27:39)
Job UUID 6a305c60-c51e-45ec-9686-d284c9c3f241
Progress Bar URL https://www.expectedparrot.com/home/remote-job-progress/6a305c60-c51e-45ec-9686-d284c9c3f241
Exceptions Report URL None
Results UUID b7cd7bcf-1b0f-46fe-901b-85e804e70af7
Results URL https://www.expectedparrot.com/content/b7cd7bcf-1b0f-46fe-901b-85e804e70af7
Current Status: Job completed and Results stored on Coop: https://www.expectedparrot.com/content/b7cd7bcf-1b0f-46fe-901b-85e804e70af7
[19]:
['Engaging and informative course content',
 'Effective explanation of complex concepts',
 'Need for more real-world examples and applications',
 'Excellent instruction and enthusiasm',
 'Desire for more varied and accessible learning materials',
 'Well-organized course content',
 'Constructive feedback on assignments',
 'Appreciated analytical rigor and diverse perspectives',
 'Suggestions for improvement: visual aids and guest lecturers',
 'Fair exams and valuable project applications']

Now we can create a question to identify all the themes in the list that appear in each evaluation (our new list becomes the list of answer options):

[20]:
from edsl import QuestionCheckBox

q_themes_list = QuestionCheckBox(
    question_name="themes_list",
    question_text="Select all of the themes that are mentioned in this evaluation: {{ evaluation }}",
    question_options=condensed_themes,
)

Here we run the question and show a table listing all the themes for each evaluation in the results:

[21]:
themes_lists = q_themes_list.by(scenarios).by(agent).run()
themes_lists.select("evaluation", "themes_list")
Job Status (2025-02-07 20:27:46)
Job UUID 88cdc441-5670-4c97-b264-8c693308ab1a
Progress Bar URL https://www.expectedparrot.com/home/remote-job-progress/88cdc441-5670-4c97-b264-8c693308ab1a
Exceptions Report URL None
Results UUID 9a1d65cd-6e1a-44f7-8e89-2a67917d44eb
Results URL https://www.expectedparrot.com/content/9a1d65cd-6e1a-44f7-8e89-2a67917d44eb
Current Status: Job completed and Results stored on Coop: https://www.expectedparrot.com/content/9a1d65cd-6e1a-44f7-8e89-2a67917d44eb
[21]:
  scenario.evaluation answer.themes_list
0 I found the course very engaging and informative. The professor did an excellent job breaking down complex concepts, making them accessible to those of us new to economics. However, the pace was a bit fast, and I sometimes struggled to keep up with the weekly readings. ['Engaging and informative course content', 'Effective explanation of complex concepts']
1 This class was a struggle for me. The material felt dry and difficult to connect with real-world applications, which I think could have made it more interesting. More examples from current events would definitely have helped spark my interest. ['Need for more real-world examples and applications', 'Desire for more varied and accessible learning materials']
2 Excellent introductory course! The professor was enthusiastic and always willing to offer extra help during office hours. The interactive lectures and the practical assignments made the theory much more digestible and engaging. ['Engaging and informative course content', 'Excellent instruction and enthusiasm']
3 As someone with a strong background in math, I appreciated the analytical rigor of this course. However, I wish there had been more discussions that connected the theories we learned to everyday economic issues. It felt a bit isolated from practical realities at times. ['Need for more real-world examples and applications', 'Appreciated analytical rigor and diverse perspectives']
4 I enjoyed the course, especially the group projects, which were both challenging and rewarding. It was great to apply economic concepts to solve real-life problems. I did feel, however, that the feedback on assignments could be more detailed to help us understand our mistakes. ['Engaging and informative course content', 'Constructive feedback on assignments', 'Fair exams and valuable project applications']
5 The course content was well-organized, but the lectures were somewhat monotonous and hard to follow. I would suggest incorporating more visual aids and maybe some guest lectures from industry professionals to liven up the sessions. ['Well-organized course content', 'Suggestions for improvement: visual aids and guest lecturers']
6 This was my favorite class this semester! The mix of theory and case studies was perfect, and the exams were fair. I also really appreciated the diversity of perspectives we explored in class, especially in terms of global economic policies. ['Engaging and informative course content', 'Appreciated analytical rigor and diverse perspectives', 'Fair exams and valuable project applications']
7 I found the textbook to be overly complex for an introductory course. It often used jargon that hadn't been explained in lectures, which was confusing. Simpler reading materials or more explanatory lectures would make a big difference for newcomers to economics. ['Effective explanation of complex concepts', 'Desire for more varied and accessible learning materials']
8 The professor was knowledgeable and clearly passionate about economics, but I felt the course relied too heavily on tests rather than more creative forms of assessment. More varied assignments would make the course more accessible to students with different learning styles. ['Excellent instruction and enthusiasm', 'Desire for more varied and accessible learning materials']
9 This class was a solid introduction to economics, though it leaned heavily on theoretical aspects. I would have liked more opportunities to discuss the real-world implications of economic theories, which I believe would enhance understanding and retention of the material. ['Need for more real-world examples and applications']
[22]:
wide_evaluation_themes = themes_lists.select("evaluation", "themes_list").to_scenario_list().expand("themes_list").rename({"themes_list": "theme"})
wide_evaluation_themes
[22]:

ScenarioList scenarios: 21; keys: ['evaluation', 'theme'];

  evaluation theme
0 I found the course very engaging and informative. The professor did an excellent job breaking down complex concepts, making them accessible to those of us new to economics. However, the pace was a bit fast, and I sometimes struggled to keep up with the weekly readings. Engaging and informative course content
1 I found the course very engaging and informative. The professor did an excellent job breaking down complex concepts, making them accessible to those of us new to economics. However, the pace was a bit fast, and I sometimes struggled to keep up with the weekly readings. Effective explanation of complex concepts
2 This class was a struggle for me. The material felt dry and difficult to connect with real-world applications, which I think could have made it more interesting. More examples from current events would definitely have helped spark my interest. Need for more real-world examples and applications
3 This class was a struggle for me. The material felt dry and difficult to connect with real-world applications, which I think could have made it more interesting. More examples from current events would definitely have helped spark my interest. Desire for more varied and accessible learning materials
4 Excellent introductory course! The professor was enthusiastic and always willing to offer extra help during office hours. The interactive lectures and the practical assignments made the theory much more digestible and engaging. Engaging and informative course content
5 Excellent introductory course! The professor was enthusiastic and always willing to offer extra help during office hours. The interactive lectures and the practical assignments made the theory much more digestible and engaging. Excellent instruction and enthusiasm
6 As someone with a strong background in math, I appreciated the analytical rigor of this course. However, I wish there had been more discussions that connected the theories we learned to everyday economic issues. It felt a bit isolated from practical realities at times. Need for more real-world examples and applications
7 As someone with a strong background in math, I appreciated the analytical rigor of this course. However, I wish there had been more discussions that connected the theories we learned to everyday economic issues. It felt a bit isolated from practical realities at times. Appreciated analytical rigor and diverse perspectives
8 I enjoyed the course, especially the group projects, which were both challenging and rewarding. It was great to apply economic concepts to solve real-life problems. I did feel, however, that the feedback on assignments could be more detailed to help us understand our mistakes. Engaging and informative course content
9 I enjoyed the course, especially the group projects, which were both challenging and rewarding. It was great to apply economic concepts to solve real-life problems. I did feel, however, that the feedback on assignments could be more detailed to help us understand our mistakes. Constructive feedback on assignments
10 I enjoyed the course, especially the group projects, which were both challenging and rewarding. It was great to apply economic concepts to solve real-life problems. I did feel, however, that the feedback on assignments could be more detailed to help us understand our mistakes. Fair exams and valuable project applications
11 The course content was well-organized, but the lectures were somewhat monotonous and hard to follow. I would suggest incorporating more visual aids and maybe some guest lectures from industry professionals to liven up the sessions. Well-organized course content
12 The course content was well-organized, but the lectures were somewhat monotonous and hard to follow. I would suggest incorporating more visual aids and maybe some guest lectures from industry professionals to liven up the sessions. Suggestions for improvement: visual aids and guest lecturers
13 This was my favorite class this semester! The mix of theory and case studies was perfect, and the exams were fair. I also really appreciated the diversity of perspectives we explored in class, especially in terms of global economic policies. Engaging and informative course content
14 This was my favorite class this semester! The mix of theory and case studies was perfect, and the exams were fair. I also really appreciated the diversity of perspectives we explored in class, especially in terms of global economic policies. Appreciated analytical rigor and diverse perspectives
15 This was my favorite class this semester! The mix of theory and case studies was perfect, and the exams were fair. I also really appreciated the diversity of perspectives we explored in class, especially in terms of global economic policies. Fair exams and valuable project applications
16 I found the textbook to be overly complex for an introductory course. It often used jargon that hadn't been explained in lectures, which was confusing. Simpler reading materials or more explanatory lectures would make a big difference for newcomers to economics. Effective explanation of complex concepts
17 I found the textbook to be overly complex for an introductory course. It often used jargon that hadn't been explained in lectures, which was confusing. Simpler reading materials or more explanatory lectures would make a big difference for newcomers to economics. Desire for more varied and accessible learning materials
18 The professor was knowledgeable and clearly passionate about economics, but I felt the course relied too heavily on tests rather than more creative forms of assessment. More varied assignments would make the course more accessible to students with different learning styles. Excellent instruction and enthusiasm
19 The professor was knowledgeable and clearly passionate about economics, but I felt the course relied too heavily on tests rather than more creative forms of assessment. More varied assignments would make the course more accessible to students with different learning styles. Desire for more varied and accessible learning materials
20 This class was a solid introduction to economics, though it leaned heavily on theoretical aspects. I would have liked more opportunities to discuss the real-world implications of economic theories, which I believe would enhance understanding and retention of the material. Need for more real-world examples and applications
[23]:
wide_evaluation_themes.tally("theme")
[23]:
  theme count
0 Engaging and informative course content 4
1 Need for more real-world examples and applications 3
2 Desire for more varied and accessible learning materials 3
3 Effective explanation of complex concepts 2
4 Excellent instruction and enthusiasm 2
5 Appreciated analytical rigor and diverse perspectives 2
6 Fair exams and valuable project applications 2
7 Constructive feedback on assignments 1
8 Well-organized course content 1
9 Suggestions for improvement: visual aids and guest lecturers 1

We can do the same thing with the areas of improvement:

[24]:
improvements = results.select("improvements").to_list(flatten=True)
improvements
[24]:
  0
0 Adjust the pace of lectures and incorporate more opportunities for student engagement.
1 Provide more structured guidance on tackling the weekly readings, perhaps by suggesting specific questions to consider.
2 Consider offering supplemental resources, such as online tutorials or practice problems, to reinforce concepts.
3 Incorporate more real-world examples and case studies
4 Connect course material to current events
5 Develop more engaging teaching methods to improve student comprehension
6 Consider incorporating more diverse case studies
7 Explore alternative assessment methods to gauge deeper understanding beyond practical assignments
8 Enhance online resources and accessibility for students with varying learning styles
9 Incorporate real-world case studies into lectures
10 Dedicate class time for discussions linking theoretical concepts to current events
11 Assign application-based problem sets or projects
12 Enhance feedback detail on assignments
13 Consider providing more specific rubric criteria
14 Explore alternative assessment methods to complement group projects
15 Incorporate more visual aids into lectures
16 Consider inviting guest lecturers from the industry
17 Review lecture delivery to improve clarity and engagement
18 Increase quantitative problem sets
19 Explore alternative assessment methods alongside exams
20 Incorporate more interactive class discussions
21 Simplify textbook selection or supplement with clearer materials
22 Incorporate textbook jargon into lectures with explicit definitions
23 Designate additional time for clarifying complex concepts
24 Incorporate more diverse assessment methods (e.g., group projects, presentations, essays)
25 Explore alternative ways to evaluate understanding beyond high-stakes exams
26 Design assignments catering to varied learning styles and preferences
27 Incorporate more case studies illustrating real-world applications of economic theories
28 Design in-class activities and discussions focusing on current economic events and their theoretical underpinnings
29 Assign projects or papers requiring students to analyze real-world economic issues using the concepts learned in class
[25]:
q_condensed_improvements = QuestionList(
    question_name="condensed_improvements",
    question_text="""Combine the following list of areas for improvement from the evaluations
    into a consolidated, non-redundant list: """
    + ", ".join(improvements),
    max_list_items=10,
)
[26]:
condensed_improvements = (
    q_condensed_improvements.run().select("condensed_improvements").to_list()[0]
)
condensed_improvements
Job Status (2025-02-07 20:27:56)
Job UUID 65078ff9-7afa-43ab-8282-d8868b64d99b
Progress Bar URL https://www.expectedparrot.com/home/remote-job-progress/65078ff9-7afa-43ab-8282-d8868b64d99b
Exceptions Report URL None
Results UUID ee6079b6-0db6-471b-b6b7-508743deaad6
Results URL https://www.expectedparrot.com/content/ee6079b6-0db6-471b-b6b7-508743deaad6
Current Status: Job completed and Results stored on Coop: https://www.expectedparrot.com/content/ee6079b6-0db6-471b-b6b7-508743deaad6
[26]:
['Adjust the pace of lectures and enhance engagement through interactive methods',
 'Provide structured guidance and supplemental resources for weekly readings',
 'Incorporate real-world examples, case studies, and current events into the curriculum',
 'Explore diverse and alternative assessment methods beyond traditional exams',
 'Enhance feedback and provide detailed rubric criteria for assignments',
 'Improve clarity and engagement in lecture delivery with visual aids',
 'Develop assignments catering to varied learning styles and preferences',
 'Incorporate industry insights through guest lecturers and practical examples',
 'Designate time for discussions linking theory to real-world applications',
 'Simplify and supplement textbook materials for clarity and comprehension']
[27]:
q_improvements_list = QuestionCheckBox(
    question_name="improvements_list",
    question_text="Select all of the improvements that are mentioned in this evaluation: {{ evaluation }}",
    question_options=condensed_improvements,
)
[29]:
improvements_lists = q_improvements_list.by(scenarios).by(agent).run()
improvements_lists.select("evaluation", "improvements_list")
Job Status (2025-02-07 20:28:37)
Job UUID c82a4c83-e7bb-47e9-8a04-c8f97b114403
Progress Bar URL https://www.expectedparrot.com/home/remote-job-progress/c82a4c83-e7bb-47e9-8a04-c8f97b114403
Exceptions Report URL None
Results UUID 99a87a81-12cc-40f2-9e22-9e4919c37181
Results URL https://www.expectedparrot.com/content/99a87a81-12cc-40f2-9e22-9e4919c37181
Current Status: Job completed and Results stored on Coop: https://www.expectedparrot.com/content/99a87a81-12cc-40f2-9e22-9e4919c37181
[29]:
  scenario.evaluation answer.improvements_list
0 I found the course very engaging and informative. The professor did an excellent job breaking down complex concepts, making them accessible to those of us new to economics. However, the pace was a bit fast, and I sometimes struggled to keep up with the weekly readings. ['Adjust the pace of lectures and enhance engagement through interactive methods', 'Provide structured guidance and supplemental resources for weekly readings']
1 This class was a struggle for me. The material felt dry and difficult to connect with real-world applications, which I think could have made it more interesting. More examples from current events would definitely have helped spark my interest. ['Incorporate real-world examples, case studies, and current events into the curriculum', 'Designate time for discussions linking theory to real-world applications']
2 Excellent introductory course! The professor was enthusiastic and always willing to offer extra help during office hours. The interactive lectures and the practical assignments made the theory much more digestible and engaging. []
3 As someone with a strong background in math, I appreciated the analytical rigor of this course. However, I wish there had been more discussions that connected the theories we learned to everyday economic issues. It felt a bit isolated from practical realities at times. ['Incorporate real-world examples, case studies, and current events into the curriculum', 'Designate time for discussions linking theory to real-world applications']
4 I enjoyed the course, especially the group projects, which were both challenging and rewarding. It was great to apply economic concepts to solve real-life problems. I did feel, however, that the feedback on assignments could be more detailed to help us understand our mistakes. ['Enhance feedback and provide detailed rubric criteria for assignments']
5 The course content was well-organized, but the lectures were somewhat monotonous and hard to follow. I would suggest incorporating more visual aids and maybe some guest lectures from industry professionals to liven up the sessions. ['Improve clarity and engagement in lecture delivery with visual aids', 'Incorporate industry insights through guest lecturers and practical examples']
6 This was my favorite class this semester! The mix of theory and case studies was perfect, and the exams were fair. I also really appreciated the diversity of perspectives we explored in class, especially in terms of global economic policies. []
7 I found the textbook to be overly complex for an introductory course. It often used jargon that hadn't been explained in lectures, which was confusing. Simpler reading materials or more explanatory lectures would make a big difference for newcomers to economics. ['Provide structured guidance and supplemental resources for weekly readings', 'Simplify and supplement textbook materials for clarity and comprehension']
8 The professor was knowledgeable and clearly passionate about economics, but I felt the course relied too heavily on tests rather than more creative forms of assessment. More varied assignments would make the course more accessible to students with different learning styles. ['Explore diverse and alternative assessment methods beyond traditional exams', 'Develop assignments catering to varied learning styles and preferences']
9 This class was a solid introduction to economics, though it leaned heavily on theoretical aspects. I would have liked more opportunities to discuss the real-world implications of economic theories, which I believe would enhance understanding and retention of the material. ['Incorporate real-world examples, case studies, and current events into the curriculum', 'Designate time for discussions linking theory to real-world applications']
[30]:
wide_themes = (
    improvements_lists
    .select("evaluation", "improvements_list")
    .to_scenario_list()
    .expand("improvements_list")
    .rename({"improvements_list": "theme"})
)
[31]:
wide_themes.tally("theme")
[31]:
  theme count
0 Incorporate real-world examples, case studies, and current events into the curriculum 3
1 Designate time for discussions linking theory to real-world applications 3
2 Provide structured guidance and supplemental resources for weekly readings 2
3 Adjust the pace of lectures and enhance engagement through interactive methods 1
4 Enhance feedback and provide detailed rubric criteria for assignments 1
5 Improve clarity and engagement in lecture delivery with visual aids 1
6 Incorporate industry insights through guest lecturers and practical examples 1
7 Simplify and supplement textbook materials for clarity and comprehension 1
8 Explore diverse and alternative assessment methods beyond traditional exams 1
9 Develop assignments catering to varied learning styles and preferences 1

Other examples

Please check out the EDSL Docs for examples of other methods and templates for use cases, and join our Discord channel to ask questions and with other users!

Posting to the Coop

The Coop is a platform for creating, storing and sharing LLM-based research. It is fully integrated with EDSL and accessible from your workspace or Coop account page. Learn more about creating an account and using the Coop.

We can post any EDSL object to the Coop by calling the push() method on it, including this notebook:

[32]:
from edsl import Notebook
[33]:
n = Notebook(path = "analyze_evaluations.ipynb")
[34]:
info = n.push(description = "Example code for analyzing course evaluations", visibility = "public")
info
[34]:
{'description': 'Example code for analyzing course evaluations',
 'object_type': 'notebook',
 'url': 'https://www.expectedparrot.com/content/3a79d93b-1e57-4d7b-ac4c-24d8d8fc6852',
 'uuid': '3a79d93b-1e57-4d7b-ac4c-24d8d8fc6852',
 'version': '0.1.43.dev1',
 'visibility': 'public'}

To update an object:

[35]:
n = Notebook(path = "analyze_evaluations.ipynb") # resave
[36]:
n.patch(uuid = info["uuid"], value = n)
[36]:
{'status': 'success'}