subhrajit-mohanty commited on
Commit
f33c67e
·
verified ·
1 Parent(s): 58f0de3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -9
app.py CHANGED
@@ -760,17 +760,24 @@ class RAGService:
760
 
761
  combined_context = "\n\n---\n\n".join(context_parts)
762
 
763
- prompt = f"""Use the following context to answer the user's question naturally and directly. Don't mention that you're using context or say "based on the context" - just provide the answer as if you know it.
764
-
765
- Context:
 
 
 
 
 
 
 
 
766
  {combined_context}
767
-
768
- Question: {query}
769
-
770
- Important: When responding to questions that use pronouns like "he," "him," "his," or any similar references, always refer to Subhrajit specifically. Any personal pronouns in questions should be understood as referring to Subhrajit.
771
-
772
- Please ensure your answer is complete and not cut off, adjusting its length as necessary to fit within the desired context length. Always Respond it in Markdown Format."""
773
 
 
 
 
 
 
774
  return prompt
775
 
776
  @asynccontextmanager
 
760
 
761
  combined_context = "\n\n---\n\n".join(context_parts)
762
 
763
+ prompt = f"""
764
+ You are a helpful assistant answering questions about Subhrajit based on the provided text.
765
+
766
+ **Instructions:**
767
+ 1. Answer the user's question using ONLY the information from the context below.
768
+ 2. Answer directly and naturally, as if you know the information yourself. Do NOT mention the context (e.g., avoid phrases like "Based on the context...").
769
+ 3. The user's question may use pronouns like "he," "him," or "his." These always refer to Subhrajit. In your answer, use the name "Subhrajit" for clarity instead of using pronouns.
770
+ 4. If the context does not contain the answer to the question, respond with: "I'm sorry, I don't have enough information to answer that question."
771
+ 5. Format your entire response in Markdown.
772
+
773
+ **Context:**
774
  {combined_context}
 
 
 
 
 
 
775
 
776
+ **Question:**
777
+ {query}
778
+
779
+ **Answer:**
780
+ """
781
  return prompt
782
 
783
  @asynccontextmanager