fix(rectification): ask reverse-inference probes at engine dasha months
Keep Vimshottari/Narayana start dates instead of truncating to year, so same-year month splits can appear on the choice card. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -729,7 +729,7 @@ function remainingQuestion(
|
||||
layer: string,
|
||||
layerLabel: string,
|
||||
): string {
|
||||
return `引擎给出的区分机会绑定 ${layerLabel}。按 Opportunity 的年份、领域和 expected_outcomes 改写成自然语言,不得发明年份、事件事实或候选映射。`;
|
||||
return `引擎给出的区分机会绑定 ${layerLabel}。按 Opportunity 的时间范围、领域和 expected_outcomes 改写成自然语言,不得发明年份、事件事实或候选映射,不得改写时间范围。`;
|
||||
}
|
||||
|
||||
function remainingOutcomes(
|
||||
|
||||
@@ -113,6 +113,8 @@ export type MethodFollowup = Readonly<{
|
||||
semantic_key?: string;
|
||||
candidate_split_hash?: string;
|
||||
probe_year?: number;
|
||||
year_label?: string;
|
||||
probe_month?: number;
|
||||
choice_kind?: "existence" | "varga_style" | "event_quality";
|
||||
candidate_ids?: readonly string[];
|
||||
expected_outcomes?: DiscriminatingEventProbe["expected_outcomes"];
|
||||
@@ -497,7 +499,13 @@ function followupOwnedProbe(
|
||||
if (styleOptions.length !== 4) return null;
|
||||
return {
|
||||
year: item.probe_year ?? 0,
|
||||
year_label: item.probe_year ? `${item.probe_year} 年前后` : "当前这几个候选",
|
||||
year_label: item.year_label
|
||||
?? (item.probe_year && item.probe_month
|
||||
? `${item.probe_year} 年 ${item.probe_month} 月前后`
|
||||
: item.probe_year
|
||||
? `${item.probe_year} 年前后`
|
||||
: "当前这几个候选"),
|
||||
...(item.probe_month ? { month: item.probe_month } : {}),
|
||||
domain: item.domain as EventProbeDomain,
|
||||
event_family: followupEventFamily(item.domain, kind),
|
||||
source: "dasha_activation",
|
||||
@@ -579,7 +587,7 @@ function agentHint(
|
||||
extra = "",
|
||||
evidence: readonly MethodFollowupEvidence[] = [],
|
||||
): string {
|
||||
return `${why}本题绑定 ${varga}。${extra}${recordedKindYearHint(evidence)}点选卡只出 A/B/C/D。用简体中文自己写一句追问;年份和事件家族以 choice_frame.period 与探针为准,不得发明年份,不得改问其他领域,不得把探针年份说成已经发生的事实。不要调用 set-focus。正文不要复述选项。`.replace(/\s+/g, " ").trim();
|
||||
return `${why}本题绑定 ${varga}。${extra}${recordedKindYearHint(evidence)}点选卡只出 A/B/C/D。用简体中文自己写一句追问;时间范围和事件家族以 choice_frame.period 与探针为准,不得发明年份,不得改写时间范围,不得改问其他领域,不得把探针时间说成已经发生的事实。不要调用 set-focus。正文不要复述选项。`.replace(/\s+/g, " ").trim();
|
||||
}
|
||||
|
||||
export function shouldAttachChoiceFrame(
|
||||
@@ -995,6 +1003,8 @@ export function buildMethodFollowupPlan(input: {
|
||||
semantic_key: liveProbe.semantic_key,
|
||||
candidate_split_hash: liveProbe.candidate_split_hash,
|
||||
probe_year: liveProbe.year,
|
||||
year_label: liveProbe.year_label,
|
||||
probe_month: liveProbe.month,
|
||||
choice_kind: liveProbe.choice_kind,
|
||||
candidate_ids: liveProbe.candidate_ids ?? candidateIdsFromProbe(liveProbe),
|
||||
expected_outcomes: liveProbe.expected_outcomes,
|
||||
@@ -1093,6 +1103,8 @@ export function buildMethodFollowupPlan(input: {
|
||||
semantic_key: conflictProbe.semantic_key ?? `${conflictProbe.domain}.${conflictProbe.year}`,
|
||||
candidate_split_hash: conflictProbe.candidate_split_hash,
|
||||
probe_year: conflictProbe.year,
|
||||
year_label: conflictProbe.year_label,
|
||||
probe_month: conflictProbe.month,
|
||||
choice_kind: conflictProbe.choice_kind ?? "existence",
|
||||
candidate_ids: conflictProbe.candidate_ids ?? candidateIdsFromProbe(conflictProbe),
|
||||
expected_outcomes: conflictProbe.expected_outcomes,
|
||||
|
||||
@@ -205,6 +205,7 @@ export type ProbeExpectedOutcome = Readonly<{
|
||||
export type DiscriminatingEventProbe = Readonly<{
|
||||
year: number;
|
||||
year_label: string;
|
||||
month?: number;
|
||||
domain: EventProbeDomain;
|
||||
event_family: string;
|
||||
source: EventProbeSource;
|
||||
@@ -511,6 +512,9 @@ export function parseEventProbes(
|
||||
const family = asText(row?.event_family, 80);
|
||||
const meaning = asText(row?.user_meaning, 160);
|
||||
const label = asText(row?.year_label, 40);
|
||||
const month = typeof row?.month === "number" && Number.isInteger(row.month) && row.month >= 1 && row.month <= 12
|
||||
? row.month
|
||||
: null;
|
||||
if (
|
||||
!row
|
||||
|| year === null
|
||||
@@ -536,6 +540,7 @@ export function parseEventProbes(
|
||||
const probe: DiscriminatingEventProbe = {
|
||||
year,
|
||||
year_label: label,
|
||||
...(month ? { month } : {}),
|
||||
domain: domain as EventProbeDomain,
|
||||
event_family: family,
|
||||
source: source as EventProbeSource,
|
||||
|
||||
Reference in New Issue
Block a user