Skip to content

Relationship Management never routes for natural 'point at'/'link'/'connect' phrasing #2548

Closed

Description

@malibio

Overview

create_relationship scenarios in the dev-workflow matrix (11c, 11c2, 12d, 13) fail with ⊗ excluded (tool not offered: create_relationship) across every rep — this is a deterministic routing loss, not an intermittent flip.

Problem Statement

Retrieval never places Relationship Management in Stage-2's top-3 for the matrix's link-creation prompt, so the model can never call create_relationship on that turn no matter how capable it is.

Found while running the dev-workflow matrix (bun run eval:agent, gemma-4-e4b-q4km, --runs 3) against a fresh isolated test DB, while verifying an unrelated fix to skill retrieval.

Evidence — find_skills's all_scores diagnostic (logs every retrieved skill's score, not just the winner's) for the scenario 11c prompt, identical across all 3 reps:

find_skills executed query="point rebuild task at the decision it has to respect"
all_scores=Graph Editing=0.829, Node Deletion=0.822, Node Creation=0.815

Relationship Management's own score does not even appear in the printed top-3 — it loses outright, by a wide margin, to three skills with no obvious relevance to linking two nodes. This reproduced identically in all 3 reps: a stable ranking loss, not a near-tie.

Root Cause

Relationship Management's seeded description in packages/agent/src/skill_pipeline.rs:

"Create connections between nodes, explore relationships, and traverse the knowledge graph."

is generic rather than discriminative. Per ADR-064 rule 3, a skill's description is the index key for semantic retrieval, and "a description built from generic verbs becomes a semantic attractor that captures unrelated intents, degrading retrieval for every other skill in the registry." The same ADR records that rewriting skill descriptions from generic verbs into natural situational phrasing moved rank-1 retrieval from 35% to 75% in a prior measurement — this is the same failure mode, for this one skill.

The description never uses the words a user would actually say — "point at," "link," "connect," "relate," "associate" — so it loses to skills whose descriptions happen to score higher on this phrasing purely by embedding accident, not relevance.

Proposed Solution

Rewrite Relationship Management's description with natural situational phrasing that uses the verbs users actually say for linking two things, following the project's established rule for skill descriptions (see packages/agent/src/skill_pipeline.rs's Node Deletion skill and its accompanying comment): positive verbs only, no negation or disclaimer clause — embeddings have no concept of negation, so excluding other intents by name pulls the skill toward them rather than away.

A candidate direction (not final wording — needs live measurement against the matrix, same as any skill-description change): work in "point," "link," "connect," or "relate" alongside the existing relationship/graph-traversal language, then re-run the matrix to confirm the scenario 11c/11c2/12d/13 chain routes and passes.

Acceptance Criteria

  • Relationship Management's description is rewritten to include natural link/connect phrasing
  • find_skills's all_scores for the scenario 11c prompt ("point rebuild task at the decision it has to respect") shows Relationship Management in the top-3
  • The matrix's 11c/11c2/12d/13 chain passes (or at minimum stops excluding as tool not offered) across repeated reps
  • No regression in retrieval for prompts that currently route correctly to other skills (Schema Creation, Node Creation, Organization, etc. — spot-check against packages/agent/tests/live_skill_retrieval_stability.rs's control case pattern)
  • Code passes bun run quality:fix
  • Tests pass (bun run test:all)

Technical Specifications

Reference Files

  • Skill description: packages/agent/src/skill_pipeline.rs — Relationship Management's NodeTemplate entry ("description" field)
  • Retrieval mechanism: packages/core/src/ops/skill_ops.rs::find_skills — now calls semantic_search_nodes_of_type (pure KNN over skill-typed roots)
  • Diagnostic: all_scores log field on find_skills executed (core) / two-stage routing overhead (agent) — every retrieved skill's raw score, not only the winner's; use it to verify a description change moves the ranking rather than guessing from pass/fail alone
  • Existing regression test pattern: packages/agent/tests/live_skill_retrieval_stability.rs — a live-embedding-model test asserting a skill clears RETRIEVAL_TOP_K across repeated reps; a similar test for Relationship Management would close the same kind of coverage gap this file closed for Schema Creation

Verification approach

Reproduce with:

NS_BIN=target/release/nodespace NODESPACED_SOCKET=/tmp/nodespaced-test/daemon.sock \
NS_LOG=/tmp/nodespaced-test/daemon.log NS_MODEL=gemma-4-e4b-q4km \
  bun run eval:agent <label> [out.json] --runs 3

against a freshly purged test DB (see nodespace-docs/development/agent-eval.md), then grep the daemon log for all_scores on the 11c/11c2/12d/13 turns.

Related Issues

Activity

  1. malibio commented on Sep 10, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 4925 passed (239 test files)

  2. self-assigned this
    on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions