Skip to content

fix: Stabilize label extraction #7499

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

Merged
merged 4 commits into from
May 14, 2025
Merged

Conversation

anticorrelator
Copy link
Contributor

When setting provide_explanation=True in llm_classify, failing to provide a compatible label extraction function will sometimes lead to unexpected NOT_PARSABLE labels when trying to pull out the label from the LLM output.

This falls back to attempting to snap the entire LLM output to rails in case the default parsing function cannot split the label from the explanation (our internal convention is to delimit using label:

@anticorrelator anticorrelator requested a review from a team as a code owner May 9, 2025 18:07
@github-project-automation github-project-automation bot moved this to 📘 Todo in phoenix May 9, 2025
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 9, 2025
@anticorrelator anticorrelator force-pushed the dustin/stabilize-label-extraction branch from 5fa6d86 to 7e5a347 Compare May 12, 2025 19:00
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels May 13, 2025
@github-project-automation github-project-automation bot moved this from 📘 Todo to 👍 Approved in phoenix May 13, 2025
@anticorrelator anticorrelator merged commit 830247e into main May 14, 2025
30 checks passed
@github-project-automation github-project-automation bot moved this from 👍 Approved to ✅ Done in phoenix May 14, 2025
@anticorrelator anticorrelator deleted the dustin/stabilize-label-extraction branch May 14, 2025 19:53
GeLi2001 pushed a commit that referenced this pull request May 21, 2025
* Stabilize label extraction

* Improve logging messages

* Update test to use correct response (falls back to normal prompt)

* Update df in test
efontan-dialpad pushed a commit to gluru/phoenix that referenced this pull request May 28, 2025
* Stabilize label extraction

* Improve logging messages

* Update test to use correct response (falls back to normal prompt)

* Update df in test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants