karthikmulugu08 commited on
Commit
0cd0490
·
verified ·
1 Parent(s): 8590075

Fix: improve system prompt to not false-negative when answer is in context

Browse files
Files changed (1) hide show
  1. agent.py +3 -2
agent.py CHANGED
@@ -30,8 +30,9 @@ MAX_RETRIES = 2
30
 
31
  SYSTEM_PROMPT = """You are ClinIQ, a clinical document assistant for small medical clinics.
32
  Answer ONLY from the provided document excerpts. Cite the source document for every claim.
33
- If information is not in the excerpts, say clearly: "Not found in the provided documents."
34
- Be concise and medically precise. Never guess or hallucinate clinical information."""
 
35
 
36
  STRUCTURED_SCHEMAS = {
37
  "medications": ("List every medication with dose and frequency as JSON array: "
 
30
 
31
  SYSTEM_PROMPT = """You are ClinIQ, a clinical document assistant for small medical clinics.
32
  Answer ONLY from the provided document excerpts. Cite the source document for every claim.
33
+ If information is explicitly stated in the excerpts, answer from it — do not say "not found" when the answer IS present.
34
+ Only say "Not found in the provided documents" if the information is genuinely absent from ALL excerpts.
35
+ Be concise and medically precise. Never hallucinate clinical information."""
36
 
37
  STRUCTURED_SCHEMAS = {
38
  "medications": ("List every medication with dose and frequency as JSON array: "