Feedback

SimpliML's feedback feature offers a straightforward method to obtain 5 level feedback from customers on any request served, at any point in your application.

You have the capability to capture this feedback on both a generation or conversation level, and further analyze it based on custom tags by adding metadata to the pertinent request.

   POST /feedback

The Feedback API in SimpliML empowers you to collect weighted feedback from users on any generation or conversation, at any stage within your application. With the inclusion of custom metadata, you can efficiently tag and analyze feedback for enhanced insights.

Creating Feedback Request

Set Environment Variable

Launch your terminal. Define the endpoint URL and the API key for authentication.

shell
export ENDPOINT_URL="https://api.simpliml.com/v1/feedback"
export SIMPLIML_API_KEY="YOUR_API_KEY"

Create Request Object

The input to the API is a JSON-formatted object with all the request parameters.

OptionTypeDescriptionDefaultRequired
trace_idarrayA list of messages comprising the conversation so far. The conversation should be with alternative roles as system - user - assistant - user-Yes
ratingstringRating for the given trace id in range of 1 to 5, where 1 being worst and 5 beign excellent-Yes
JSON object
{
    "trace_id": "b5be0a7b-7708-4f5b-bdd5-86154fed2581",
    "rating": 3
}

Create the curl Request

To retrieve the details of gravity, issue the following curl command, inserting your JSON-formatted object in -d below.

shell
curl -X POST "$ENDPOINT_URL" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer $SimpliML_API_KEY" \
     -d '{"trace_id": "b5be0a7b-7708-4f5b-bdd5-86154fed2581","rating": 3}'