When you log an inference to Athina, you can provide an external_reference_id as a unique identifier for the inference.

This can be useful if you want to update the logs with additional information later.

For example, you may log user_feedback to track user satisfaction with the responses.

You can do this by sending a patch request with external_reference_id of the original inference log.

  • Method: PATCH

  • Endpoint: https://log.athina.ai/api/v1/log/inference/update-by-external-reference-id/:externalReferenceId

  • Headers:

    • athina-api-key: YOUR_ATHINA_API_KEY
    • Content-Type: application/json

Request Body

{
  // ...Fields you want to update,
  "user_feedback": 1,
}

For the full list of fields you can update, see the Logging Attributes.

Allowed fields to update

You cannot update the prompt_run_id or created_at fields.

Examples

  1. Update the user_feedback field of the inference log with the external_reference_id.
curl -X PATCH \
  https://log.athina.ai/api/v1/log/inference/update-by-external-reference-id/EXTERNAL_REFERENCE_ID \
  -H 'athina-api-key: YOUR_ATHINA_API'
  -H 'Content-Type: application/json'
  -d '{
    "user_feedback": 1
  }'
  1. Update the response_time field of the inference log with the external_reference_id.
curl -X PATCH \
  https://log.athina.ai/api/v1/log/inference/update-by-external-reference-id/EXTERNAL_REFERENCE_ID \
  -H 'athina-api-key: YOUR_ATHINA_API'
  -H 'Content-Type: application/json'
  -d '{
    "response_time": 1200
  }'