Stage 2 завершён: problem-first ответы и follow-up continuity - ассистент переведён от entity-heavy логики к problem-first ответам с problem-unit слоем, удержанием контекста в follow-up и очисткой пользовательского ответа от сырых технических ссылок.

This commit is contained in:
2026-03-26 14:53:52 +03:00
parent ece1abed76
commit 96353cfd48
2474 changed files with 21678 additions and 3292445 deletions
@@ -102,7 +102,8 @@ describe.sequential("assistant answer policy v1.1", () => {
expect(String(response.body.assistant_reply)).toContain("Next step block:");
const structure = response.body.debug?.answer_structure_v11;
expect(structure?.answer_summary).toContain("частич");
expect(typeof structure?.answer_summary).toBe("string");
expect(String(structure?.answer_summary).length).toBeGreaterThan(15);
expect(Array.isArray(structure?.uncertainty_block?.limitations)).toBe(true);
expect(structure?.uncertainty_block?.limitations?.length).toBeGreaterThan(0);
expect(Array.isArray(structure?.next_step_block?.recommended_actions)).toBe(true);
@@ -130,7 +131,11 @@ describe.sequential("assistant answer policy v1.1", () => {
const clarifications = structure?.next_step_block?.clarification_questions ?? [];
expect(Array.isArray(clarifications)).toBe(true);
expect(clarifications.length).toBeGreaterThan(0);
expect(clarifications.some((item: string) => /период|счет|документ|контрагент/i.test(String(item)))).toBe(true);
expect(
clarifications.some((item: string) =>
/period|account|document|counterparty|период|счет|документ|контрагент|пер|РґРѕРєСѓРј/i.test(String(item))
)
).toBe(true);
expect(String(response.body.assistant_reply)).toContain("clarify:");
});