jorgechvz commited on
Commit
0984a9a
1 Parent(s): 12d9cc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -36,13 +36,19 @@ retriever = VectorIndexRetriever(index=index, similarity_top_k=5)
36
  query_engine = RetrieverQueryEngine(retriever=retriever)
37
 
38
  prompt_template = (
39
- "Given the context that I will provide you, answer the questions.\n"
 
 
40
  "Context:\n"
41
  "#####################################\n"
42
  "{context_str}\n"
43
- "Answer: {query_str}\n"
 
 
 
44
  )
45
 
 
46
  qa_template = PromptTemplate(template=prompt_template)
47
  chain_type_kwargs = {"prompt": qa_template}
48
  response_synthesizer = get_response_synthesizer(
 
36
  query_engine = RetrieverQueryEngine(retriever=retriever)
37
 
38
  prompt_template = (
39
+ "You are an advanced AI assistant specialized in providing detailed and accurate information "
40
+ "by leveraging both general knowledge and real-time data retrieval. Below is the context related "
41
+ "to the question, followed by the specific question itself.\n"
42
  "Context:\n"
43
  "#####################################\n"
44
  "{context_str}\n"
45
+ "#####################################\n"
46
+ "Based on the above context, provide a comprehensive and well-structured answer to the following question:\n"
47
+ "Question: {query_str}\n"
48
+ "Answer:"
49
  )
50
 
51
+
52
  qa_template = PromptTemplate(template=prompt_template)
53
  chain_type_kwargs = {"prompt": qa_template}
54
  response_synthesizer = get_response_synthesizer(