Rate Message
Endpoints
Rate Message
Rate an AI-generated message with a score and optional feedback
PUT
Rate Message
Rate Message
Rate an AI-generated message to provide feedback on the quality of the response. This helps improve the AI agent’s performance and track user satisfaction.Endpoint
Authentication
Your Nexus API key for authentication
Path Parameters
The ID of the AI message to rate. This must be a message generated by the AI assistant, not a user message.
Request Body
The rating score from 1 to 5, where:
- 1 = Very Poor
- 2 = Poor
- 3 = Average
- 4 = Good
- 5 = Excellent
Optional text feedback providing additional context about the rating. Maximum length: 1000 characters.
Response Fields
Unique identifier for the rating
The ID of the message that was rated
The rating score provided (1-5)
The optional feedback text if provided
ISO 8601 timestamp of when the rating was created
ISO 8601 timestamp of when the rating was last updated
Example Usage
Rating Guidelines
When to Rate Messages
- After receiving a response: Rate immediately after receiving an AI response while the context is fresh
- Quality feedback: Provide ratings that reflect the actual helpfulness of the response
- Update ratings: You can update a previous rating by calling the endpoint again with the same message ID
Score Guidelines
| Score | Description | When to Use |
|---|---|---|
| 5 | Excellent | Perfect response, fully addresses the query, accurate and helpful |
| 4 | Good | Mostly accurate and helpful with minor room for improvement |
| 3 | Average | Adequate response but missing some details or partially helpful |
| 2 | Poor | Response has significant issues or is mostly unhelpful |
| 1 | Very Poor | Completely wrong, irrelevant, or unhelpful response |
Common Patterns
1. Rate After Response Pattern
2. Feedback Collection Pattern
3. Batch Rating Pattern
Error Responses
Best Practices
Rating Quality
Rating Quality
- Provide honest and accurate ratings
- Include specific feedback when possible
- Rate based on the actual helpfulness of the response
- Consider the context of the conversation
Feedback Content
Feedback Content
- Keep feedback constructive and specific
- Mention what was good or what could be improved
- Avoid personal information in feedback
- Use clear and concise language
Implementation
Implementation
- Store message IDs for later rating
- Implement rating UI in your application
- Handle rating errors gracefully
- Consider implementing a rating reminder system
Analytics
Analytics
- Track rating patterns over time
- Monitor average scores by conversation type
- Use feedback to identify improvement areas
- Correlate ratings with user engagement
Limitations
- Message Type: Only AI-generated messages can be rated (not user messages)
- Score Range: Score must be an integer between 1 and 5
- Feedback Length: Maximum 1000 characters for feedback text
- Update Behavior: Rating the same message again will update the existing rating
- Integration Scope: You can only rate messages from your own integration
Related Endpoints
- Send Message - Send messages to get AI responses
- List Messages - Retrieve messages to find ones to rate
- Get Session - Check session details and message history