Effort: thorough
The 688K-edge knowledge graph is exposed at /graph (site/graph.html)
but only over canonical entities (genes, diseases). The richer
artifact_links table (which captures relationships like
cites, synthesizes, derived_from, debates, supersedes,
responds_to) is invisible to users.
Build a "relationship graph" viewer rooted at any artifact id that
expands its full N-hop neighborhood across artifact_links, so users
can trace "this hypothesis was synthesized by that brief, which cites
this paper, which is debated in this session, which answered this
open question". Today there's no way to see this lineage.
GET /relationship-graph/{artifact_id} in api.py.depth (default 2, max 4),link_types (csv filter, default all), directionout / in / both, default both).
/api/relationship-graph/{artifact_id}.json returning{nodes: [{id, type, title, score, ...}], edges: [{src, dst,
type, created_at}]}. Bounded: hard cap of 200 nodes pertruncated_at_node_count flag.
site/relationship-graph.html, link-type colored, node-shape?to=<other_artifact_id> returns shortest pathrelationship_view artifactdepth=2 returns the right neighborhood, depth=4/relationship-graph/<top-AD-hypothesis-id>?depth=3 andartifact_links schema and the existing link types in useSELECT DISTINCT link_type FROM artifact_links).
scidex/atlas/relationship_graph.py — recursive CTE in PG withsite/relationship-graph.html reusingsite/graph.html. New file, no edit tosite/graph.html.
artifact_registry with{root, depth, link_types, direction, snapshot_node_ids}.
e352460b-2d76 — view_spec_json DSL (only used for embeddedartifact_links table.Approach taken:
artifact_links: 20 valid link types in chk_link_type constraint; 3.4M rows dominated by see_also, related, mentions. Notable semantic types: cites (224), derives_from (11K), supports (1.5K).scidex/atlas/relationship_graph.py with get_neighborhood() and find_shortest_path().relationship_view to ARTIFACT_TYPES in artifact_registry.py.api.py:GET /relationship-graph/{artifact_id} — HTML page, injects ROOT_ARTIFACT_IDGET /api/relationship-graph/{artifact_id}.json — JSON BFS/path responsePOST /api/relationship-graph/save-view — register view as artifact
site/relationship-graph.html: SVG D3 force-directed graph; link-type colored; node-shape by type (diamond=hypothesis, square=analysis/notebook/dataset, circle=default); click→artifact page; hover tooltip; depth/direction/link-type controls; shortest-path highlighted in gold.tests/atlas/test_relationship_graph.py — all pass.depth=3 from top AD hypothesis (hypothesis-h-var-de1677a080) returns 200 nodes (truncated), 12 distinct link types — well above the ≥10 nodes / ≥3 types threshold.