-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[Bug]: Uncaught Exception in "default_parse_choice_select_answer_fn" when using default LLMRerank pieces #11045
Comments
🤖 It's great to see that you've identified the issue and even come up with a solution using regular expressions to handle the extra text added by LLMRerank. Your proposed solution sounds like a step in the right direction. If you're willing to contribute your solution to the repository, creating a pull request would be a fantastic way to share your improvement with the community. Keep up the good work!
|
…ng 'default_parse_choice_select_answer_fn' fails if extra text provided
Bug Description
The default rerank LLM was delivering answers that could not be parsed by "default_parse_choice_select_answer_fn".
The LLMRerank answer can add extra text to an answer that breaks the parsing.
The "DEFAULT_CHOICE_SELECT_PROMPT_TMPL" sets the expectation of an answer as
"Doc: 9, Relevance: 7\n"
but an llm can add extra text like in my case:' Doc: 2, Relevance: 8 (The document mentions taking a "tasty turn around Barcelona\'s Santa Caterina market" and listening to an episode about Barcelona.)'
I used a regular expression to be more spercific about what the function is doind and solve this problem for myself.
Version
0.10.4
Steps to Reproduce
my answer from the llm_rerank from my pipeline and data:
Relevant Logs/Tracbacks
The text was updated successfully, but these errors were encountered: