Introducing Confident Monitor

Update Annotation

(v2)

PUT

Updates the rating, scale or text of an annotation and returns its id. The target it was left on cannot be changed: expectedOutput is rejected on a thread annotation, and expectedOutcome on a trace or span annotation.

PUT/v2/annotations/{annotationId}
curl -X PUT "https://api.confident-ai.com/v2/annotations/{annotationId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "fieldType": "TEXT",
  "value": true,
  "explanation": "On reflection the answer omitted the source.",
  "expectedOutput": "Mount Everest is 8,848 metres tall.",
  "expectedOutcome": "The user learns how tall Mount Everest is.",
  "imagesMapping": {}
}'
200
{
  "success": true,
  "data": {
    "id": "<ANNOTATION-ID>"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • annotationIdstringRequired

    The id of the annotation.

Request body

  • fieldTypeenum

    The kind of value an annotation holds: TEXT, NUMBER, FLOAT or BOOLEAN for a free value, CHOICE or MULTIPLE_CHOICE for a choice from the options in the field's config, and THUMBS_RATING or FIVE_STAR_RATING for a rating.

    Show 8 enum valuesHide 8 enum values
    • TEXT
    • NUMBER
    • FLOAT
    • BOOLEAN
    • CHOICE
    • MULTIPLE_CHOICE
    • FIVE_STAR_RATING
    • THUMBS_RATING
  • valuestring | number | boolean | list of strings

    The annotated value, in the shape its fieldType expects: a boolean for THUMBS_RATING (true is thumbs up) and BOOLEAN, a whole number from 1 to 5 for FIVE_STAR_RATING, a number for NUMBER or FLOAT, a string for TEXT and CHOICE, and a list of strings for MULTIPLE_CHOICE.

    Show 4 variantsHide 4 variants
    • string

    • OR
    • number

    • OR
    • boolean

    • OR
    • list of strings

  • explanationstring

    Why the annotation was given.

  • expectedOutputstring

    The output the target should have produced. Only for an annotation left on a trace or span.

  • expectedOutcomestring

    The outcome the conversation should have reached. Only for an annotation left on a thread.

  • imagesMappingobject

    Images referenced by [DEEPEVAL:IMAGE:<key>] markers in the text fields, keyed by that marker's key.

Response

Update Annotation succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A reference to an annotation by its id.

    Show 1 propertyHide 1 property
    • idstring

      The id of the annotation, generated by Confident AI.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI