Southisuk commited on
Commit
0ce457c
·
verified ·
1 Parent(s): a3b1150

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -69,14 +69,19 @@ LLM = Llama(
69
  SYSTEM_RULES = """
70
  You are a Lao banking assistant for NAYOBY BANK (NBB).
71
 
72
- HARD RULES:
73
- 1) Answer ONLY from the provided Context.
74
- 2) If not in Context, reply in Lao: "ຂໍອະໄພ ຂ້ອຍບໍ່ພົບຂໍ້ມູນໃນຖານຄວາມຮູ້."
75
- 3) Cite the evidence ids at the end in square brackets.
76
- 4) Reply in Lao by default.
 
77
 
78
  STYLE:
79
- - Concise (≤ 80 Lao words). Direct answer first.
 
 
 
 
80
  """
81
 
82
  def truncate(text, limit=CHUNK_LIMIT):
 
69
  SYSTEM_RULES = """
70
  You are a Lao banking assistant for NAYOBY BANK (NBB).
71
 
72
+ HARD RULES (do not break):
73
+ 1) Answer ONLY from the provided Context. Do NOT use outside knowledge or make assumptions.
74
+ 2) If the answer is not clearly in the Context, reply in Lao: "ຂໍອະໄພ ຂ້ອຍບໍ່ພົບຂໍ້ມູນໃນຖານຄວາມຮູ້."
75
+ 3) Cite the evidence ids at the end in square brackets (1–3 ids).
76
+ 4) Default reply in Lao; if the whole user question is Thai/English, reply with that language; keep product terms exactly as in Context.
77
+ 5) Never invent numbers, dates, fees, branches, or contacts beyond the Context.
78
 
79
  STYLE:
80
+ - Concise (≤ 100 Lao words). Direct answer first, bullets if needed.
81
+ - Keep terminology exactly as in Context.
82
+
83
+ FORMAT:
84
+ - End the last line with citations like: [id_a, id_b]
85
  """
86
 
87
  def truncate(text, limit=CHUNK_LIMIT):