fix: split rating feedback tags by thumbsUp/thumbsDown direction#65
Merged
Conversation
The per-tag rating metric grouped on feedback.tag alone, dropping the
rating direction. Since each LibreChat feedback tag belongs to exactly
one rating (thumbsUp/thumbsDown), positive and negative tags could not
be told apart in Grafana.
- Group Query 3 by {tag, rating} and add a `rating` label to
librechat_rating_counts_per_tag.
- Update README examples to the current LibreChat tag keys and the new
label (drops stale 'helpful'/'creative'/'unhelpful' tags).
- Add Positive/Negative Feedback Tags panels to the Grafana template.
Closes #64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #64.
Problem
The rating tags were out of sync with positive/negative feedback. LibreChat stores feedback as
{ rating, tag }, and each feedback tag belongs to exactly one rating direction (verified against production:accurate_reliable→thumbsUp,not_matched→thumbsDown, etc.). But the per-tag metric grouped onfeedback.tagalone, discarding the rating direction — so in Grafana there was no way to separate positive from negative feedback tags.The README also documented tags (
helpful,creative,unhelpful) that no longer exist in current LibreChat.Changes
{tag, rating}, andlibrechat_rating_counts_per_taggains arating="thumbsUp|thumbsDown"label.ratinglabel.Compatibility note
This adds a label to an existing metric. Queries on
librechat_rating_counts_per_tag{tag="..."}keep working, but recording rules/alerts that assumed noratinglabel will now see series split by rating direction.Verification
{tag, rating}distribution and thatfeedback.tagis a plain string key against the production LibreChat MongoDB.metrics.pycompiles and passes flake8 F/E9 checks.