Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NOISSUE - Gate visual retrieval by query intent#252

Merged
fbugarski merged 1 commit into
mainfrom
gate-visual-retrieval
Jun 5, 2026
Merged

NOISSUE - Gate visual retrieval by query intent#252
fbugarski merged 1 commit into
mainfrom
gate-visual-retrieval

Conversation

@fbugarski

Copy link
Copy Markdown
Contributor

What type of PR is this?

This is a bug fix because it reduces noisy visual image retrieval results for normal text-based chat questions.

What does this do?

This PR gates visual image embedding retrieval behind a lightweight visual-intent check.

Previously, multimodal retrieval always searched both text chunks and visual image embeddings whenever image embeddings were configured. That could cause unrelated image-
only matches to appear for ordinary text queries, for example when the user is asking about a date, invoice, payment, contract, or record name.

With this change:

  • text and OCR chunk retrieval still run for every query
  • image records can still be found through extracted OCR/text content
  • visual image embedding retrieval only runs when the query appears to be asking about images, screenshots, scans, photos, or visual content
  • normal document questions are less likely to receive unrelated “Visual image match” context

Which issue(s) does this PR fix/relate to?

N/A

Have you included tests for your changes?

No, I have not included new tests for this change. The update is intentionally small and was manually tested through the prompt retrieval/debug flow.

Did you document any new/modified features?

No, this is an internal retrieval behavior fix and does not add a user-facing feature.

Notes

This is a pragmatic guard to reduce noisy multimodal retrieval. It does not remove OCR/text retrieval for image records; it only avoids running visual embedding search for
clearly non-visual questions.

@fbugarski fbugarski merged commit d88b9c6 into main Jun 5, 2026
5 checks passed
@fbugarski fbugarski deleted the gate-visual-retrieval branch June 5, 2026 12:41
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