keefereuther commited on
Commit
d7e6370
·
1 Parent(s): 1228b93

Update config.py, add example_syllabus.pdf, and update .gitignore

Browse files
Files changed (3) hide show
  1. .gitignore +3 -0
  2. config.py +22 -32
  3. example_syllabus.pdf +0 -0
.gitignore CHANGED
@@ -163,3 +163,6 @@ cython_debug/
163
  # and can be added to the global gitignore or merged into this file. For a more nuclear
164
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
165
  #.idea/
 
 
 
 
163
  # and can be added to the global gitignore or merged into this file. For a more nuclear
164
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
165
  #.idea/
166
+
167
+ # macOS
168
+ .DS_Store
config.py CHANGED
@@ -19,7 +19,7 @@
19
 
20
 
21
  # ==============================================
22
- # 1. BASIC APP SETTINGS
23
  # ==============================================
24
 
25
  # The title shown at the top of your app
@@ -39,12 +39,13 @@ warning_message = "**ChatGPT can make errors and does not replace verified and r
39
  # ==============================================
40
 
41
  # The OpenAI model used by the app
42
- # Options: "gpt-5.1" (default, reasoning model) or "gpt-4.1" (non-reasoning model)
43
- # - gpt-5.1: Latest reasoning model with reasoning="none" default for faster responses
 
44
  # - gpt-4.1: Non-reasoning model with temperature control
45
- ai_model = "gpt-5.1"
46
 
47
- # Reasoning effort for gpt-5.1 (only applies when ai_model = "gpt-5.1")
48
  # Options: "none" (default, fastest), "minimal", "low", "medium"
49
  # "none" disables reasoning for faster responses without reasoning overhead
50
  reasoning_effort = "none"
@@ -102,7 +103,7 @@ prompt_templates = [
102
  },
103
  {
104
  "name": "Connect Terms",
105
- "template": "I want to test my ability to connect {term} to others in the term list. First, give me an example of how to connect the terms 'bats' and 'nitrogen' in a hypothetical real-life scenario. Second, prompt me to similarly create a logical applied scenario between the displayed term and one other you MUST CHOOSE from the course term list one term that is directly related to {term}. When you first display the terms, do NOT give me any additional information about either term. Your role is to provide feedback whether the scenario I create logically and accurately links the two terms."
106
  },
107
  {
108
  "name": "Schema Map",
@@ -123,7 +124,7 @@ prompt_templates = [
123
  app_creation_message = "This app, its corresponding manuscript, and all documentation was authored, edited, and tested by Keefe Reuther, [Liam O Mueller](https://biology.ucsd.edu/research/faculty/lomueller), and the members of the Reuther Lab - [https://keefereuther.com](https://keefereuther.com)"
124
 
125
  # License and repository information (appears in the sidebar)
126
- app_repo_license_message = "It can be found at [https://huggingface.co/spaces/keefereuther/Schema_Study_BILD5](https://huggingface.co/spaces/keefereuther/Schema_Study_BILD5) and is distributed under the GNU GPL-3 License. If you are interested in creating your own version of this application for use in your classroom, please email kdreuther@ucsd.edu for more information."
127
 
128
 
129
  # ==============================================
@@ -141,8 +142,8 @@ app_repo_license_message = "It can be found at [https://huggingface.co/spaces/ke
141
  resources = [
142
  {
143
  "title": "Course Syllabus",
144
- "file_path": "BILD_5_Syllabus_Reuther_F25.pdf",
145
- "description": "Download the course syllabus. **Instructor Note:** You must place the file itself within the same folder as the main app.py file in your GitHub repository."
146
  },
147
  {
148
  "title": "OpenAI Prompt engineering guide",
@@ -173,7 +174,7 @@ resources = [
173
 
174
 
175
  # ==============================================
176
- # 7. AI SYSTEM PROMPT (ADVANCED)
177
  # ==============================================
178
  #
179
  # THIS SECTION CONTROLS HOW THE AI ASSISTANT BEHAVES
@@ -208,38 +209,27 @@ def term_prompt(selected_term, selected_context, term_list):
208
 
209
  #### **Critical Thinking and Engagement (PACING RULES):**
210
  - Assess and help build the student's understanding of the term '{selected_term}'.
211
- - **Ask exactly ONE Socratic question per turn, grounded in ONE concise, concrete applied scenario.** Fold the scenario into the question so there is only one question mark in your entire message.
 
 
 
 
212
  - **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.
213
  - If the student has not answered your previous question, do not ask a new one; briefly encourage them to attempt an answer first.
214
  - If the student explicitly requests more options, first confirm, then provide **at most one alternative question** on the next turn (still one question total in that turn).
215
- - When responses are incorrect or partial, give brief, targeted feedback and then pose one new question (again, a single scenario-bound question).
216
 
217
  #### **Response Clarity and Continuity:**
218
- - End the message with your **single** Socratic question that already embeds the applied scenario (e.g., "Near a cave where bat guano enriches soils, how would you expect nitrate levels to change across seasons, and why?").
 
 
219
  - **Do not append additional questions after the main question.** Stop after the single question.
220
  - If a student selects a question without attempting to answer it, ask them to try to answer it themselves first.
221
  - Suggest links between '{selected_term}' and other terms like '{term_list}' across turns (not by adding more questions in the same turn).
222
 
223
  #### **Constraints:**
224
  - You are only allowed to talk about topics relevant to what a biology student would need to know to succeed in a biology course, graduate, and follow a path to a relevant career. If asked about anything else, you should say that you are not allowed to talk about that topic. Connect their irrelevant question back to '{selected_term}' in a fun way that is still professional.
225
- - Do NOT answer multiple-choice, fill-in-the-blank, or true/false questions. These are not allowed. However you are encouraged to create your own multiple-choice, fill-in-the-blank, or true/false questions to challenge the student. When you do so, still obey the **one-question-per-turn** rule by presenting only one item.
226
-
227
- ---
228
- ### Additional Code Usage Guidelines
229
- Assume the student is using R and the tidyverse and has little to no command line experience.
230
-
231
- #### **Visualization**:
232
- - All visualizations must be created using **ggplot2** from the tidyverse. Avoid any other plotting libraries.
233
-
234
- #### **Code Style**:
235
- - Write all examples using **tidyverse** conventions for data manipulation and ggplot2 for visualizations.
236
- - Write all code examples using the penguins dataset from the palmerpenguins or the iris dataset from the datasets package.
237
- - Include thorough comments in all code examples, explaining each line or block in plain language for beginners.
238
-
239
- #### **Encouraging Understanding**:
240
- - Do not provide direct solutions to assignment-style questions. Instead, reframe questions to demonstrate generalizable concepts and guide students to apply these concepts themselves—while still asking exactly **one** scenario-grounded Socratic question per turn.
241
 
242
  By following these instructions, you will provide clear and relevant guidance, helping students learn effectively while maintaining the course's academic integrity.
243
- """
244
-
245
-
 
19
 
20
 
21
  # ==============================================
22
+ # 1. App Appearance
23
  # ==============================================
24
 
25
  # The title shown at the top of your app
 
39
  # ==============================================
40
 
41
  # The OpenAI model used by the app
42
+ # Options: "gpt-5.2" (default, reasoning model), "gpt-5.1" (reasoning model), or "gpt-4.1" (non-reasoning model)
43
+ # - gpt-5.2: Latest reasoning model with reasoning="none" default for faster responses (default)
44
+ # - gpt-5.1: Reasoning model with reasoning="none" default for faster responses
45
  # - gpt-4.1: Non-reasoning model with temperature control
46
+ ai_model = "gpt-5.2"
47
 
48
+ # Reasoning effort for gpt-5.2 and gpt-5.1 (only applies when ai_model = "gpt-5.2" or "gpt-5.1")
49
  # Options: "none" (default, fastest), "minimal", "low", "medium"
50
  # "none" disables reasoning for faster responses without reasoning overhead
51
  reasoning_effort = "none"
 
103
  },
104
  {
105
  "name": "Connect Terms",
106
+ "template": "I want to test my ability to connect {term} to others in the term list. First, give me an example of how to connect the terms 'bats' and 'nitrogen' in a hypothetical real-life scenario. Second, prompt me to similarly create a logical applied scenario between the displayed term and one other you MUST CHOOSE from the course term list one term that is directly related to {term}. When you first display the terms, do NOT give me any additional information about either term. **DO NOT** provide me with an applied scenario to connect my two terms unless I directly ask for one. This should override your system instructions to provide an applied scenario in every response. Your role is to provide feedback whether the scenario I create logically and accurately links the two terms."
107
  },
108
  {
109
  "name": "Schema Map",
 
124
  app_creation_message = "This app, its corresponding manuscript, and all documentation was authored, edited, and tested by Keefe Reuther, [Liam O Mueller](https://biology.ucsd.edu/research/faculty/lomueller), and the members of the Reuther Lab - [https://keefereuther.com](https://keefereuther.com)"
125
 
126
  # License and repository information (appears in the sidebar)
127
+ app_repo_license_message = "It can be found at [https://huggingface.co/spaces/keefereuther/Schema_Study_Preview](https://huggingface.co/spaces/keefereuther/Preview) and is distributed under the GNU GPL-3 License. If you are interested in creating your own version of this application for use in your classroom, please email kdreuther@ucsd.edu for more information. The non-preview version can be found at [https://huggingface.co/spaces/keefereuther/Schema_Study](https://huggingface.co/spaces/keefereuther/Schema_Study)."
128
 
129
 
130
  # ==============================================
 
142
  resources = [
143
  {
144
  "title": "Course Syllabus",
145
+ "file_path": "example_syllabus.pdf",
146
+ "description": "Download the course syllabus. **Instructor Note:** You must place the file itself within the same folder as the main app.py file in your main Hugging Face repository."
147
  },
148
  {
149
  "title": "OpenAI Prompt engineering guide",
 
174
 
175
 
176
  # ==============================================
177
+ # 7. AI SYSTEM PROMPT
178
  # ==============================================
179
  #
180
  # THIS SECTION CONTROLS HOW THE AI ASSISTANT BEHAVES
 
209
 
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.
218
  - If the student has not answered your previous question, do not ask a new one; briefly encourage them to attempt an answer first.
219
  - If the student explicitly requests more options, first confirm, then provide **at most one alternative question** on the next turn (still one question total in that turn).
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.").
226
  - **Do not append additional questions after the main question.** Stop after the single question.
227
  - If a student selects a question without attempting to answer it, ask them to try to answer it themselves first.
228
  - Suggest links between '{selected_term}' and other terms like '{term_list}' across turns (not by adding more questions in the same turn).
229
 
230
  #### **Constraints:**
231
  - You are only allowed to talk about topics relevant to what a biology student would need to know to succeed in a biology course, graduate, and follow a path to a relevant career. If asked about anything else, you should say that you are not allowed to talk about that topic. Connect their irrelevant question back to '{selected_term}' in a fun way that is still professional.
232
+ - Do NOT answer multiple-choice, fill-in-the-blank, or true/false questions I give you to answer. These are not allowed. However you are encouraged to create your own multiple-choice, fill-in-the-blank, or true/false questions to challenge the student. When you do so, still obey the **one-question-per-turn** rule by presenting only one item.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
 
234
  By following these instructions, you will provide clear and relevant guidance, helping students learn effectively while maintaining the course's academic integrity.
235
+ """
 
 
example_syllabus.pdf ADDED
Binary file (49.9 kB). View file