Skip to content

feat: Add check before filter creation during onboarding#1404

Open
mfortman11 wants to merge 4 commits intomainfrom
duplicate-filter-check
Open

feat: Add check before filter creation during onboarding#1404
mfortman11 wants to merge 4 commits intomainfrom
duplicate-filter-check

Conversation

@mfortman11
Copy link
Copy Markdown
Contributor

Adds check for if a filter is created based on onboarding ID and by the OpenRAG Docs filter name to avoid duplicates

Addressing 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:

  • In src/api/settings.py, the onboarding logic now checks if an openrag_docs_filter_id already exists before attempting to create a new "OpenRAG Docs" filter, preventing duplicate filters when users re-submit the embedding step.
  • The _create_openrag_docs_filter function 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.

@mfortman11 mfortman11 requested a review from lucaseduoli April 15, 2026 15:03
@github-actions github-actions Bot added community backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) enhancement 🔵 New feature or request and removed community labels Apr 15, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Apr 15, 2026
@github-actions github-actions Bot added enhancement 🔵 New feature or request and removed enhancement 🔵 New feature or request labels Apr 15, 2026
Copy link
Copy Markdown
Collaborator

@lucaseduoli lucaseduoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! tested and working

@github-actions github-actions Bot added the lgtm label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) enhancement 🔵 New feature or request lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants