You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes an issue where searching for an exact-looking token could return results even when that exact token was not in the knowledge base.
For example, searching ZX-49-RAG could return a document containing ZX-4819-RAG because the search matched similar token pieces.
This change keeps the existing search behavior, but adds a final check for code/token-like queries. If the exact query text is not found in the returned filename or chunk text, the result is removed.
Testing
Manually tested in Project Knowledge search:
Document contains ZX-4819-RAG
Search ZX-49-RAG
Result: no results returned
Search ZX-4819-RAG
Result: Project.code.for.QA.validation.is.ZX.docx returned
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: aaa5d80f-5794-4f65-9689-5dc775325ffc
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
🔍 Trigger review
Warning
.coderabbit.yaml has a parsing error
The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.
💥 Parsing errors (1)
Validation error: Too big: expected number to be <=900000 at "reviews.tools.github-checks.timeout_ms"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches🧪 Generate unit tests (beta)
Create PR with unit tests
Commit unit tests in branch fix-exact-knowledge-search-0.5.1
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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
backend🔷 Issues related to backend services (OpenSearch, Langflow, APIs)bug🔴 Something isn't working.lgtm
2 participants
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.
Fixes #1351
Summary
Fixes an issue where searching for an exact-looking token could return results even when that exact token was not in the knowledge base.
For example, searching
ZX-49-RAGcould return a document containingZX-4819-RAGbecause the search matched similar token pieces.This change keeps the existing search behavior, but adds a final check for code/token-like queries. If the exact query text is not found in the returned filename or chunk text, the result is removed.
Testing
Manually tested in Project Knowledge search:
Document contains
ZX-4819-RAGSearch
ZX-49-RAGSearch
ZX-4819-RAGProject.code.for.QA.validation.is.ZX.docxreturned