fix: surface retrieved evidence when model abstains
This commit is contained in:
@@ -256,6 +256,11 @@ class AgentSkillTests(unittest.TestCase):
|
||||
}
|
||||
refusal = "لم يتم العثور على مقاطع تجيب مباشرة على السؤال في فهرس المعرفة المحلي."
|
||||
live_refusal = 'لا يوجد مقطع في فهرس المعرفة المحلي يجيب مباشرة على السؤال "How are old conversation answers migrated?".'
|
||||
natural_refusals = (
|
||||
"المعلومات المتوفرة لا تجيب على سؤالك حول أي خدمة تفرغ التسجيلات الصوتية.",
|
||||
"المعلومات المتاحة لا تجيب مباشرة على السؤال حول كيفية ترحيل الإجابات القديمة.",
|
||||
"The available information doesn't answer the question.",
|
||||
)
|
||||
with (
|
||||
patch(
|
||||
"app.main._search_local_knowledge",
|
||||
@@ -282,6 +287,8 @@ class AgentSkillTests(unittest.TestCase):
|
||||
citation_only = "المقطع `routing.md`, المقطع 0."
|
||||
self.assertTrue(_is_knowledge_answer_insufficient(refusal))
|
||||
self.assertTrue(_is_knowledge_answer_insufficient(live_refusal))
|
||||
for natural_refusal in natural_refusals:
|
||||
self.assertTrue(_is_knowledge_answer_insufficient(natural_refusal))
|
||||
self.assertTrue(_is_knowledge_answer_insufficient(citation_only))
|
||||
self.assertFalse(_is_knowledge_answer_insufficient("تضيف الهجرة selected_version."))
|
||||
self.assertIn("لم يصغ النموذج جوابًا كافيًا رغم وجود نتائج", result["result"])
|
||||
|
||||
Reference in New Issue
Block a user