Spaces:
Sleeping
Sleeping
updated prompt
Browse files
app.py
CHANGED
|
@@ -308,10 +308,10 @@ def build_prompt(user_query, retrieved_chunks, messages):
|
|
| 308 |
if retrieved_chunks:
|
| 309 |
chunks_text = "\n".join([f"Page {c['page_num']}:\n{c['content']}" for c in retrieved_chunks])
|
| 310 |
retrieved_content_instruction = (
|
| 311 |
-
"Your primary guide is the socratic prompt - ensure you focus on helping the student answer their own questions by asking follow ups, and balancing this with providing some basic information when required to spark further learning."
|
| 312 |
-
"You must use the retrieved content to guide and position your responses / follow up questions to the user.
|
| 313 |
-
"Do not use any external knowledge or make assumptions beyond this information. "
|
| 314 |
-
"If the content is insufficient, explain that no answer can be provided because the question is beyond the scope of the course."
|
| 315 |
)
|
| 316 |
prompt_messages.append({"role": "system", "content": retrieved_content_instruction + "\n" + chunks_text})
|
| 317 |
|
|
|
|
| 308 |
if retrieved_chunks:
|
| 309 |
chunks_text = "\n".join([f"Page {c['page_num']}:\n{c['content']}" for c in retrieved_chunks])
|
| 310 |
retrieved_content_instruction = (
|
| 311 |
+
"Your primary guide is the socratic prompt - ensure you focus on helping the student answer their own questions by asking follow ups, and balancing this with providing some basic information when required to spark further learning, but do not just provide straight up answers to questions and ensure that you're only responding to questions where you have relevant retrieved chunks."
|
| 312 |
+
"You must use the retrieved content to guide and position your responses / follow up questions to the user."
|
| 313 |
+
"Do not use any external knowledge or make assumptions beyond this information retrieved. This is your sole source of truth."
|
| 314 |
+
"If the content retrieved is insufficient for you to be able to answer the question, explain that no answer can be provided because the question is beyond the scope of the course."
|
| 315 |
)
|
| 316 |
prompt_messages.append({"role": "system", "content": retrieved_content_instruction + "\n" + chunks_text})
|
| 317 |
|