Skip to content

fix(ai-rag): Fix query expansion result handling logic, same as #3345 #3347

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kaijunyang
Copy link

Description:

This PR addresses an issue where the MultiQueryExpander fails to properly handle empty newlines in the model's response, causing it to return the original query even when valid expanded queries are present.

Related Issue:

Fixes #3345 (Bug description: MultiQueryExpander fails on empty newlines in response)

…g-projects#3345

- Filter out empty strings from query expansion results
- Optimize the logic for checking the number of query variants
@markpollack markpollack self-assigned this May 29, 2025
@markpollack markpollack added the RAG Issues related to Retrieval Augmented Generation label May 29, 2025
@markpollack
Copy link
Member

@ThomasVitale thoughts?

@markpollack markpollack added bug Something isn't working for: backport-to-1.0.x labels May 29, 2025
@markpollack markpollack added this to the 1.1.x milestone May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working for: backport-to-1.0.x RAG Issues related to Retrieval Augmented Generation
Projects
None yet
2 participants