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

added sources check to not repeat identical sources #1705

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

icsy7867
Copy link
Contributor

Original PR: #1679
Recreating as the branch I was working on was closed.

I found that after increasing
similarity_top_k: int in vector_store_component.py to something higher, like 10, I would getting some duplicate hits in the sources used.

Instead of just outputting the sources, as you loop through these, inject them into an array. If the item already exists in the array, don't re-add this to the sources_text.

This only affects "Query Docs"

@imartinez imartinez merged commit 290b9fb into zylon-ai:main Mar 11, 2024
6 checks passed
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