Interface: FuzzyIndexConfig
Defined in: packages/agentos/src/cognition/rag/search/FuzzyIndex.ts:42
What a FuzzyIndex is made with.
Properties
editMinLength?
optionaleditMinLength: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?
optionalpassageFields: readonlystring[]
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?
optionalpassages: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?
optionalpassageWidth: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?
optionaltokenize: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