Skip to main content
POST
/
api
/
v1
/
ambient
/
session
/
{session_id}
/
{entity}
/
feedback
Submit user feedback
curl --request POST \
  --url https://sdp.suki-stage.com/api/v1/ambient/session/{session_id}/{entity}/feedback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'sdp_suki_token: <sdp_suki_token>' \
  --data '
{
  "ratingFeedback": {
    "min_rating": 0,
    "max_rating": 1,
    "rating": 1
  },
  "qualitative_comments": "The generated content was accurate and helpful"
}
'
{
  "feedback_id": "fb_abc123def456-789xyz-012uvw"
}
Use the Feedback API to collect quantitative (ratings) and qualitative (comments) feedback. Capturing feedback helps drive AI model improvement and increases client confidence. The API supports the following actions:
  • Quantitative Feedback: Rate content using a scale with configurable minimum and maximum values.
  • Qualitative Feedback: Provide optional, free-form comments for detailed insights.
  • Entity-Level Tracking: Tie feedback to specific entities within sessions.

Supported Entity Types

You can provide feedback on the following entity types:
Entity TypeDescription
contentGenerated clinical content
Within a single ambient session (session_id), you can provide feedback for each entity type only once. If you provide feedback for the same entity type multiple times, the feedback will not be valid.Also, single session_idcan contain multiple feedbacks, provided each entry corresponds to a different entity type.

Rating System

The ratingFeedback object provides quantitative feedback. It includes the following fields:
  • min_rating: The minimum rating value (e.g., 0).
  • max_rating: The maximum rating value.
  • rating: The actual rating you provide within the min-max range.
You can configure the rating scale by setting the min_rating and max_rating values. The range is inclusive, so both the min_rating and max_rating values are valid ratings.For example:
  • To create a rating scale of 0 to 5, set min_rating to 0 and max_rating to 5. A user can provide any integer rating from 0 to 5.
  • To create a binary scale, set min_rating to 0 and max_rating to 1. A user can provide a rating of either 0 or 1.
  • Suki suggests using a scale of 1 to 5 for the rating.

Character Limits

  • qualitative_comments: Maximum 2000 characters.
Your feedback helps Suki to improve the AI generated content. All feedback is reviewed and used to enhance quality.

Code Examples

  • Python
  • TypeScript
import requests

session_id = "session_abc_123"
entity = "content"
url = f"https://sdp.suki.ai/api/v1/ambient/session/{session_id}/{entity}/feedback"

headers = {
    "Authorization": "Bearer YOUR_TOKEN",
    "sdp_suki_token": "<sdp_suki_token>",
    "Content-Type": "application/json"
}

payload = {
    "ratingFeedback": {
        "min_rating": 0,
        "max_rating": 5,
        "rating": 4
    },
    "qualitative_comments": "The generated content was accurate and helpful. Great job!"  # Optional, max 2000 chars
}

response = requests.post(url, json=payload, headers=headers)

if response.status_code == 201:
    data = response.json()
    feedback_id = data.get("feedback_id")
    print(f"Feedback submitted successfully. Feedback ID: {feedback_id}")
else:
    print(f"Failed to submit feedback: {response.status_code}")
    print(response.json())

Authorizations

Authorization
string
header
required

JWT Bearer token authentication. Include the token in the Authorization header as 'Bearer {token}'.

Headers

sdp_suki_token
string
required

sdp_suki_token

Path Parameters

session_id
string
required

The unique identifier for the session

entity
string
required

The entity type for which feedback is being provided

Body

application/json

Feedback data

Request body for submitting feedback on session entities

ratingFeedback
object
required

Quantitative feedback rating object

qualitative_comments
string

Optional - Qualitative feedback comments for detailed insights. Maximum 2000 characters allowed.

Maximum string length: 2000
Example:

"The generated content was accurate and helpful"

Response

Created - Feedback submitted successfully

Response body for successful feedback submission

feedback_id
string

Unique identifier for the submitted feedback

Example:

"fb_abc123def456-789xyz-012uvw"