MultiQueryExpander
, if the model's response contains empty newlines, the query expansion fails and returns the original query unchanged. The current implementation doesn't properly handle or filter out empty lines from the model's response.
#3345
Bug description
When using
MultiQueryExpander
, if the model's response contains empty newlines, the query expansion fails and returns the original query unchanged. The current implementation doesn't properly handle or filter out empty lines from the model's response.Environment
Steps to reproduce
MultiQueryExpander
withnumberOfQueries(3)
expand()
with any queryExpected behavior
The expander should:
Actual behavior
The expander fails when encountering empty newlines in the response, even when there are enough valid query variants present.
Minimal Complete Reproducible example
Proposed solution
The split("\n") operation should be followed by filtering out empty strings. Here's the suggested fix:
Additional context
This is particularly important because:
The text was updated successfully, but these errors were encountered: