Skip to main content

Interface: FuzzyHit

Defined in: packages/agentos/src/cognition/rag/search/FuzzyIndex.ts:66

A document a search found.

Properties​

fields​

fields: Record<string, Marked | Marked[]>

Defined in: packages/agentos/src/cognition/rag/search/FuzzyIndex.ts:72

Each field the document holds, a text or a list of texts, with the words the query matched marked.


id​

id: string

Defined in: packages/agentos/src/cognition/rag/search/FuzzyIndex.ts:68

The document's id.


passages​

passages: Marked[]

Defined in: packages/agentos/src/cognition/rag/search/FuzzyIndex.ts:77

Up to passages sentences or lines of the passage fields that hold a match, in the order of the text, each clipped around its first match; or, when only another field matched, the opening of the text, unmarked.


score​

score: number

Defined in: packages/agentos/src/cognition/rag/search/FuzzyIndex.ts:70

For each query word, its best match's kind times the weight of the field it is in, summed.