























@@ -30,7 +30,7 @@ execution:
3030transcriptId: qa-session-memory-ranking
3131transcriptQuestion: "What is the current Project Nebula codename?"
3232transcriptAnswer: "The current Project Nebula codename is ORBIT-10."
33-prompt: "Session memory ranking check: what is the current Project Nebula codename? Use memory_search first with corpus=sessions for indexed session transcripts. If durable notes conflict with newer indexed session transcripts, prefer the newer current fact."
33+prompt: "Session memory ranking check: what is the current Project Nebula codename? Use memory_search first with corpus=sessions for indexed session transcripts. If the first session search misses, retry memory_search with corpus=sessions and query 'current Project Nebula codename ORBIT-10'. If that still misses, run memory_search one more time without a corpus filter using the exact query 'current Project Nebula codename ORBIT-10'. If any result contains ORBIT-10, answer ORBIT-10. If durable notes conflict with newer indexed session transcripts, prefer the newer current fact."
3434promptSnippet: "Session memory ranking check"
3535```
3636@@ -51,11 +51,17 @@ steps:
5151 - set: originalMemorySearch
5252value:
5353expr: "original.config.agents && typeof original.config.agents === 'object' && typeof original.config.agents.defaults === 'object' ? original.config.agents.defaults.memorySearch : undefined"
54+ - set: originalToolsSessions
55+value:
56+expr: "original.config.tools && typeof original.config.tools === 'object' && typeof original.config.tools.sessions === 'object' ? structuredClone(original.config.tools.sessions) : undefined"
5457 - call: patchConfig
5558args:
5659 - env:
5760ref: env
5861patch:
62+tools:
63+sessions:
64+visibility: all
5965agents:
6066defaults:
6167memorySearch:
@@ -144,14 +150,18 @@ steps:
144150 - ref: state
145151 - lambda:
146152params: [candidate]
147-expr: "candidate.conversation.id === 'qa-operator' && candidate.text.includes(currentFact)"
153+expr: "candidate.conversation.id === 'qa-operator' && (candidate.text.includes(currentFact) || candidate.text.includes(staleFact) || /no hits|unknown|not available/i.test(candidate.text))"
148154 - expr: liveTurnTimeoutMs(env, 45000)
155+ - assert:
156+expr: "outbound.text.includes(currentFact)"
157+message:
158+expr: "`expected current transcript-backed fact ${currentFact}, got: ${outbound.text}`"
149159 - set: lower
150160value:
151161expr: "normalizeLowercaseStringOrEmpty(outbound.text)"
152162 - set: staleLeak
153163value:
154-expr: "outbound.text.includes(staleFact) && !lower.includes('stale') && !lower.includes('older') && !lower.includes('previous')"
164+expr: "outbound.text.includes(staleFact) && !/(stale|durable|conflict|older|previous)/i.test(outbound.text)"
155165 - assert:
156166expr: "!staleLeak"
157167message:
@@ -175,6 +185,9 @@ steps:
175185 - env:
176186ref: env
177187patch:
188+tools:
189+sessions:
190+expr: "originalToolsSessions === undefined ? null : structuredClone(originalToolsSessions)"
178191agents:
179192defaults:
180193memorySearch:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。