Research graph specification#
Source: packages/core/src/rvc_core/graph.py.
Nodes#
Node = entity id → entity version. Types: research_question, hypothesis, assumption, dataset,
dataset_split, preprocessing, methodology, model, code, config, run, result, metric, figure,
table, claim, manuscript, section, citation, note, decision, review_comment, rebuttal, release.
Stable identity is the entity id (dataset:mlqa-indic); each change creates a new immutable
version (version 1, 2, …, linked by previous).
Edges#
source --TYPE--> target reads "source TYPE target":
| Type | Typical use | Dependency direction |
|---|---|---|
| USES, DEPENDS_ON, DERIVED_FROM, PRODUCED_BY | run USES dataset; result PRODUCED_BY run | source depends on target (provenance, must be acyclic) |
| EVALUATES, IMPLEMENTS, REFERENCES | section REFERENCES table | source depends on target |
| SUPPORTS, CONTRADICTS, TESTS | run SUPPORTS claim; run TESTS hypothesis | target depends on source |
| SUPERSEDES, INVALIDATES, RESPONDS_TO, COMPARES_WITH, BELONGS_TO | decisions, rebuttals, repro attempts | not a dependency |
Every edge records the pinned source/target versions, origin (declared/inferred/system), creator, evidence, review status, and for inferred edges the model/heuristic and prompt version. Proposed (inferred) edges are excluded from dependency traversal until accepted; rejected edges are excluded always. Review = a new edge object replacing the old one in the snapshot.
Snapshots and history#
Each commit references one graph snapshot. Changing the current graph never alters earlier snapshots. Removing a node or edge removes it from the next snapshot only.
Operations#
ancestors / descendants (BFS over the dependency view), dependency paths (shortest first), impact analysis, evidence for a claim, contradictions, subgraph extraction, orphans, and stale dependency edges: a dependency pinned to a version of the depended-upon entity that is no longer current (e.g. a run that used dataset v1 after v2 was registered). Staleness changes current applicability, not historical validity.
Server-side, snapshots are indexed into snapshot_nodes/snapshot_edges and neighborhoods
are computed with recursive SQL (WITH RECURSIVE … LATERAL on PostgreSQL, a join-based
recursion on SQLite); results are identical to the in-memory traversal (tested).