Stage 2 завершён: problem-first ответы и follow-up continuity - ассистент переведён от entity-heavy логики к problem-first ответам с problem-unit слоем, удержанием контекста в follow-up и очисткой пользовательского ответа от сырых технических ссылок.
This commit is contained in:
@@ -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:");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user