Skip to content

Add options to QueryRelevantDocuments, add a new WithScoreThreshold option#13

Merged
lukehinds merged 1 commit intoStacklokLabs:mainfrom
jhrozek:options
Oct 31, 2024
Merged

Add options to QueryRelevantDocuments, add a new WithScoreThreshold option#13
lukehinds merged 1 commit intoStacklokLabs:mainfrom
jhrozek:options

Conversation

@jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Oct 31, 2024

It is useful to either retrieve only the relevant documents or none at all to avoid tainting the conversation with documents that are not relevant to add.

To allow that, this patch converts the existing Limit parameter to a functional option and adds a new one WithScoreThreshold that allows to set the minimal required cosine distance between the document and the vectorized query.

…ption

It is useful to either retrieve only the relevant documents or none at
all to avoid tainting the conversation with documents that are not
relevant to add.

To allow that, this patch converts the existing Limit parameter to a
functional option and adds a new one WithScoreThreshold that allows to
set the minimal required cosine distance between the document and the
vectorized query.
@lukehinds lukehinds merged commit e610036 into StacklokLabs:main Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants