n8n/packages
Arvin Ansari 390b697cd7
feat(core): Grade the agent's context state in Instance AI evals (no-changelog)
Eval cases had two grading surfaces: `processExpectations`, judged on the build
conversation, and `outcomeExpectations`, judged on the built workflow. Neither
observes the memory subsystem, so a memory comparison could only be measured
end-to-end — a score delta was not attributable to retrieval rather than to a
luckier build.

Add a third kind, `memoryExpectations`, graded against context state the harness
already captured and discarded: run debug is stashed on every build, and
`parseSystemPromptForDisplay` / `parseUsageSummary` already parse it. No product
change is needed.

It gets its own judge call with its own rubric, whose only inputs are the final
compressed observation block, the raw message window the model received, and the
final system prompt. The conversation judge is handed the full transcript, which
would let it satisfy "the agent still knew X" from the turn where X was first
said — the confound this kind exists to remove. The raw window is not the
transcript: evicted messages are absent from it, which is why it can be trusted
as a record of what the agent still had.

A fact counts as retained if it appears in any of the three tiers. The Observer
only compresses past a token threshold, so on a short thread the observation
block is legitimately empty while every fact sits in the raw window; grading on
the block alone would fail every memory expectation for a structural reason on
exactly the short threads the suite is mostly made of.

Verdicts carry `kind: "memory"` on every path — judged, ungraded and
judge-error — since the report badge and `eval-results.json` filter on it.

`stashBuildExpectations` previously early-returned once any expectation was
ungraded. With three kinds a case can legitimately have ungraded memory
expectations and gradable outcome ones at once, so the verdict sets are now
merged; the early return would have dropped the latter and shrunk the pass-rate
denominator. `stashRunDebug` now runs just before it at all three call sites, so
the memory judge can read the capture.
2026-08-20 11:51:54 +02:00
..
@n8n feat(core): Grade the agent's context state in Instance AI evals (no-changelog) 2026-08-20 11:51:54 +02:00
cli feat(API): Add Git connections public API (no-changelog) (#36272) 2026-08-20 07:28:36 +00:00
core fix(core): Wrap a trigger's closeFunction in an expression isolate at creation time (#36638) 2026-08-20 08:03:10 +00:00
extensions/insights 🚀 Release 2.34.0 (#35487) 2026-08-04 07:14:55 +00:00
frontend feat(API): Add Git connections public API (no-changelog) (#36272) 2026-08-20 07:28:36 +00:00
modules refactor(editor): Extract instance-registry into a frontend module package (no-changelog) (#36325) 2026-08-18 12:00:24 +00:00
node-dev chore: Set up repository for TypeScript 7 migration (#33890) 2026-07-09 13:21:16 +03:00
nodes-base feat(API): Add Git connections public API (no-changelog) (#36272) 2026-08-20 07:28:36 +00:00
testing ci: Explain single-instance duplicate findings instead of counting them (#36566) 2026-08-20 06:54:29 +00:00
workflow fix(core): Only init the expression engine for commands that evaluate expressions (#36538) 2026-08-19 15:36:45 +00:00