feat: Add check before filter creation during onboarding#1404
Open
mfortman11 wants to merge 4 commits intomainfrom
Open
feat: Add check before filter creation during onboarding#1404mfortman11 wants to merge 4 commits intomainfrom
mfortman11 wants to merge 4 commits intomainfrom
Conversation
…ag into duplicate-filter-check
lucaseduoli
approved these changes
Apr 15, 2026
Collaborator
lucaseduoli
left a comment
There was a problem hiding this comment.
LGTM! tested and working
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds check for if a filter is created based on onboarding ID and by the
OpenRAG Docsfilter name to avoid duplicatesAddressing https://github.ibm.com/lakehouse/tracker/issues/69638
This pull request improves the onboarding process by adding safeguards to prevent creating duplicate "OpenRAG Docs" knowledge filters when sample data is ingested. The changes ensure that a new filter is only created if one does not already exist, even if the onboarding embedding step is resubmitted.
Enhancements to duplicate filter prevention:
src/api/settings.py, the onboarding logic now checks if anopenrag_docs_filter_idalready exists before attempting to create a new "OpenRAG Docs" filter, preventing duplicate filters when users re-submit the embedding step._create_openrag_docs_filterfunction now queries the knowledge filters index in OpenSearch to check for an existing filter named "OpenRAG Docs" before creating a new one; if found, it logs and returns the existing filter's ID, otherwise it proceeds with creation.