Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RAG: discard duplicate facts by default #952

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

dluc
Copy link
Collaborator

@dluc dluc commented Dec 18, 2024

Motivation and Context (Why the change? What's the scenario?)

When importing chat messages or running tests with small files or without IDs, the storage might fill up with duplicate chunks of text that affect the number of tokens used when generating an answer.

High level description (Approach, Design)

When using the ASK API, after fetching N records from storage, discard duplicates and use only unique chunks in the RAG prompt.
The behavior is configurable via SearchClientConfig.IncludeDuplicateFacts and request context custom_rag_include_duplicate_facts_bool arg.

@dluc dluc merged commit 660d12f into microsoft:main Dec 18, 2024
6 checks passed
@dluc dluc deleted the duplicatechunks branch December 18, 2024 23:45
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.

1 participant