ARCH: удержать open-scope ranking через org clarification и year-switch

This commit is contained in:
2026-04-22 22:30:33 +03:00
parent aa0e4ec37e
commit 70325dacb6
18 changed files with 538 additions and 29 deletions
@@ -326,6 +326,7 @@ export function buildAssistantMcpDiscoveryDataNeedGraph(
const unsupported = lower(turnMeaning?.unsupported_but_understood_family);
const rawUtterance = lower(input.rawUtterance);
const aggregationAxis = lower(turnMeaning?.asked_aggregation_axis);
const seededRankingNeed = toNonEmptyString(turnMeaning?.seeded_ranking_need);
const explicitDateScope = toNonEmptyString(turnMeaning?.explicit_date_scope);
const explicitOrganizationScope = toNonEmptyString(turnMeaning?.explicit_organization_scope);
const subjectCandidates = (turnMeaning?.explicit_entity_candidates ?? [])
@@ -339,7 +340,7 @@ export function buildAssistantMcpDiscoveryDataNeedGraph(
});
const aggregationNeed = aggregationNeedFor(aggregationAxis);
const comparisonNeed = comparisonNeedFor(action);
const rankingNeed = rankingNeedFromRawUtterance(rawUtterance);
const rankingNeed = rankingNeedFromRawUtterance(rawUtterance) ?? seededRankingNeed;
const oneSidedOpenScopeTotalHint = hasOpenScopeOneSidedValueTotalHintUtf8Safe(rawUtterance, action);
const openScopeWithoutSubject =
subjectCandidates.length === 0 &&
@@ -359,9 +360,6 @@ export function buildAssistantMcpDiscoveryDataNeedGraph(
subjectCandidates.length === 0 &&
businessFactFamily === "value_flow" &&
openScopeWithoutSubject &&
!rankingNeed &&
!comparisonNeed &&
oneSidedOpenScopeTotalHint &&
!explicitOrganizationScope
) {
pushUnique(clarificationGaps, "organization");