xavierbarbier commited on
Commit
b26b237
·
verified ·
1 Parent(s): 6e9cf31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -92,14 +92,15 @@ def qa(question: str, doc: str) -> str:
92
  D, I = index.search(question_embeddings, k=2) # distance, index
93
  retrieved_chunk = [chunks[i] for i in I.tolist()[0]]
94
 
95
- prompt = f"""
96
- Context information is below.
97
  ---------------------
98
  {retrieved_chunk}
99
  ---------------------
100
- Given the context information and not prior knowledge, answer the query.
101
- Query: {question}
102
- Answer:
 
103
  """
104
 
105
  return prompt
 
92
  D, I = index.search(question_embeddings, k=2) # distance, index
93
  retrieved_chunk = [chunks[i] for i in I.tolist()[0]]
94
 
95
+ prompt = f"""<s>[INST]
96
+ Les informations contextuelles sont ci-dessous.
97
  ---------------------
98
  {retrieved_chunk}
99
  ---------------------
100
+ [/INST]
101
+ Compte tenu des informations contextuelles et non des connaissances préalables, répondez à la requête. </s>
102
+ [INST] Requête: {question} [/INST]
103
+ Réponse:
104
  """
105
 
106
  return prompt