Skip to main content

Interface: FuseRankedOptions<T>

Defined in: packages/agentos/src/cognition/rag/search/fuseRanked.ts:15

How to fuse.

Type Parameters​

T​

T

Properties​

groupOf()?​

optional groupOf: (item) => string

Defined in: packages/agentos/src/cognition/rag/search/fuseRanked.ts:28

An item's group, which perGroup counts.

Parameters​

item​

T

Returns​

string


idOf()​

idOf: (item) => string

Defined in: packages/agentos/src/cognition/rag/search/fuseRanked.ts:17

An item's id: items with the same id in different lists are one item.

Parameters​

item​

T

Returns​

string


k?​

optional k: number

Defined in: packages/agentos/src/cognition/rag/search/fuseRanked.ts:19

The smoothing constant.

Default​

60

limit?​

optional limit: number

Defined in: packages/agentos/src/cognition/rag/search/fuseRanked.ts:32

The most items answered, a whole number, zero or more, or positive infinity.


perGroup?​

optional perGroup: number

Defined in: packages/agentos/src/cognition/rag/search/fuseRanked.ts:30

The most items kept of one group, a whole number, zero or more, or positive infinity; needs groupOf.


perList?​

optional perList: number | readonly number[]

Defined in: packages/agentos/src/cognition/rag/search/fuseRanked.ts:26

The most items kept whose first list is a given list: one number for every list, or one a list by place. A cap is a whole number, zero or more, or positive infinity for no cap.


weights?​

optional weights: readonly number[]

Defined in: packages/agentos/src/cognition/rag/search/fuseRanked.ts:21

Each list's weight by the list's place, a finite number, zero or more; a list with none weighs 1.