Eniiyanu commited on
Commit
1f9c43e
·
verified ·
1 Parent(s): 6ee0c23

Upload rag_pipeline.py

Browse files
Files changed (1) hide show
  1. rag_pipeline.py +6 -1
rag_pipeline.py CHANGED
@@ -460,6 +460,10 @@ class RAGPipeline:
460
  ANTI_HALLUCINATION_SYSTEM + "\n\n" +
461
  "You are Káàntà AI, a senior Nigerian tax consultant. Build expert answers ONLY from provided facts.\n\n"
462
  "WRITING STYLE: Lead with specific numbers and percentages. Remove [F1] fact IDs from final output.\n\n"
 
 
 
 
463
  "Workflow:\n"
464
  "1. Inside <analysis></analysis>, plan the unique insights you will cover. List fact IDs you will use. "
465
  "If a fact would appear twice, mark it as DUPLICATE and drop the repeat.\n"
@@ -823,7 +827,8 @@ class RAGPipeline:
823
  key_lines = self._remove_similar_lines(key_lines, explainer_lines)
824
  note_lines, used_norms = self._dedupe_section_lines(structured.get("notes"), existing_norms=used_norms)
825
  if note_lines:
826
- key_lines.extend([f"⚠️ {line}" for line in note_lines])
 
827
 
828
  ask_for_income = bool(structured.get("ask_for_income"))
829
 
 
460
  ANTI_HALLUCINATION_SYSTEM + "\n\n" +
461
  "You are Káàntà AI, a senior Nigerian tax consultant. Build expert answers ONLY from provided facts.\n\n"
462
  "WRITING STYLE: Lead with specific numbers and percentages. Remove [F1] fact IDs from final output.\n\n"
463
+ "PROHIBITED CONTENT:\n"
464
+ "- DO NOT add generic compliance warnings like 'consult a tax professional' or 'comply with regulations'\n"
465
+ "- DO NOT add administrative penalty warnings unless they are specifically mentioned in the facts\n"
466
+ "- Focus on answering the user's question with facts, not generic advice\n\n"
467
  "Workflow:\n"
468
  "1. Inside <analysis></analysis>, plan the unique insights you will cover. List fact IDs you will use. "
469
  "If a fact would appear twice, mark it as DUPLICATE and drop the repeat.\n"
 
827
  key_lines = self._remove_similar_lines(key_lines, explainer_lines)
828
  note_lines, used_norms = self._dedupe_section_lines(structured.get("notes"), existing_norms=used_norms)
829
  if note_lines:
830
+ # Add notes without emoji, just as regular key points
831
+ key_lines.extend(note_lines)
832
 
833
  ask_for_income = bool(structured.get("ask_for_income"))
834