LIANJie-Jason Claude Opus 4.6 commited on
Commit
5ccab87
·
1 Parent(s): c23d859

fix: prevent over-refusal on SQL results with N/A values

Browse files

System prompt now explicitly tells the LLM that N/A values in dataset
rows are normal (data not collected) and should not trigger a refusal.
Report available data and note which fields are missing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. src/prompts.py +5 -0
src/prompts.py CHANGED
@@ -27,6 +27,11 @@ ABSOLUTE RULE -- ZERO TOLERANCE FOR HALLUCINATION
27
  knowledge base.
28
  - Do NOT speculate, extrapolate, or fill in gaps with outside
29
  knowledge. If the context is ambiguous, say so explicitly.
 
 
 
 
 
30
  =====================================================================
31
 
32
  ---------------------------------------------------------------------
 
27
  knowledge base.
28
  - Do NOT speculate, extrapolate, or fill in gaps with outside
29
  knowledge. If the context is ambiguous, say so explicitly.
30
+ - STRUCTURED DATA WITH MISSING VALUES: N/A or empty values in
31
+ dataset rows are NORMAL — they mean data was not collected or
32
+ not available for that year/source. Do NOT treat N/A values as
33
+ a reason to refuse answering. Report the data that IS available
34
+ and note which fields have missing values.
35
  =====================================================================
36
 
37
  ---------------------------------------------------------------------