Skip to content

Commit 4064892

Browse files
devlux76Copilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 0a1dc36 commit 4064892

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

docs/api.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,16 @@ const policy = createRoutingPolicy(profile, { normalDimRatio: 1 / 3 });
480480

481481
## Hippocampus — Ingest API
482482

483-
The Hippocampus layer encodes new content into the memory engine. All ingest
484-
operations are idempotent (re-ingesting the same content produces the same
485-
page hash and is deduplicated at the storage layer).
483+
The Hippocampus layer encodes new content into the memory engine. Ingest
484+
operations are deterministic (re-ingesting the same content produces the same
485+
page hash), but the current storage pipeline is **not** fully idempotent:
486+
embeddings and books are appended to the `VectorStore` on every run and are
487+
not automatically deduplicated.
488+
489+
Re-ingesting the same text will therefore grow the underlying vector file and
490+
can create multiple vector offsets for the same `pageId`. Callers that require
491+
strict idempotence should avoid re-ingesting identical content or implement an
492+
application-level deduplication strategy on top of the exposed metadata.
486493

487494
### `ingestText(text, options)`
488495

@@ -497,7 +504,7 @@ import { ingestText } from "./hippocampus/Ingest";
497504
const result = await ingestText("Your text content here...", {
498505
modelProfile, // ModelProfile — controls chunking and embedding dimension
499506
embeddingRunner, // EmbeddingRunner — resolves and runs the embedding model
500-
vectorStore, // VectorStore — append-only vector file (OPFS or in-memory)
507+
vectorStore, // VectorStore — append-only, non-deduplicating vector file (OPFS or in-memory)
501508
metadataStore, // MetadataStore — structured hierarchy store (IndexedDB)
502509
creatorKeyPair: {
503510
publicKey, // PublicKey — creator's identity for signing pages

0 commit comments

Comments
 (0)