Spaces:
Sleeping
Sleeping
Stéphanie Kamgnia Wonkap
commited on
Commit
•
35ee660
1
Parent(s):
12e199b
prompt template
Browse files- src/generator.py +7 -7
src/generator.py
CHANGED
@@ -9,14 +9,14 @@ from langchain_community.vectorstores import FAISS
|
|
9 |
from langchain.chains.combine_documents import create_stuff_documents_chain
|
10 |
from langchain.chains import create_retrieval_chain
|
11 |
def promt_template():
|
12 |
-
prompt_in_chat_format =
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
Provide the number of the source document when relevant.If the answer cannot be deduced from the context, do not give an answer. Please answer in french,
|
17 |
|
18 |
-
|
19 |
-
|
|
|
20 |
prompt = ChatPromptTemplate.from_template(
|
21 |
[
|
22 |
("system",prompt_in_chat_format),
|
|
|
9 |
from langchain.chains.combine_documents import create_stuff_documents_chain
|
10 |
from langchain.chains import create_retrieval_chain
|
11 |
def promt_template():
|
12 |
+
prompt_in_chat_format =(
|
13 |
+
"Using the information contained in the given context, give a comprehensive answer to the question."
|
14 |
+
"Respond only to the question asked, response should be concise and relevant to the question."
|
15 |
+
"Provide the number of the source document when relevant.If the answer cannot be deduced from the context, do not give an answer. Please answer in french"
|
|
|
16 |
|
17 |
+
"\n\n"
|
18 |
+
"{context}"
|
19 |
+
)
|
20 |
prompt = ChatPromptTemplate.from_template(
|
21 |
[
|
22 |
("system",prompt_in_chat_format),
|