Repository navigation
Make the lookup and assign paths hold on remote models; run the grounding eval against a remote provider (refs #3706, #3704) - #3716
Conversation
Code Review SummaryNet positive. Each fix answers a failure the remote-model eval actually surfaced, and the Rust changes are small and mostly well tested. I found no blockers. There is one formatting defect that Against #3706, this PR is measurement and grounding work, not the issue's core ask. Open or unmet:
Advanced:
The PR should say "refs", not "closes", for both issues. FindingsCritical IssuesNone. Important
Suggested Improvements
Nitpicks
Test quality
Recommendation: COMMENTNo blocker. The hint-direction and entity-cap points are small and best fixed in this PR. Run |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review: COMMENT (posted as a comment, GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary (f251740)Review verdict was COMMENT with no blockers. Addressed 9 of 11 points; 2 skipped with reasons. Addressed
Skipped
Also checked
Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: Each change answers a point the reviewer raised and is covered by a test that fails without it. The logic changes are small and local (a type check added to a hint that only fires after the store has already refused, a truncate-and-count after an insert, one threshold constant); the rest is documentation, tests and a rename. |
Re-review summary (a8f8b30..af216c1)Net positive; no blockers. The first-review fixes are present and match the address-review comment (type check in Important
Suggestions
Nitpicks
VerdictCOMMENT. No blocker; I would address item 1 (narrow the skip for marked compound requests, or pin it) and item 7 ( |
malibio
left a comment
There was a problem hiding this comment.
Automated pragmatic-code-review (re-review): COMMENT (posted as a comment, GitHub blocks self-approval). Full findings in the review comment above.
Address-review summary, second roundRe-review verdict was COMMENT with no blockers. Addressed 7 of the 9 points; 2 answered without a code change. Addressed
Answered without a code change
Eval claimsThe routing-time figures measure the request that was removed, not total turn time: turn time swung 13-23s run to run locally, so only the request-level figure is claimed, and the PR body says so.
Re-Review DecisionDecision: NO RE-REVIEW NEEDED Rationale: The one behavioral change is a narrowing of the skip (one more condition, with tests on both sides), the id change extends an already-reviewed helper to two read tools and adds a log line, and the rest is tests and comments. |
…ding eval against a remote provider (refs #3706, #3704) Measured on a reasoning remote model (Haiku 5.5) and a non-reasoning one (Gemma 4 31B): the first run of the Haiku suite was 4 of 7 stable. The failures had tool causes, now fixed: - search_nodes read a query of quote marks alone (what a model sends for an empty string written as JSON text) as a search for those marks, so a correct relationship filter returned nothing and the reply said no tasks. - create_relationship given a reverse name (a task's assignee) failed with a message naming neither working form; it now names the call from the declaring end under the forward name. - Graph Editing and Node Creation refuse a relationship written as a field and say to call create_relationship, but did not grant it; both do now. - A message saying me, my, mine or myself brings the database's owner into the resolved entities with their id and links, as a named person gets them. The current-user line names the owner by id even when the name and email are blank, where it used to drop out and leave the model asking for an id. Eval: NS_MODEL=openai-compat:<config-id>:<model> runs the suite against a provider configured on the served database (preflight checks the provider and that the model is loaded); an assign scenario passes only on a successful create_relationship; a count-for-me scenario names the owner; a full pass with few tools is believed when the replies vary. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
…y cap, tighten the eval guard (refs #3706) - create_relationship's reverse-name hint applies only when the other node is of the type that declares the relationship (a project, which holds its own tasks, no longer sends a task to a person), and it keeps the store's answer beside it. query_ops::type_extends reads the extends chain for any type id. - The owner joining the resolved entities respects MAX_RESOLVED_ENTITIES: the weakest match is cut and counted as not shown. The English-only match, the dropped none-found for other names and the owner in the duplicate guard are documented and pinned by tests. - normalize_enumerate_query is pinned against returning the quote-trimmed form. - The eval guard believes varied replies only beside two kinds of tool, with the boundary tested; preflight steps renumbered; a formatting slip fixed. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
…rose around them (refs #3706, #3704) - A question about what the workspace holds is already read as a lookup of the message whatever Stage 1 answers, so the Stage-1 generation, the first of the turn's sequential requests, is not made for it (routing::lookup_without_stage1). Clarification answers and every message that asks for a change still go to Stage 1. Measured: routing time per lookup turn fell from 540-800ms to 24-64ms on remote models and a 2.5s request is removed on the local one. - node_id_arg reads a node id written with its label (a small model copies 'Plan the offsite task ID (<uuid>)' into the id argument) when the text holds exactly one UUID; get_node, update_node, create_relationship and update_task_status use it. Deletes keep the strict form. - Agent-loop tests that scripted a Stage-1 reply for a settled lookup now use a request to find, which still reaches Stage 1; a new test pins the skip. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
…ir visible (refs #3706, #3704) - The Stage-1 skip also requires that no word of the message asks for a change, so a question that ends in a question mark and also asks for one keeps its Stage-1 pass (and a possible split). The grounding eval's lookups are pinned as settled; the skip is logged as routing_stage1_skipped. - node_id_arg returns early for text shorter than a UUID, logs a repaired id at debug, and is used by get_related_nodes and get_node_context as well. - Loop-level tests: a clarification answer and a compound question both still make the Stage-1 request. Both skip tests were seen to fail without the skip. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj
c688f75 to
4ec684a
Compare
What this does
Runs the grounding eval against remote models and fixes what it found. The first Haiku 5.5 run was 4 of 7 stable; every failure had a cause in the tools or the context, not in the model. It also removes the first of a lookup turn's sequential requests, and reads ids a small model writes with their labels.
Fixes
search_nodesread aqueryof quote marks alone (""written as JSON text) as a search for those marks, so a correct relationship filter returned nothing and the reply said "no tasks". Quote-only queries now mean an empty query. A test fails without the fix.create_relationshipgiven a reverse name (a task'sassignee) failed with a message that named neither working form. It now names the call: from the declaring end (the person), under the forward name (tasks). The hint applies only between the types the name relates, and the store's own answer stays beside it.create_relationship, but did not grant that tool. Both grant it now. The Stage-2 golden changes by that one tool definition.decision_on_the_message_alone), so the generation that precedes it is not made (routing::lookup_without_stage1). Clarification answers and every message that asks for a change still go to Stage 1. Routing time per lookup turn fell from 540-800ms to 24-64ms on the remote models; on the local model the removed request took ~2.5s.node_id_argreads an id written with its label (Plan the offsite task ID (<uuid>), which the 4B model writes) when the text holds exactly one UUID. Used byget_node,update_node,create_relationship,update_task_status; deletes keep the strict form.Eval
NS_MODEL=openai-compat:<config-id>:<model>runs the suite against a provider configured on the served database. Preflight checks the provider exists and the model is loaded.create_relationship; an errored call used to pass (so earlier "assign 3/3" local results overstated it).count-for-mescenario; the fixture names the seeded owner.Measured (final tree; 8 scenarios × 3 reps)
The local model fails
assign-to-person0 of 3: it gets theupdate_noderefusal and thecreate_relationshiphint (both namerelationship_type 'tasks') and sends an inventedassigned_toanyway.status-of-assignedandcount-for-mepass 3 of 3 on it.Local request timings (the follow-up request, which re-sends the same tools, is 2.5s because of the prefix cache; the first request's 6.7K-token prefill is ~14s of the ~15s) show where the remaining cost is: the size of the first request.
Before the fixes Haiku was 4 of 7 stable (
count-first-nameandcount-missing-prepositionflipped on the quote-only query;assign-to-personfailed 2 of 3 with nocreate_relationshipin its tool surface).Test plan
bun run test:changedbun run quality:fixcloses #3706; refs #3704
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y6xprEu6D5YSLfMUWqZsoj