Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit 7f2dcf5

Browse files
committed
a liitle adjustment
1 parent eef4d9f commit 7f2dcf5

File tree

4 files changed

+58
-46
lines changed

4 files changed

+58
-46
lines changed

app/backend/approaches/chatreadretrieveread.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def system_message_chat_conversation(self):
9595
- **Referencing**: Every fact in your response must include a citation from the indexed documents using square brackets, e.g. [source_name.html]. **Do not provide any fact without a citation.** If you cannot find relevant information, refuse to answer. Cite sources separately and do not combine them.
9696
- **Translation**: Translate the user's prompt to NZ English to interpret, then always respond in the language of the user query. All English outputs must be in New Zealand English.
9797
- **Output Validation**: Review your response to ensure compliance with guidelines before replying. Refuse to answer if inappropriate or unrelated to educational content or lesson planning.
98+
""" + "\n" + "- **Chain of Thoughts**:" + cot_content + "\n" + """
9899
{follow_up_questions_prompt}
99100
{injected_prompt}
100101
"""

app/backend/approaches/chatreadretrievereadvision.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def system_message_chat_conversation(self):
104104
- **Referencing**: Every fact in your response must include a citation from the indexed documents using square brackets, e.g. [source_name.html]. **Do not provide any fact without a citation.** If you cannot find relevant information, refuse to answer. Cite sources separately and do not combine them.
105105
- **Translation**: Translate the user's prompt to NZ English to interpret, then always respond in the language of the user query. All English outputs must be in New Zealand English.
106106
- **Output Validation**: Review your response to ensure compliance with guidelines before replying. Refuse to answer if inappropriate or unrelated to educational content or lesson planning.
107+
""" + "\n" + "- **Chain of Thoughts**:" + cot_content + "\n" + """
107108
{follow_up_questions_prompt}
108109
{injected_prompt}
109110
"""

app/backend/approaches/retrievethenread.py

Lines changed: 55 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class RetrieveThenReadApproach(Approach):
5252
+ "Each source has a name followed by a colon and the actual information; always include the source name for each fact you use in the response. "
5353
+ "If you cannot answer using the sources below, say you don't know. Use the example below to guide your answer."
5454
+ "Every fact in your response must include a citation from the indexed documents using square brackets, e.g. [source_name.html]. **Do not provide any fact without a citation.** If you cannot find relevant information, refuse to answer. Cite sources separately and do not combine them."
55+
+ cot_content
5556
)
5657

5758
# shots/sample conversation
@@ -66,81 +67,89 @@ class RetrieveThenReadApproach(Approach):
6667
"""
6768

6869
answer = """
69-
Certainly! Here's a comprehensive lesson plan for a Year 8 English class on persuasive writing:
70+
Certainly! Here's the enhanced lesson plan for a Year 8 English class on persuasive writing with added specific course subject content:
7071
71-
---
72+
---
7273
73-
**Lesson Title:** Introduction to Persuasive Writing
74+
**Lesson Title:** Introduction to Persuasive Writing
7475
75-
**Objective:**
76-
- Students will understand the components of persuasive writing.
77-
- Students will be able to state a clear position and support it with evidence.
78-
- Students will apply persuasive language techniques to convince their audience.
76+
**Objective:**
77+
- Students will understand the components of persuasive writing.
78+
- Students will be able to state a clear position and support it with evidence.
79+
- Students will apply persuasive language techniques to convince their audience.
7980
80-
**Materials Needed:**
81-
- Examples of persuasive essays/articles
82-
- Debate topics list
83-
- Writing materials (paper, pens, computers)
84-
- Peer review checklists
85-
- Projector and whiteboard
81+
**Materials Needed:**
82+
- Examples of persuasive essays/articles (e.g., excerpts from "I Have a Dream" by Martin Luther King Jr., opinion pieces from school newspapers)
83+
- Debate topics list (e.g., "Should homework be banned?", "Is technology making us more isolated?")
84+
- Writing materials (paper, pens, computers)
85+
- Peer review checklists
86+
- Projector and whiteboard
87+
- Textbook chapters on persuasive writing (e.g., Chapter 5: Persuasive Techniques)
8688
87-
**Lesson Duration:** 90 minutes
89+
**Lesson Duration:** 90 minutes
8890
89-
**Lesson Outline:**
91+
**Lesson Outline:**
9092
91-
1. **Introduction (10 minutes)**
93+
1. **Introduction (10 minutes)**
9294
- **Activity:** Begin with a brief discussion on what persuasive writing is and its importance.
95+
- **Specific Content:** Show a short video clip from a persuasive speech (e.g., a segment of Martin Luther King Jr.'s "I Have a Dream") to illustrate effective persuasion.
9396
- **Reference:** [curriculum1.txt][curriculum2.pdf]
9497
95-
2. **Understanding Components (15 minutes)**
98+
2. **Understanding Components (15 minutes)**
9699
- **Lecture:** Explain the key components: clear position, supporting evidence, and persuasive techniques.
97-
- **Example Analysis:** Review excerpts from persuasive texts to identify these components.
100+
- **Example Analysis:** Review excerpts from persuasive texts, such as an opinion article from the school newspaper, to identify these components.
101+
- **Specific Content:** Highlight how the author states their position clearly in the introduction, uses statistics and quotes as evidence, and employs emotional appeals.
98102
- **Reference:** [curriculum1.txt][curriculum2.pdf]
99103
100-
3. **Audience and Purpose (10 minutes)**
104+
3. **Audience and Purpose (10 minutes)**
101105
- **Discussion:** How knowing the audience and purpose shapes the writing.
102-
- **Activity:** Identify the audience and purpose in given examples.
106+
- **Activity:** Provide students with different scenarios (e.g., writing to convince the school to adopt a longer lunch break vs. writing to persuade parents to support a new school policy) and have them identify the audience and purpose.
107+
- **Specific Content:** Discuss how the tone and language change based on whether the audience is peers, teachers, or parents.
103108
- **Reference:** [curriculum4.pdf]
104109
105-
4. **Persuasive Language Techniques (15 minutes)**
110+
4. **Persuasive Language Techniques (15 minutes)**
106111
- **Lecture:** Introduce techniques such as rhetorical questions, emotive language, repetition, and strong evidence.
107-
- **Activity:** Highlight these techniques in sample texts.
112+
- **Activity:** Highlight these techniques in sample texts from the textbook's persuasive writing section.
113+
- **Specific Content:** Provide examples like rhetorical questions ("Shouldn't we all strive for a cleaner environment?"), emotive language ("heartbreaking statistics on plastic pollution"), and repetition ("We must act now, we must act decisively, we must act together").
108114
- **Reference:** [curriculum4.pdf]
109115
110-
5. **Structured Debate (20 minutes)**
111-
- **Activity:** Divide the class into groups and assign debate topics.
112-
- **Task:** Each group prepares arguments supporting their position using persuasive techniques.
116+
5. **Structured Debate (20 minutes)**
117+
- **Activity:** Divide the class into groups and assign debate topics from the list (e.g., "Should homework be banned?", "Is technology making us more isolated?").
118+
- **Task:** Each group prepares arguments supporting their position using the persuasive techniques discussed.
119+
- **Specific Content:** Encourage students to incorporate at least two persuasive techniques in their arguments and use evidence from credible sources (e.g., textbook facts, classroom research).
113120
- **Reference:** [curriculum3.pdf]
114121
115-
6. **Essay Writing Workshop (20 minutes)**
116-
- **Activity:** Students begin drafting their own persuasive essays on a chosen topic.
117-
- **Guidance:** Provide a basic outline to structure their essays.
122+
6. **Essay Writing Workshop (20 minutes)**
123+
- **Activity:** Students begin drafting their own persuasive essays on a chosen topic from a provided list (e.g., "Should school uniforms be mandatory?", "Is animal testing justified?").
124+
- **Guidance:** Provide a basic outline to structure their essays, including introduction with thesis statement, body paragraphs with evidence, and a conclusion.
125+
- **Specific Content:** Reference textbook guidelines on essay structure and provide a sample outline on the board.
118126
- **Reference:** [curriculum3.pdf][curriculum2.pdf]
119127
120-
7. **Peer Review Introduction (5 minutes)**
121-
- **Explanation:** Introduce the peer review process and distribute checklists.
122-
- **Task:** Explain how to give constructive feedback.
128+
7. **Peer Review Introduction (5 minutes)**
129+
- **Explanation:** Introduce the peer review process and distribute checklists based on textbook criteria.
130+
- **Task:** Explain how to give constructive feedback, focusing on clarity of position, strength of evidence, and use of persuasive techniques.
131+
- **Specific Content:** Demonstrate with a short example by reviewing a sample paragraph from the textbook.
123132
- **Reference:** [curriculum3.pdf]
124133
125-
**Homework:**
126-
- Complete the first draft of the persuasive essay.
127-
- Exchange essays with a peer for review using the provided checklist.
134+
**Homework:**
135+
- Complete the first draft of the persuasive essay.
136+
- Exchange essays with a peer for review using the provided checklist.
128137
129-
**Assessment:**
130-
- Participation in debates.
131-
- Quality and clarity of the essay drafts.
132-
- Use of persuasive techniques and supporting evidence.
133-
- Effectiveness of peer feedback.
138+
**Assessment:**
139+
- Participation in debates.
140+
- Quality and clarity of the essay drafts.
141+
- Use of persuasive techniques and supporting evidence.
142+
- Effectiveness of peer feedback.
134143
135-
**Extensions:**
136-
- Incorporate multimedia elements into persuasive presentations.
137-
- Explore persuasive writing in different formats (e.g., letters to the editor, advertisements).
144+
**Extensions:**
145+
- Incorporate multimedia elements into persuasive presentations, such as creating a video advertisement.
146+
- Explore persuasive writing in different formats (e.g., letters to the editor, advertisements) using examples from the textbook's supplementary materials.
138147
139-
---
148+
---
140149
141-
This lesson plan provides a structured approach to teaching persuasive writing, incorporating interactive activities and ensuring alignment with the Year 8 English curriculum standards.
150+
This enhanced lesson plan provides a structured approach to teaching persuasive writing, incorporating specific examples and content from textbooks to enrich the learning experience and ensure alignment with the Year 8 English curriculum standards.
142151
143-
[References: curriculum1.txt, curriculum2.pdf, curriculum3.pdf, curriculum4.pdf]
152+
[References: curriculum1.txt, curriculum2.pdf, curriculum3.pdf, curriculum4.pdf]
144153
"""
145154

146155

@@ -222,7 +231,7 @@ async def run(
222231
content = "\n".join(sources_content)
223232
user_content = q + "\n" + f"Sources:\n {content}"
224233

225-
response_token_limit = 1024
234+
response_token_limit = 4096
226235
updated_messages = build_messages(
227236
model=self.chatgpt_model,
228237
system_prompt=overrides.get("prompt_template", self.system_chat_template),

app/backend/approaches/retrievethenreadvision.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ class RetrieveThenReadVisionApproach(Approach):
4848
+ "The text and image source can be the same file name; don't use the image title when citing the image source, only use the file name as mentioned "
4949
+ "If you cannot answer using the sources below, say you don't know. Return just the answer without any input texts "
5050
+ " Every fact in your response must include a citation from the indexed documents using square brackets, e.g. [source_name.html]. **Do not provide any fact without a citation.** If you cannot find relevant information, refuse to answer. Cite sources separately and do not combine them."
51+
+ cot_content
5152
)
5253

5354

0 commit comments

Comments
 (0)