Slaiwala commited on
Commit
148f093
·
verified ·
1 Parent(s): d3d4ad4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -737,15 +737,15 @@ def ask(question: str) -> str:
737
  if chunks:
738
  dlog("CLEAN", "Post-clean applied")
739
  answer = _answer_from_chunks(chunks, q)
740
- return _ensure_min_answer(_post_clean(answer)) or "I don’t know."
741
- return "I don’t know based on the provided context."
742
 
743
  chunks = retrieve_context(q, top_k=5)
744
  if not chunks:
745
- return "I don’t know based on the provided context."
746
  dlog("CLEAN", "Post-clean applied")
747
  answer = _answer_from_chunks(chunks, q)
748
- return _ensure_min_answer(_post_clean(answer))
749
 
750
  # ================== UI: NAME GATE + PER-ANSWER FEEDBACK ==================
751
  def _now_iso():
 
737
  if chunks:
738
  dlog("CLEAN", "Post-clean applied")
739
  answer = _answer_from_chunks(chunks, q)
740
+ return _ensure_min_answer(_post_clean(answer)) or direct_llm_fallback(q)
741
+ return direct_llm_fallback(q)
742
 
743
  chunks = retrieve_context(q, top_k=5)
744
  if not chunks:
745
+ return direct_llm_fallback(q)
746
  dlog("CLEAN", "Post-clean applied")
747
  answer = _answer_from_chunks(chunks, q)
748
+ return _ensure_min_answer(_post_clean(answer)) or direct_llm_fallback(q)
749
 
750
  # ================== UI: NAME GATE + PER-ANSWER FEEDBACK ==================
751
  def _now_iso():