absiitr commited on
Commit
7250f7b
·
verified ·
1 Parent(s): a1ecf7f

Update app.py

Browse files

Improved Prompt

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -276,13 +276,13 @@ def ask_question(question):
276
  context = "\n\n".join(d.page_content for d in docs)
277
 
278
  prompt = f"""You are a strict RAG Q&A assistant.
279
- Summarize the context based on user question and return best answer.
280
  If the answer is not found, reply: "I cannot find this in the PDF."
281
 
282
  CONTEXT = {context}
283
  QUESTION = {question}
284
 
285
- Answer on your behalf, don't say based on the context..."""
286
 
287
  response = client.chat.completions.create(
288
  model=GROQ_MODEL,
 
276
  context = "\n\n".join(d.page_content for d in docs)
277
 
278
  prompt = f"""You are a strict RAG Q&A assistant.
279
+ Use below CONTEXT to answer the below mentioned QUESTION
280
  If the answer is not found, reply: "I cannot find this in the PDF."
281
 
282
  CONTEXT = {context}
283
  QUESTION = {question}
284
 
285
+ Answer on your behalf, write answer in a presentable manner (proper formatting) like point-wise with numbering or bullet points accordingly!"""
286
 
287
  response = client.chat.completions.create(
288
  model=GROQ_MODEL,