Spaces:
Build error
Build error
Update prompts.py
Browse files- prompts.py +12 -12
prompts.py
CHANGED
|
@@ -1,32 +1,32 @@
|
|
| 1 |
from langchain.prompts import PromptTemplate
|
| 2 |
|
| 3 |
prompt_template_questions = """
|
| 4 |
-
|
| 5 |
-
|
| 6 |
|
| 7 |
------------
|
| 8 |
{text}
|
| 9 |
------------
|
| 10 |
|
| 11 |
-
|
| 12 |
|
| 13 |
-
|
| 14 |
"""
|
| 15 |
PROMPT_QUESTIONS = PromptTemplate(template=prompt_template_questions, input_variables=["text"])
|
| 16 |
|
| 17 |
refine_template_questions = ("""
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
(
|
| 23 |
------------
|
| 24 |
{text}
|
| 25 |
------------
|
| 26 |
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
"""
|
| 31 |
)
|
| 32 |
REFINE_PROMPT_QUESTIONS = PromptTemplate(
|
|
|
|
| 1 |
from langchain.prompts import PromptTemplate
|
| 2 |
|
| 3 |
prompt_template_questions = """
|
| 4 |
+
You are an expert in creating practice questions based on study material.
|
| 5 |
+
Your goal is to prepare a student for their an exam. You do this by asking questions about the text below:
|
| 6 |
|
| 7 |
------------
|
| 8 |
{text}
|
| 9 |
------------
|
| 10 |
|
| 11 |
+
Create questions that will prepare the student for their exam. Make sure not to lose any important information.
|
| 12 |
|
| 13 |
+
QUESTIONS:
|
| 14 |
"""
|
| 15 |
PROMPT_QUESTIONS = PromptTemplate(template=prompt_template_questions, input_variables=["text"])
|
| 16 |
|
| 17 |
refine_template_questions = ("""
|
| 18 |
+
You are an expert in creating practice questions based on study material.
|
| 19 |
+
Your goal is to help a student prepare for an exam.
|
| 20 |
+
We have received some practice questions to a certain extent: {existing_answer}.
|
| 21 |
+
We have the option to refine the existing questions or add new ones.
|
| 22 |
+
(only if necessary) with some more context below.
|
| 23 |
------------
|
| 24 |
{text}
|
| 25 |
------------
|
| 26 |
|
| 27 |
+
Given the new context, refine the original questions in English.
|
| 28 |
+
If the context is not helpful, please provide the original questions.
|
| 29 |
+
QUESTIONS:
|
| 30 |
"""
|
| 31 |
)
|
| 32 |
REFINE_PROMPT_QUESTIONS = PromptTemplate(
|