You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
search: operator-intent query shaping for long workflow prompts #303
Improve Cortex retrieval on long operator-style prompts by adding a product-side query-shaping / condensation path before search, instead of relying on the raw answer-contract prompt shape.
Problem
The cleaned real-pattern benchmark shows that long prompts like workspace digests and fact-quality audits still often miss top-1 retrieval even after harness noise was removed.
The benchmark harness now normalizes retrieval queries for evaluation, but Cortex itself still needs a stronger product-side path for handling these prompts.
Evidence
From the March 8 final live rerun:
Retrieval: 5/12 passed
Avg precision@k: 0.4167
Weak cases still include workspace-digest / fact-audit / operator summary prompts
Goal
When a user gives Cortex a long operator prompt with formatting/answer-contract boilerplate, Cortex should derive a cleaner search intent before ranking memories.
Proposed Scope
Add an internal query-shaping step for long operator prompts before search/retrieval
Strip or downweight answer-contract boilerplate when appropriate
Preserve the full raw prompt for the downstream reason lane
Add instrumentation so raw vs shaped query behavior can be compared in telemetry/debug output
Add deterministic tests using harvested real-pattern cases
Non-Goals
Do not silently change lifecycle state or belief writes
Do not hardcode a fix for one prompt family only
Do not loosen benchmark expectations just to make the score rise
Done When
targeted tests exist for operator prompt condensation / shaping
at least one current red real-pattern case becomes a real top-1 retrieval win for product reasons, not benchmark watering-down
Activity
hurttlocker commentedon Mar 11, 2026
Release-board hygiene note: