You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
12
12
### Changed
13
13
14
-
-**Incremental symbol embedding refresh**: Only changed `SymbolVectorEmbedding` rows are deleted and reinserted while a healthy HNSW is retained; the index is created only for bootstrap or missing-index recovery. In a direct spike, this was 18.5x faster than the prior drop-and-rebuild path for 50 changed rows out of 26,000, with ANN results durable after close/reopen; this is evidence, not an SLA. Migration 26 copies complete legacy vectors in-database. Legacy `Symbol` embedding columns remain inert for compatibility, and upgraded databases may also retain legacy `Symbol` HNSW indexes until a safe rebuild.
14
+
-**Incremental symbol embedding refresh**: Only changed `SymbolVectorEmbedding` rows are deleted and reinserted while a healthy HNSW is retained; the index is created only for bootstrap or missing-index recovery after at least one complete model row exists. Repository-local cleanup removes only changed-file ownership links, preserves shared Symbol vectors, and deterministically transfers their canonical owner. Symbol ANN queries filter through repository-scoped projected graphs before ranking. In a direct spike, this was 18.5x faster than the prior drop-and-rebuild path for 50 changed rows out of 26,000, with ANN results durable after close/reopen; this is evidence, not an SLA. Migration 26 copies complete legacy vectors in-database. Legacy `Symbol` embedding columns remain inert for compatibility, and upgraded databases may also retain legacy `Symbol` HNSW indexes until a safe rebuild.
|**SymbolReference**| referenceId, symbolId, file, line |
306
307
308
+
Production Symbol vectors live in `SymbolVectorEmbedding`, with one complete row per Symbol and model. Model-specific HNSW indexes target this table. Incremental indexing and background semantic repair delete and replace only changed embedding rows while retaining a healthy HNSW; index bootstrap occurs only when the exact table/name/type/property identity is absent and at least one complete row exists. Symbol ANN queries rank candidates inside a repository-scoped projected graph, so matching Symbol-to-File-to-Repo ownership filters the graph before the top-K search.
309
+
307
310
**Sync, policy, and memory nodes:**
308
311
309
312
| Node Table | Key Fields |
@@ -350,7 +353,7 @@ Each module owns a specific domain of queries:
Copy file name to clipboardExpand all lines: docs/feature-deep-dives/provider-first-indexing.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -138,16 +138,16 @@ The current full-build path is:
138
138
139
139
### Graph Readiness Versus Semantic Readiness
140
140
141
-
Embeddings, LLM summaries, retrieval-index bootstrap, and semantic enrichment are not part of the first ready gate. They advance a separate semantic readiness state. Provider-first graph finalization skips inline semantic work so the active graph can become graph-ready first.
141
+
Embeddings, LLM summaries, retrieval-index bootstrap, and semantic enrichment are not part of the first ready gate. They advance a separate semantic readiness state. Provider-first graph finalization skips semantic work so the active graph can become graph-ready first.
142
142
143
143
After graph finalization, SDL-MCP runs the configured semantic readiness refresh against the active DB:
144
144
145
145
- Summaries run when `semantic.generateSummaries` is enabled.
146
146
- Symbol and FileSummary embeddings run from the configured semantic model plan.
147
-
- Deferred retrieval indexes are rebuilt.
147
+
- Deferred retrieval indexes are ensured or bootstrapped when complete rows exist.
148
148
- Semantic dirty flags are cleared only for completed work; an intentional embedding backlog leaves only the embedding flag dirty.
149
149
150
-
If semantic refresh fails or an embedding provider degrades, the CLI reports `Semantic readiness: deferred`, records the derived-state error, and aborts readiness finalization. Sub-threshold FileSummary or Symbol vector work is different: SDL-MCP records it as an intentional backlog, continues the remaining semantic lanes and deferred-index work, clears any earlier semantic error plus completed summary work, and leaves `DerivedState.embeddingsDirty` set. The backlog accumulates until it reaches the protected HNSW rebuild floor or an explicit safe rebuild completes it. Mock fallback remains degraded and its rows are not reported as embedded. Repeated provider-first runs that reuse already-current active provider rows run the same post-graph semantic refresh rather than reporting a clean graph prematurely.
150
+
If semantic refresh fails or an embedding provider degrades, the CLI reports `Semantic readiness: deferred`, records the derived-state error, and aborts readiness finalization. Sub-threshold FileSummary vector work is different: SDL-MCP records it as an intentional backlog, continues the remaining semantic lanes and deferred-index work, clears any earlier semantic error plus completed summary work, and leaves `DerivedState.embeddingsDirty` setuntil the FileSummary HNSW rebuild floor is reached or an explicit safe rebuild completes it. Symbol embeddings do not use that rebuild floor: changed model rows are deleted and reinserted while a healthy `SymbolVectorEmbedding` HNSW remains live. Mock fallback remains degraded and its rows are not reported as embedded. Repeated provider-first runs that reuse already-current active provider rows run the same post-graph semantic refresh rather than reporting a clean graph prematurely.
151
151
152
152
153
153
### Persisted Graph Integrity
@@ -466,7 +466,7 @@ This keeps placeholder metadata, repo links, rare C++ provenance with commas, qu
466
466
467
467
## Derived State, Metrics, And Summaries
468
468
469
-
Semantic refresh is skipped in provider-first post-index finalization and tracked as deferred semantic readiness so index wall time is no longer dominated by the `Summary Embeddings` and `Symbol Embeddings` phases. When semantic refresh is deferred, the deferred index build leaves Symbol FTS, entity FTS, Symbol vectors, and FileSummary vectors for later retrieval readiness/bootstrap work rather than charging those builds to the first provider-first index wall-clock.
469
+
Semantic refresh is skipped in provider-first post-index finalization and tracked as deferred semantic readiness so index wall time is no longer dominated by the `Summary Embeddings` and `Symbol Embeddings` phases. When semantic refresh is deferred, the deferred index build leaves Symbol FTS, entity FTS, initial `SymbolVectorEmbedding` HNSW bootstrap, and FileSummary vectors for later retrieval readiness work rather than charging those builds to the first provider-first index wall-clock.
470
470
471
471
PageRank and K-core run by default for the readiness-critical centrality signal. Louvain shadow communities remain optional derived enrichment and are policy-skipped above `indexing.algorithmRefresh.louvain.maxCallEdges`, which defaults to `10000` call edges so provider-first full indexes do not spend most of their wall time in LadybugDB community detection.
Copy file name to clipboardExpand all lines: docs/feature-deep-dives/semantic-embeddings-setup.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -482,7 +482,7 @@ Configure each lane directly; there is no legacy mode switch.
482
482
"conjunctive":false, // true = AND all terms; false = OR
483
483
},
484
484
"vector": {
485
-
"enabled":true, //Vector search on inline embeddings
485
+
"enabled":true, //SymbolVectorEmbedding and FileSummary HNSW search
486
486
"topK":75, // Max candidates per model
487
487
"efs":200, // Query-time accuracy parameter
488
488
},
@@ -498,8 +498,8 @@ Configure each lane directly; there is no legacy mode switch.
498
498
499
499
### How It Works
500
500
501
-
1.**FTS and vector indexes are created automatically** on DB init when `semantic.enabled: true`. The FTS extension indexes `Symbol.searchText`; vector indexes cover `Symbol.embeddingJinaCode` and `Symbol.embeddingNomic`.
502
-
2.**At query time**, FTS and vector searches run in parallel. Each source produces a ranked candidate list.
501
+
1.**FTS and vector indexes are ensured automatically** on DB init when `semantic.enabled: true`. The FTS extension indexes `Symbol.searchText`; Symbol vector indexes cover model-specific numeric columns on `SymbolVectorEmbedding` after at least one complete row exists.
502
+
2.**At query time**, FTS and vector searches run in parallel. Symbol vector search uses a repository-scoped LadybugDB projected graph, so repository filtering happens before ANN ranking and unrelated repositories cannot consume the top-K window. Each source produces a ranked candidate list.
503
503
3.**RRF fuses** the rank lists: `score(d) = S 1/(k + rank_i(d))` � symbols ranked highly by multiple sources rise to the top.
504
504
4.**If an extension is unavailable** (for example, `fts` or `vector` is not loaded), the system omits that lane, renormalizes the remaining weights, and records the reduced coverage in telemetry.
Prior to hybrid retrieval, embeddings were stored in a separate `SymbolEmbedding` node table. Migration m007 automatically copies embeddings to inline Symbol properties (`embeddingJinaCode`, `embeddingNomic`) on DB init. Mock-fallback rows are skipped. The old `SymbolEmbedding` table is deprecated but retained for backward compatibility.
524
+
Prior to hybrid retrieval, embeddings were stored in a separate `SymbolEmbedding` node table. Migration m007 copied those values to inline Symbol properties. Migration m026 copies complete supported inline vectors into model-scoped `SymbolVectorEmbedding` rows. Mock-fallback and incomplete rows are skipped. The old `SymbolEmbedding` table and inline Symbol columns remain compatibility-only; current writes and HNSW indexes use `SymbolVectorEmbedding`.
525
525
526
526
The current recommended configuration surface is `semantic.retrieval.*`. Retired compatibility knobs are intentionally omitted from this setup guide.
527
527
@@ -630,14 +630,14 @@ The `intraOpNumThreads` setting is the single most impactful knob after model va
630
630
631
631
## Embedding Vector Storage
632
632
633
-
Embeddings are stored as **inline properties on Symbol nodes** in LadybugDB:
633
+
Symbol embeddings are stored as **model-scoped rows in `SymbolVectorEmbedding`**. FileSummary and AgentFeedback embeddings remain on their own entity nodes.
classDef process fill:#E8F1FF,stroke:#2563EB,stroke-width:2px,color:#102A43;
@@ -649,6 +649,8 @@ flowchart TD
649
649
class e1,e2,e3 animate;
650
650
```
651
651
652
+
After bootstrap, incremental indexing and the background semantic repair worker replace only changed model rows and retain the live Symbol HNSW. Retrieval ranks candidates inside a repository-scoped projected graph. Startup and health checks accept an HNSW only when its table, name, type, and property all match the configured model.
653
+
652
654
Vectors are compressed using Float16 quantization:
0 commit comments