keefereuther commited on
Commit
dbc3249
Β·
1 Parent(s): 7130d03

Improve system prompt personability and update README with manuscript information

Browse files

- Add context-aware scenario inclusion for multi-part requests
- Enhance communication style to be warm and engaging (Pliny personality)
- Update README with research evidence, best practices, and all co-authors
- Add pedagogical approach explanation and CourseSource citation

Files changed (2) hide show
  1. README.md +47 -19
  2. config.py +14 -5
README.md CHANGED
@@ -13,16 +13,21 @@ short_description: AI-enhanced study app for students
13
 
14
  # Schema Study: An AI-Enhanced Study App for Biology Students
15
 
16
- Schema Study is a modern, interactive study app designed to help biology students master core course concepts through AI-powered conversations. The app leverages OpenAI's latest GPT models via the Responses API to provide instant feedback, Socratic questioning, and personalized study support.
 
 
17
 
18
  ## Features
19
- - **Password Protection:** Secure access for your class or group.
20
- - **Customizable Terms:** Use your own CSV file of terms and definitions.
21
- - **Prompt Templates:** Engage with the material using creative, research-based prompts including midterm review.
22
- - **AI-Enhanced Feedback:** Get instant, formative feedback and guidance using GPT-5.1 (default) or GPT-4.1.
23
- - **Web Search Support:** Optional web search functionality for current information and citations (configurable in `config.py`).
24
- - **Real-Time Streaming:** Live token-by-token response streaming with visual typing indicator.
25
- - **Professional, Accessible UI:** Clean, modern design with a color palette for clarity and focus.
 
 
 
26
 
27
  ## How to Use (Students)
28
  1. **Access the App:** Go to your Hugging Face Space URL. Enter the password provided by your instructor.
@@ -32,6 +37,16 @@ Schema Study is a modern, interactive study app designed to help biology student
32
 
33
  ## How to Use (Instructors)
34
 
 
 
 
 
 
 
 
 
 
 
35
  ### Setup
36
  1. **Clone or Fork the Space:**
37
  ```bash
@@ -42,8 +57,8 @@ Schema Study is a modern, interactive study app designed to help biology student
42
  2. **Edit Configuration:**
43
  - Update `config.py` for your course (title, instructions, prompt templates, etc).
44
  - Configure AI model settings:
45
- - `ai_model`: Choose "gpt-5.1" (default) or "gpt-4.1"
46
- - `reasoning_effort`: For GPT-5.1, set to "none" (fastest), "minimal", "low", or "medium"
47
  - `enable_web_search`: Set to `True` or `False` (default: True)
48
  - Place your terms CSV (e.g., `terms.csv`) in the root directory. Format: first column = term, second column = context/definition.
49
 
@@ -64,16 +79,17 @@ Schema Study is a modern, interactive study app designed to help biology student
64
  ```
65
 
66
  ### Model Selection Guide
67
- - **GPT-5.1** (default): Best for most use cases, fastest with reasoning="none", supports web search
 
68
  - **GPT-4.1**: Use if you need temperature control or prefer non-reasoning model, excellent web search support
69
 
70
  ## Configuration
71
 
72
  ### AI Model Settings (`config.py`)
73
- - **Default Model:** GPT-5.1 with reasoning="none" for faster responses
74
- - **Alternative Model:** GPT-4.1 with temperature control
75
  - **Web Search:** Configurable via `enable_web_search` (default: True)
76
- - **Reasoning Effort:** Configurable for GPT-5.1 (options: "none", "minimal", "low", "medium")
77
  - **Temperature:** Configurable for GPT-4.1 (0.0-2.0)
78
 
79
  ### Other Settings
@@ -85,22 +101,34 @@ Schema Study is a modern, interactive study app designed to help biology student
85
 
86
  ### API & Models
87
  - **API Framework:** OpenAI Responses API (streaming-enabled)
88
- - **Supported Models:** GPT-5.1 (default), GPT-4.1
89
  - **Streaming:** Real-time token-by-token response streaming
90
  - **Inactivity Guard:** Streaming stops after 60s of no server deltas
91
 
92
  ### File Structure
93
  - `app.py` β€” Main Streamlit app with Responses API integration
94
- - `config.py` β€” All app settings and customization (model selection, web search, prompt templates)
95
  - `.streamlit/secrets.toml` β€” Authentication credentials and API key (not tracked in git)
96
  - `requirements.txt` β€” Python dependencies
97
  - `terms.csv` β€” Your course terms and definitions (CSV format: term, context)
98
- - `BILD_5_Syllabus_Reuther_SP25.pdf` β€” Example resource
99
- - `BILD 5 F25 Midterm Exam.pdf` β€” Midterm exam resource
100
 
101
  ## License
102
  This project is licensed under the GNU GPL-3 License. See the [LICENSE](LICENSE) file for details.
103
 
 
 
 
 
 
 
 
 
104
  ## Acknowledgments
105
 
106
- Developed by Keefe Reuther, Assistant Teaching Professor in the UC San Diego School of Biological Sciences. Special thanks to Dr. Liam O Mueller and the members of the Reuther Lab for their support and contributions.
 
 
 
 
 
13
 
14
  # Schema Study: An AI-Enhanced Study App for Biology Students
15
 
16
+ Schema Study is a free, no-code, open-source web application that turns a spreadsheet of course terms into an AI-powered study coach. Designed for asynchronous student learning and inquiry, Schema Study helps biology students master core course concepts through evidence-based AI-powered conversations. The app leverages OpenAI's latest GPT models via the Responses API to provide instant formative feedback, Socratic questioning, and personalized study support.
17
+
18
+ **Key Pedagogical Approach:** Schema Study uses a Socratic questioning method that (1) withholds direct solutions while providing brief, targeted feedback, (2) poses exactly one scenario-grounded follow-up question per turn, and (3) presses for mechanistic reasoning, justification, and connections between concepts. The tool provides formative practice through question-led dialogue; independent performance is evaluated in secure assessments outside the app.
19
 
20
  ## Features
21
+ - **No-Code Setup:** Upload course terms via a single CSV spreadsheet - no programming required
22
+ - **Password Protection:** Secure access for your class or group
23
+ - **Customizable Terms:** Use your own CSV file of terms and definitions
24
+ - **Evidence-Based Pedagogy:** Implements Socratic questioning and formative feedback strategies
25
+ - **Prompt Templates:** Engage with the material using creative, research-based prompts including midterm review
26
+ - **AI-Enhanced Feedback:** Get instant, formative feedback and guidance using GPT-5.2 (default), GPT-5.1, or GPT-4.1
27
+ - **Web Search Support:** Optional web search functionality for current information and citations (configurable in `config.py`)
28
+ - **Real-Time Streaming:** Live token-by-token response streaming with visual typing indicator
29
+ - **Professional, Accessible UI:** Clean, modern design with a color palette for clarity and focus
30
+ - **Open-Source & Free:** Fully open-source under GNU GPL-3 License, no paywalls or proprietary services required
31
 
32
  ## How to Use (Students)
33
  1. **Access the App:** Go to your Hugging Face Space URL. Enter the password provided by your instructor.
 
37
 
38
  ## How to Use (Instructors)
39
 
40
+ ### Best Practices for Integration
41
+
42
+ Based on classroom testing and iterative refinement, here are recommended best practices for integrating Schema Study:
43
+
44
+ - **Clear Structured Messaging:** Provide students with clear instructions on how to use Schema Study and its role in your course
45
+ - **AI Literacy Training:** Include brief training on AI literacy and appropriate use of AI tools in educational settings
46
+ - **Curricular Alignment:** Ensure your terms and context align with your learning objectives - update content regularly as you progress through the course
47
+ - **Scaffolded Active Learning:** Embed Schema Study within structured assignments rather than as an optional tool
48
+ - **Formative vs. Summative:** Use Schema Study for formative practice and feedback; evaluate independent performance in secure assessments outside the app
49
+
50
  ### Setup
51
  1. **Clone or Fork the Space:**
52
  ```bash
 
57
  2. **Edit Configuration:**
58
  - Update `config.py` for your course (title, instructions, prompt templates, etc).
59
  - Configure AI model settings:
60
+ - `ai_model`: Choose "gpt-5.2" (default), "gpt-5.1", or "gpt-4.1"
61
+ - `reasoning_effort`: For GPT-5.2 and GPT-5.1, set to "none" (fastest), "minimal", "low", or "medium"
62
  - `enable_web_search`: Set to `True` or `False` (default: True)
63
  - Place your terms CSV (e.g., `terms.csv`) in the root directory. Format: first column = term, second column = context/definition.
64
 
 
79
  ```
80
 
81
  ### Model Selection Guide
82
+ - **GPT-5.2** (default): Latest reasoning model, fastest with reasoning="none", supports web search
83
+ - **GPT-5.1**: Reasoning model with reasoning="none" default for faster responses, supports web search
84
  - **GPT-4.1**: Use if you need temperature control or prefer non-reasoning model, excellent web search support
85
 
86
  ## Configuration
87
 
88
  ### AI Model Settings (`config.py`)
89
+ - **Default Model:** GPT-5.2 with reasoning="none" for faster responses
90
+ - **Alternative Models:** GPT-5.1 (reasoning model) or GPT-4.1 (non-reasoning model with temperature control)
91
  - **Web Search:** Configurable via `enable_web_search` (default: True)
92
+ - **Reasoning Effort:** Configurable for GPT-5.2 and GPT-5.1 (options: "none", "minimal", "low", "medium")
93
  - **Temperature:** Configurable for GPT-4.1 (0.0-2.0)
94
 
95
  ### Other Settings
 
101
 
102
  ### API & Models
103
  - **API Framework:** OpenAI Responses API (streaming-enabled)
104
+ - **Supported Models:** GPT-5.2 (default), GPT-5.1, GPT-4.1
105
  - **Streaming:** Real-time token-by-token response streaming
106
  - **Inactivity Guard:** Streaming stops after 60s of no server deltas
107
 
108
  ### File Structure
109
  - `app.py` β€” Main Streamlit app with Responses API integration
110
+ - `config.py` β€” All app settings and customization (model selection, web search, prompt templates, system prompt)
111
  - `.streamlit/secrets.toml` β€” Authentication credentials and API key (not tracked in git)
112
  - `requirements.txt` β€” Python dependencies
113
  - `terms.csv` β€” Your course terms and definitions (CSV format: term, context)
114
+ - `example_syllabus.pdf` β€” Example resource file (replace with your own syllabus)
115
+ - `LICENSE` β€” GNU GPL-3 License file
116
 
117
  ## License
118
  This project is licensed under the GNU GPL-3 License. See the [LICENSE](LICENSE) file for details.
119
 
120
+ ## Research & Citation
121
+
122
+ This app, its corresponding CourseSource manuscript, and all documentation was authored, edited, and tested by Keefe Reuther, Dr. Liam O Mueller, Grace Constantian, Albert Nguyen, and the members of the Reuther Lab.
123
+
124
+ **Research Evidence:** During Winter 2025, Schema Study was integrated into an introductory biology course with 225 students. Pre- and post-surveys indicated strong student satisfaction, with 72% of students reporting they would reuse Schema Study in future biology courses. Each additional day per week students used Schema Study more than doubled the likelihood they would recommend it. Schema Study enhanced students' AI self-efficacy and their belief that AI is relevant to their education and careers.
125
+
126
+ If you use this app in your research or teaching, please cite the associated CourseSource manuscript and acknowledge the developers.
127
+
128
  ## Acknowledgments
129
 
130
+ Developed by Keefe Reuther, Assistant Teaching Professor in the UC San Diego School of Biological Sciences. Special thanks to Dr. Liam O Mueller, Grace Constantian, Albert Nguyen, and the members of the Reuther Lab for their support and contributions.
131
+
132
+ This work was supported by University of California, San Diego intramural grants TG114333 and RG113974.
133
+
134
+ For questions about creating your own version of this application for use in your classroom, please email kdreuther@ucsd.edu.
config.py CHANGED
@@ -190,19 +190,22 @@ def term_prompt(selected_term, selected_context, term_list):
190
 
191
  #### **Communication Style:**
192
  - Use clear, simple language and avoid unnecessary jargon.
193
- - Be succinct but make sure to respond to all statements made by the user.
194
- - Be approachable and professional.
 
195
  - Provide information step-by-step to manage cognitive load.
196
  - Use culturally inclusive examples and analogies that do not require advanced biological knowledge.
197
- - KEEP EACH RESPONSE SHORT.
198
 
199
  #### **Feedback and Encouragement:**
200
  - Offer constructive feedback and gently correct errors.
201
  - Acknowledge correct reasoning and reinforce a growth mindset by celebrating effort and progress.
202
  - Invite further questions to foster dialogue.
 
203
 
204
  #### **Expectations for Interaction:**
205
  - Unless there is a specific reason to do otherwise, you should assume the student is asking about '{selected_term}'.
 
206
 
207
  #### **Context-Driven Support:**
208
  - Always preferentially use the following information to guide your response: '{selected_context}'. Do not provide all of this information at once; rather, use it to inform your feedback. This information provides context for how the course uses the selected term, but is not comprehensive and should not limit the student's thinking.
@@ -210,8 +213,13 @@ def term_prompt(selected_term, selected_context, term_list):
210
  #### **Critical Thinking and Engagement (PACING RULES):**
211
  - Assess and help build the student's understanding of the term '{selected_term}'.
212
  - **Context-Aware Scenario Inclusion:** Read the student's message carefully to determine if including an applied scenario makes sense:
213
- - **DO NOT include a scenario** if the message explicitly asks you NOT to provide one (e.g., "DO NOT provide me with an applied scenario", "don't give me a scenario", etc.)
214
- - **DO NOT include a scenario** if the message asks the student to create their own scenario (e.g., "create a logical applied scenario", "test my ability to connect", etc.)
 
 
 
 
 
215
  - **DO include a scenario** in normal conversational contexts where it helps illustrate the concept and guide the student's thinking
216
  - **Ask exactly ONE Socratic question per turn.** When a scenario is appropriate, ground it in ONE concise, concrete applied scenario and fold the scenario into the question so there is only one question mark in your entire message. When a scenario is not appropriate, ask your question without embedding a scenario.
217
  - **Never present multiple options or multiple questions in the same turn.** Do not offer alternatives like "Option A/Option B" or ask follow-up questions in the same message.
@@ -220,6 +228,7 @@ def term_prompt(selected_term, selected_context, term_list):
220
  - When responses are incorrect or partial, give brief, targeted feedback and then pose one new question (again, a single question, with or without a scenario depending on context).
221
 
222
  #### **Response Clarity and Continuity:**
 
223
  - End the message with your **single** Socratic question.
224
  - **When a scenario is contextually appropriate:** Embed the applied scenario into the question (e.g., "Near a cave where bat guano enriches soils, how would you expect nitrate levels to change across seasons, and why?").
225
  - **When a scenario is NOT appropriate:** Ask your question without providing a scenario (e.g., "Create a real-life applied scenario that logically links [Term A] and [Term B], and I'll provide feedback on your connection.").
 
190
 
191
  #### **Communication Style:**
192
  - Use clear, simple language and avoid unnecessary jargon.
193
+ - Be warm, friendly, and engaging while maintaining professionalism. Remember you are Pliny 😊 - a personable tutor, not a clinical textbook.
194
+ - Be concise but not terse - include brief, friendly introductions or transitions that make the conversation feel natural and supportive.
195
+ - Make sure to respond to all statements made by the user with appropriate acknowledgment.
196
  - Provide information step-by-step to manage cognitive load.
197
  - Use culturally inclusive examples and analogies that do not require advanced biological knowledge.
198
+ - Keep responses focused and avoid unnecessary length, but don't sacrifice warmth and engagement for brevity.
199
 
200
  #### **Feedback and Encouragement:**
201
  - Offer constructive feedback and gently correct errors.
202
  - Acknowledge correct reasoning and reinforce a growth mindset by celebrating effort and progress.
203
  - Invite further questions to foster dialogue.
204
+ - When responding to button template activities (e.g., "Two Truths & a Lie", "Connect Terms"), maintain your friendly, engaging personality. Add brief, warm introductions or transitions rather than jumping straight into the activity. Make the interaction feel like a supportive conversation, not a clinical quiz.
205
 
206
  #### **Expectations for Interaction:**
207
  - Unless there is a specific reason to do otherwise, you should assume the student is asking about '{selected_term}'.
208
+ - **When providing examples:** If explicitly asked to provide an example scenario connecting specific terms (even if those terms are not in the course term list), provide the example as requested. This is for demonstration purposes to show the student how to create connections.
209
 
210
  #### **Context-Driven Support:**
211
  - Always preferentially use the following information to guide your response: '{selected_context}'. Do not provide all of this information at once; rather, use it to inform your feedback. This information provides context for how the course uses the selected term, but is not comprehensive and should not limit the student's thinking.
 
213
  #### **Critical Thinking and Engagement (PACING RULES):**
214
  - Assess and help build the student's understanding of the term '{selected_term}'.
215
  - **Context-Aware Scenario Inclusion:** Read the student's message carefully to determine if including an applied scenario makes sense:
216
+ - **For multi-part requests:** If the message has multiple parts (e.g., "First, give me an example... Second, prompt me to create..."), handle each part appropriately:
217
+ - **DO provide a scenario** for parts that explicitly ask for an example or demonstration (e.g., "give me an example of how to connect 'bats' and 'nitrogen'")
218
+ - **DO NOT provide a scenario** for parts where the student is asked to create their own (e.g., "prompt me to create a logical applied scenario" combined with "DO NOT provide me with an applied scenario")
219
+ - **For single requests:**
220
+ - **DO provide a scenario** if the message explicitly asks you to provide an example or demonstration (e.g., "give me an example", "show me how to connect", "provide an example scenario")
221
+ - **DO NOT include a scenario** if the message explicitly asks you NOT to provide one (e.g., "DO NOT provide me with an applied scenario")
222
+ - **DO NOT include a scenario** if the message asks the student to create their own scenario
223
  - **DO include a scenario** in normal conversational contexts where it helps illustrate the concept and guide the student's thinking
224
  - **Ask exactly ONE Socratic question per turn.** When a scenario is appropriate, ground it in ONE concise, concrete applied scenario and fold the scenario into the question so there is only one question mark in your entire message. When a scenario is not appropriate, ask your question without embedding a scenario.
225
  - **Never present multiple options or multiple questions in the same turn.** Do not offer alternatives like "Option A/Option B" or ask follow-up questions in the same message.
 
228
  - When responses are incorrect or partial, give brief, targeted feedback and then pose one new question (again, a single question, with or without a scenario depending on context).
229
 
230
  #### **Response Clarity and Continuity:**
231
+ - Maintain a warm, engaging tone throughout your response. Even when presenting activities or questions, include brief, friendly context or transitions (e.g., "Great! Let's test your understanding with this challenge..." or "Here are three statements about natural selection for you to evaluate...")
232
  - End the message with your **single** Socratic question.
233
  - **When a scenario is contextually appropriate:** Embed the applied scenario into the question (e.g., "Near a cave where bat guano enriches soils, how would you expect nitrate levels to change across seasons, and why?").
234
  - **When a scenario is NOT appropriate:** Ask your question without providing a scenario (e.g., "Create a real-life applied scenario that logically links [Term A] and [Term B], and I'll provide feedback on your connection.").