devve1 commited on
Commit
fc575c1
1 Parent(s): 5eff631

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -195,12 +195,11 @@ def route_llm(context: str, query: str):
195
 
196
  @outlines.prompt
197
  def answer_with_context(context: str, query: str):
198
- """Context information is below.
199
- ---------------------
200
- {context}
201
- ---------------------
202
- Given the context information and not prior knowledge, answer the query.
203
- Query: {query}
204
  Answer:
205
  """
206
 
@@ -223,7 +222,7 @@ def main(query: str, client: QdrantClient, collection_name: str, llm, dense_mode
223
  contents, metadatas = [list(t) for t in zip(*docs)]
224
 
225
  context = "\n".join(contents)
226
- print(f'Context : {context}')
227
 
228
  gen_text = outlines.generate.json(llm, Question, whitespace_pattern=r"[\n ]?")
229
 
 
195
 
196
  @outlines.prompt
197
  def answer_with_context(context: str, query: str):
198
+ """You are a world class AI model who answer `Query` with informations extracted from the `Context`.
199
+
200
+ `Context`: {context}
201
+
202
+ `Query`: {query}
 
203
  Answer:
204
  """
205
 
 
222
  contents, metadatas = [list(t) for t in zip(*docs)]
223
 
224
  context = "\n".join(contents)
225
+ print(f'Context : \n + {context}')
226
 
227
  gen_text = outlines.generate.json(llm, Question, whitespace_pattern=r"[\n ]?")
228