Skip to content

test(retain): judge agent-experience classification instead of counting fact types - #5525

Merged
nicoloboschi merged 1 commit into
mainfrom
fix/test-agent-experience-judge
Oct 12, 2026
Merged

nicoloboschi merged 1 commit into
mainfrom
fix/test-agent-experience-judge

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

Core LLM tests fail consistently on test_user_interaction_classified_as_experience: it asserted more 'experience' than 'world' facts, but since #2440 the extraction prompt (correctly) classifies the user's request and approval as 'world', so a right answer (2 user facts world, 2 agent actions experience) fails.

Rewrites the two count-based tests in test_fact_extraction_agent_experience.py to use assert_meets_criteria with a [fact_type] fact summary, per CLAUDE.md:

  • agent's own actions must be 'experience'
  • user's statements must be attributed to the user (world, or as context inside an agent fact), never claimed as the agent's own

No production prompt change. Ran locally against Gemini twice: 4/4 pass.

…ng fact types

Since #2440 the extraction prompt classifies the user's requests, approvals
and preferences as 'world' even when stated during an agent interaction;
only the agent's own actions are 'assistant' -> 'experience'. The
user-interaction test still required experience > world by count, so a
correct 2/2 split (user request + approval as world, agent actions as
experience) failed Core LLM tests consistently.

Replace the count asserts in the code-change and user-interaction tests
with the LLM judge: the agent's own actions must be 'experience', and the
user's statements must be attributed to the user, never to the agent.
@nicoloboschi
nicoloboschi merged commit ddcfb12 into main Oct 12, 2026
228 of 232 checks passed
@nicoloboschi
nicoloboschi deleted the fix/test-agent-experience-judge branch October 12, 2026 10:44
@nicoloboschi nicoloboschi mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant