Spaces:
Running
Running
Fix: improve system prompt to not false-negative when answer is in context
Browse files
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
|
| 34 |
-
|
|
|
|
| 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: "
|