mayzinoo commited on
Commit
2644316
·
verified ·
1 Parent(s): f017e89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -74,23 +74,24 @@ Include:
74
  - One short class activity
75
  """
76
  ),
77
- "general question": PromptTemplate(
78
- input_variables=["context", "query"],
79
- template="""
80
- You are a Virginia Geometry Standards of Learning (SOL) assistant.
81
 
82
- From the following standards content:
83
  {context}
84
 
85
- Identify the SOL standard (e.g., G.RLT.1, G.TR.3) that most accurately answers the user's question: "{query}"
86
 
87
  Respond with:
88
- 1. The SOL code (e.g., G.RLT.3)
89
- 2. The **exact standard description** for that code, as written in the context
90
 
91
- Do not summarize. Copy the official description exactly.
92
  """
93
- )
 
94
 
95
 
96
 
 
74
  - One short class activity
75
  """
76
  ),
77
+ "general question": ChatPromptTemplate.from_messages([
78
+ HumanMessagePromptTemplate.from_template(
79
+ """
80
+ You are a Virginia Geometry SOL assistant.
81
 
82
+ From the following SOL context:
83
  {context}
84
 
85
+ Identify the SOL standard (e.g., G.RLT.1) that best matches this query: "{query}"
86
 
87
  Respond with:
88
+ 1. The exact SOL code (e.g., G.RLT.1)
89
+ 2. The exact description line from the SOL guide
90
 
91
+ Do not summarize. Only copy from the context.
92
  """
93
+ )
94
+ ])
95
 
96
 
97