Skip to main content

Function: embeddingInputHash()

embeddingInputHash(embedding, input): string

Defined in: packages/agentos/src/cognition/rag/embeddings/SqlEmbeddingStore.ts:84

The hash a vector is stored and found by: the SHA-256 hex of the model, NUL, the dimensions, NUL and the exact input the embedder is sent. It is the inputHash the library index gives a passage, so a vector stored under it is found for the same input, model and size, and never for another.

Parameters​

embedding​

EmbeddingStoreModel

The model and the vector size.

input​

string

The exact text the embedder is sent, after the host's own redaction and cut.

Returns​

string

64 lower-case hex digits.