Annotations API
Last updated
Last updated
Copyright © 2023 Arize AI, Inc
Some users have internal workflows for annotating LLM data and need to streamline the process of exporting those annotated examples to the Arize platform. An example scenario involves non-technical subject matter experts using tools like Google Sheets to label LLM output with evaluation metrics. These labels can then be reviewed and analyzed by the technical team within the Arize platform. The GraphQL API enables users to programmatically export these annotation labels to Arize, facilitating further analysis and deeper insights.
For additional details around how to use annotations in the Arize platform, refer to the Annotations section of the docs.
Users can test the annotations API call by navigating to https://app.arize.com/graphql.
Users can use a GraphQL mutation to add an annotation programmatically.
The Variables
section contains the metadata that needs to be passed in:
Below is a table describing each variable that is passed in above:
name
Required. A string defining the name of the metric, e.g. "LLM Response Adequacy".
updatedBy
Optional. A string identifying the user who is adding the annotation, such as a name or email address.
label
Optional. The binary annotation label associated with the span, e.g. "Satisfactory" vs. "Needs Improvement". Note that users may populate "label" or "score", but not both.
annotationType
Required. An enum specifying the type of the annotation, either "score" or "label". If "label", then the "label" field must also be populated. If "score", then the "score" field must be populated.
modelId
Required. TODO
note
Optional. A string containing a note from the annotator.
modelEnvironment
Required. TODO
recordId
Required. TODO
startTime
Required. Should be at most 24 hours before the record start time. This is a filter applied in druid to reduce the search space when looking for the record.