Skip to main content

Interface: FuzzyIndexConfig

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

What a FuzzyIndex is made with.

Properties​

editMinLength?​

optional editMinLength: number

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

The fewest letters a query word and a stored word each need to match one edit apart.

Default​

4

fields​

fields: Record<string, number>

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

Each field's name and its weight, a finite number above 0.


passageFields?​

optional passageFields: readonly string[]

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

The fields whose sentences and lines make a hit's passages, in this order.

Default​

the fields of the lowest weight

passages?​

optional passages: number

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

The most passages a hit shows: a whole number, 0 or more.

Default​

3

passageWidth?​

optional passageWidth: number

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

About how many characters a passage keeps around its first match: a whole number, 1 or more.

Default​

160

tokenize?​

optional tokenize: FuzzyTokenizer

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

The words of a text.

Default​

the library's word rule with an apostrophe inside a word kept