feat(gds skill): teach graph-analyst to drive complex topology searches onto Neo4j GDS instead of naive Cypher#70
Merged
Conversation
Adds a graph-data-science skill scoped to the graph-analyst that names GDS/APOC advantages and best-fit scenarios (pathfinding, reachability, centrality, community, similarity, multi-hop) with a naive-query smell test and a scenario->algorithm decision map, so the agent stops hand-rolling naive Cypher when a graph algorithm fits. Complements (does not duplicate) the graph-query skill's Section 8. Wires a minimal load pointer in the graph-analyst agent. 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
…al/trajectory similarity ±time) Adds the section the skill exists for: routing complex topology searches off naive Cypher — centrality, topological/structural similarity (nodeSimilarity/KNN/FastRP), and similar event PATHS/trajectories with-or-without a time dimension (set-similarity vs transition-signature), plus pathfinding and a non-lineage projection recipe. 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
…ighting, read-only vector-KNN, co-occurrence projection, GDS-vs-intent boundary) Lifts six vetted patterns from a real context-intelligence graph exploration into the GDS skill: TF-IDF weighting to defeat glue-tool dominance in similarity; a read-only vector-property gds.knn fallback (no bipartite edges); a derived co-occurrence/teaming projection (distinct from the edge-less Agent-node dead end); apoc.map.fromPairs/apoc.coll.sort as a fourth primitive; a read-only .stream/.stats vs .write/.mutate guardrail; and a 'When GDS itself isn't enough' boundary (structure vs intent -> escalate to LLM embeddings). 🤖 Generated with [Amplifier](https://github.com/microsoft/amplifier) Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new, lean, graph-analyst-only skill
skills/context-intelligence-gds/SKILL.md(v1.2.0) that teaches the graph-analyst to drive complex topology searches onto Neo4j GDS / APOC instead of naive Cypher. The skill covers:gds.nodeSimilarity,gds.knn(Jaccard/cosine), andfastRPembeddingsAlso adds a ~10-line load pointer in
agents/graph-analyst.md. The skill is picked up only by the graph-analyst via that agent's whole-skills/-dir mount; it does not leak into the root session (not added to the analysis behavior's skill list). The existingcontext-intelligence-graph-queryskill is untouched (no pollution).Motivation: Earlier live analysis of the graph-analyst's own query history found ~37% of its 467 queries were GDS/APOC-improvable, yet it reached for those tools only ~4% of the time. This skill closes that gap by making the agent recognize where GDS wins and teaching it when to reach for each algorithm.
Scope / guardrails
This change is agent + skill wiring only — no Python library changes, no tool changes, no hook/config changes. The seam crossed is skill discovery/loading (graph-analyst mounts
skills/dir).Deliberately untouched:
fanout.py/_DestinationDispatcher/logging_handler.py) — this is read-side onlycontext-intelligence-graph-queryskill — not modifiedfeat/doesn't alter core compositionscripts/validate-full.shto confirm)Verification
ruff check+ruff format --checkclean — N/A (no Python/markup changes in modules)pyrightclean — N/A (no Python code)scripts/validate-full.sh✅ (the lone mode-advertising FALSE POSITIVE documented in AGENTS.md applies; no new errors)Real evidence on seams (not mock-only)
Seam crossed: skill discovery/loading + agent wiring — the graph-analyst mounts
skills/dir and callsload_skill()at runtime.Validation: Digital Twin Universe before/after A/B against the live private-home-server graph (read-only, ~3,388 sessions, real Neo4j data). Two arms ran 5 trials each:
Caveat 1 (scenario design): An earlier scenario (depth-3 delegation trees) showed no effect because naive Cypher was legitimately correct there — the skill's value only appears on genuinely hard topology tasks. The topology-similarity scenario was the "hard" case that forces the algorithm choice.
Caveat 2 (run truncation): 9/10 DTU runs were truncated at 1500s exec cap under parallel LLM contention. The tool-choice signal is complete/decisive (the agent picked GDS for similarity, Cypher for simple counts), but final answer completeness was not measured end-to-end. The queries executed cleanly; the run timeout was orchestration overhead.
Caveat 3 (v1.2.0 additions not yet validated): The skill's v1.1.0 (lineage + topology searching) was A/B tested. The v1.2.0 additions — TF-IDF weighting to defeat glue-tool dominance, read-only vector-property KNN fallback, co-occurrence projection recipe, and GDS-vs-intent boundary — were lifted from a real graph exploration (context-intelligence-exploration-example.md) and added post-evaluation. They are not yet DTU-validated as a set; only their component patterns have been exercised individually.
Docs & diagrams
bundle.dot/bundle.png— N/A (no bundle structure change; skill is discovered dynamically)skills/context-intelligence-gds/SKILL.mdis complete (v1.2.0, 285 lines including full scenario index and worked recipes)agents/graph-analyst.md) — updated with 10-line load pointer and no other changesNotes / follow-ups