From 357be400f7a73fe2e075c8f70428e47e8d164833 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sun, 7 Jun 2026 18:50:16 -0700 Subject: [PATCH] docs: document typed-edge relational retrieval (v0.42.34.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLAUDE.md Search Mode: add relationalRetrieval to the knob table, the knobs_hash v=9→10 note, and a relational-retrieval summary. RETRIEVAL.md: add the relational recall arm to the pipeline diagram. Regenerate llms bundles (build:llms). Co-Authored-By: Claude Opus 4.8 (1M context) --- CLAUDE.md | 14 ++++++++++++++ docs/architecture/RETRIEVAL.md | 1 + llms-full.txt | 14 ++++++++++++++ 3 files changed, 29 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index cbdb58c52..6645fe69a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -149,6 +149,7 @@ project resolves through `src/core/search/mode.ts`. | `intentWeighting` | true | true | true | | `tokenBudget` | **4000** | **12000** | **off** | | `expansion` (LLM multi-query) | false | false | **true** | +| `relationalRetrieval` | false | **true** | **true** | | `searchLimit` default | 10 | 25 | 50 | **Cost anchors (downstream agent input cost — gbrain itself is rounding error).** @@ -207,6 +208,19 @@ written against `embedding` (1536d OpenAI). Existing v=2 rows become unreachable on first re-query (one-time miss spike on upgrade); `mode.ts:KNOBS_HASH_VERSION` is the single source of truth. +**v0.42.34.0 knobs_hash v=9 → v=10.** Folds the `relationalRetrieval` knob + +depth into the cache key so a relational-on result set can't be served to a +relational-off lookup (same contamination class as graph_signals). One-time +miss spike on upgrade. + +**Relational retrieval (v0.42.34.0).** `relationalRetrieval` (on for +balanced/tokenmax) adds a fourth recall arm: a relational query ("who invested +in X", "what connects A and B") resolves its seed entity and walks the typed-edge +graph (`src/core/search/relational-recall.ts` + `relational-intent.ts`, +`engine.relationalFanout`), injecting edge-derived answers into RRF. Within-source, +deterministic, mentions-excluded by default, pure no-op for non-relational queries. +The `query` op's `relational` flag forces it on/off per call. + **Three CLI surfaces:** gbrain search modes # what is running, with per-knob attribution diff --git a/docs/architecture/RETRIEVAL.md b/docs/architecture/RETRIEVAL.md index 82d0e2a98..4b2550b8c 100644 --- a/docs/architecture/RETRIEVAL.md +++ b/docs/architecture/RETRIEVAL.md @@ -123,6 +123,7 @@ expansion (if enabled) hybrid search: ├── vector (HNSW on chunk embeddings) ├── keyword (BM25 via tsvector) + ├── relational (v0.42.34.0: typed-edge recall arm — relational queries only) ├── source-aware re-rank (CASE in SQL) └── RRF fusion → top 30 │ diff --git a/llms-full.txt b/llms-full.txt index b19d484d5..69e8e8093 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -297,6 +297,7 @@ project resolves through `src/core/search/mode.ts`. | `intentWeighting` | true | true | true | | `tokenBudget` | **4000** | **12000** | **off** | | `expansion` (LLM multi-query) | false | false | **true** | +| `relationalRetrieval` | false | **true** | **true** | | `searchLimit` default | 10 | 25 | 50 | **Cost anchors (downstream agent input cost — gbrain itself is rounding error).** @@ -355,6 +356,19 @@ written against `embedding` (1536d OpenAI). Existing v=2 rows become unreachable on first re-query (one-time miss spike on upgrade); `mode.ts:KNOBS_HASH_VERSION` is the single source of truth. +**v0.42.34.0 knobs_hash v=9 → v=10.** Folds the `relationalRetrieval` knob + +depth into the cache key so a relational-on result set can't be served to a +relational-off lookup (same contamination class as graph_signals). One-time +miss spike on upgrade. + +**Relational retrieval (v0.42.34.0).** `relationalRetrieval` (on for +balanced/tokenmax) adds a fourth recall arm: a relational query ("who invested +in X", "what connects A and B") resolves its seed entity and walks the typed-edge +graph (`src/core/search/relational-recall.ts` + `relational-intent.ts`, +`engine.relationalFanout`), injecting edge-derived answers into RRF. Within-source, +deterministic, mentions-excluded by default, pure no-op for non-relational queries. +The `query` op's `relational` flag forces it on/off per call. + **Three CLI surfaces:** gbrain search modes # what is running, with per-knob attribution