from transformers import pipeline
classifier = pipeline("text-classification", model="llm-semantic-router/mmbert-feedback-detector")
result = classifier("Thank you, that was exactly what I needed!")
print(result) # [{'label': 'SAT', 'score': 0.99}]
Full Example
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model = AutoModelForSequenceClassification.from_pretrained("llm-semantic-router/mmbert-feedback-detector")
tokenizer = AutoTokenizer.from_pretrained("llm-semantic-router/mmbert-feedback-detector")
labels = ["SAT", "NEED_CLARIFICATION", "WRONG_ANSWER", "WANT_DIFFERENT"]
defclassify(text):
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
pred = probs.argmax(-1).item()
return labels[pred], probs[0][pred].item()
# Test
label, confidence = classify("Thank you, that was helpful!")
print(f"Label: {label}, Confidence: {confidence:.2%}")
Multilingual Examples
# English - Satisfied
classify("Thanks, that's exactly what I needed!")
# => ('SAT', 0.99)# English - Need clarification
classify("Can you explain that in more detail?")
# => ('NEED_CLARIFICATION', 0.97)# English - Wrong answer
classify("That's incorrect, the information you gave me was wrong.")
# => ('WRONG_ANSWER', 0.95)# English - Want different
classify("Can you show me other options instead?")
# => ('WANT_DIFFERENT', 0.94)# Japanese - Need clarification
classify("もう少し詳しく教えてください")
# => ('NEED_CLARIFICATION', 0.96)# Turkish - Wrong answer
classify("Bu yanlış bilgi, düzeltin lütfen")
# => ('WRONG_ANSWER', 0.93)# German (zero-shot)
classify("Können Sie mir eine andere Option zeigen?")
# => ('WANT_DIFFERENT', 0.89)# Spanish (zero-shot)
classify("Gracias, eso es exactamente lo que necesitaba!")
# => ('SAT', 0.95)
Use Cases
Chatbot feedback analysis
: Detect user satisfaction in real-time
Customer service
: Route dissatisfied users to human agents
Dialogue systems
: Adapt responses based on user feedback
Quality monitoring
: Track satisfaction metrics across conversations
Limitations
Best performance on conversational/dialogue text
May have reduced accuracy on very short inputs (<5 words)
Cross-lingual transfer works best for Romance and Germanic languages
mmbert-feedback-detector huggingface.co is an AI model on huggingface.co that provides mmbert-feedback-detector's model effect (), which can be used instantly with this llm-semantic-router mmbert-feedback-detector model. huggingface.co supports a free trial of the mmbert-feedback-detector model, and also provides paid use of the mmbert-feedback-detector. Support call mmbert-feedback-detector model through api, including Node.js, Python, http.
mmbert-feedback-detector huggingface.co is an online trial and call api platform, which integrates mmbert-feedback-detector's modeling effects, including api services, and provides a free online trial of mmbert-feedback-detector, you can try mmbert-feedback-detector online for free by clicking the link below.
llm-semantic-router mmbert-feedback-detector online free url in huggingface.co:
mmbert-feedback-detector is an open source model from GitHub that offers a free installation service, and any user can find mmbert-feedback-detector on GitHub to install. At the same time, huggingface.co provides the effect of mmbert-feedback-detector install, users can directly use mmbert-feedback-detector installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
mmbert-feedback-detector install url in huggingface.co: