ГЛОБАЛЬНЫЙ РЕФАКТОРИНГ АРХИТЕКТУРЫ - Рефакторинг этапов Stage 3.2 В оркестрации добавлено семантический арбитраж fallbackов (учет guard_hints и extraction) и followup-override для aggregate/unsupported кейсов. \ Убрано залипание в address_lane при carryover-контексте для кейса типа какие обороты ... за 2020, но сохранил защиту поддержанных интентов (list_open_contracts и т.п.), кроме strict deep-диагностики.
This commit is contained in:
@@ -2366,6 +2366,22 @@ Implemented in current pass (Stage 3.1 kick-off):
|
||||
- `assistantSemanticExtractionContract.test.ts` (new)
|
||||
- Existing router/chat regressions revalidated (`assistantLivingRouter.test.ts`, `assistantLivingChatMode.test.ts`).
|
||||
|
||||
Implemented in current pass (Stage 3.2 semantic route arbitration):
|
||||
1. Extended orchestration fallback arbitration with semantic hints:
|
||||
- `resolveAssistantOrchestrationDecision(...)` now evaluates semantic extraction hints (`guard_hints`, `extraction`) in addition to lexical flags.
|
||||
- Added followup-aware override path so unsupported aggregate carryover queries can still be redirected to deep-analysis lane.
|
||||
2. Reduced false route stickiness in followup turns:
|
||||
- Aggregate/unsupported questions with stale followup context no longer remain in address lane by default.
|
||||
- Supported intents (for example `list_open_contracts`) remain protected from accidental deep fallback unless strict deep-investigation cue is detected.
|
||||
3. Extended orchestration debug contract:
|
||||
- Added `semantic_route_arbitration` block (`supported_address_intent_detected`, `semantic_deep_investigation_hint_detected`, `semantic_aggregate_shape_detected`, `followup_semantic_override_to_deep_allowed`).
|
||||
4. Added/updated regression coverage for real failures:
|
||||
- `assistantLivingRouter.test.ts` now includes followup-carryover aggregate scenario (`какие обороты ... за 2020 год`) and validates deep fallback.
|
||||
- Existing list-open-contracts guard scenario remains green (`Покажи незакрытые договоры ...` stays in address lane).
|
||||
5. Validation snapshot:
|
||||
- Stage 3 focused suite: `10` files / `76` tests passed.
|
||||
- Type build: `npm --prefix llm_normalizer/backend run build` passed.
|
||||
|
||||
Acceptance (Stage 3):
|
||||
1. LLM outputs strictly validated schema for extraction/decomposition (no free-form).
|
||||
2. Deterministic guards can block or downgrade answers when evidence insufficient.
|
||||
|
||||
Reference in New Issue
Block a user