interplane.Get Omega
Read in your language

aien-architecture-mv

Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.

Brought by drakestapleton

branch main Branches Tags History

aien-architecture-mv / docs / 10-relational-path-engine.md

115 lines · 2301 bytes Raw Blame History Rendered
1# Relational Path Engine
2
3## Research basis
4
5PEARL (September 2026) makes relational paths first-class graph objects, contextualizes them against entity and global subgraph state, then scores paths relative to the query relation.
6
7AIEN should adopt the **idea**, not the Python/PyTorch/DGL implementation.
8
9The PEARL reference repository did not expose a root license file at the time of review, so do not copy source code unless licensing is clarified.
10
11## AIEN opportunity
12
13Build:
14
15```text
16aien-relation-graph
17aien-path-ranker
18```
19
20Use one path substrate across:
21
22- Cortex evidence reasoning,
23- Capability Graph routing,
24- J-Space plan comparison.
25
26## Path object
27
28```rust
29pub struct RelationalPath {
30 pub id: PathId,
31 pub start: NodeId,
32 pub end: NodeId,
33 pub nodes: SmallVec<[NodeId; 7]>,
34 pub edges: SmallVec<[EdgeId; 6]>,
35 pub digest: Digest32,
36}
37```
38
39## Cortex use
40
41Infer candidate relationships from:
42
43```text
44entity
45 -> claim
46 -> entity
47 -> evidence
48 -> entity
49```
50
51Predictions become `MemoryCandidate`s, never immediate facts.
52
53## Capability use
54
55Score complete execution paths:
56
57```text
58intent
59 -> skill
60 -> tools
61 -> credential
62 -> Machine
63 -> policy
64 -> effect class
65```
66
67This is more useful than scoring each skill independently.
68
69## J-Space use
70
71Make the trajectory that produced a candidate first-class:
72
73```text
74World A:
75 inspect -> patch -> test -> verify
76
77World B:
78 search -> alternate patch -> test -> verify
79```
80
81Store observed operations and evidence, not hidden chain-of-thought.
82
83## Adaptive exploration
84
85Combine PEARL-style contextual path scoring with a MOSAIC-like query-dependent exploration budget.
86
87Do not hard-code the same hop count and path count for every query.
88
89## Performance plan
90
91Start in Rust:
92
93- CSR graph,
94- compact integer IDs,
95- bounded bidirectional BFS,
96- `SmallVec`,
97- arenas/slabs,
98- Rayon for independent queries.
99
100Only move scoring kernels to Omega GPU kernels if profiling shows a real bottleneck.
101
102## First experiment
103
104Compare baseline routing/retrieval with path-context routing on:
105
106- top-1 skill accuracy,
107- top-5 skill accuracy,
108- invalid capability rate,
109- unavailable Machine selections,
110- Cortex evidence recovery,
111- J-Space time-to-valid-answer,
112- routing latency,
113- token cost.
114
115Stop if it does not produce clear value.