Arize Phoenix TS
    Preparing search index...
    • Log multiple trace annotations in a single request.

      Each annotation can be of type "LLM", "CODE", or "HUMAN" and can include a label, score, and metadata. If an identifier is provided and an annotation with that identifier already exists, it will be updated.

      Parameters

      Returns Promise<{ id: string }[]>

      The IDs of the created or updated annotations

      const results = await logTraceAnnotations({
      traceAnnotations: [
      {
      traceId: "abc123",
      name: "correctness",
      label: "correct",
      score: 1.0,
      annotatorKind: "HUMAN",
      },
      {
      traceId: "def456",
      name: "faithfulness",
      label: "faithful",
      score: 0.9,
      annotatorKind: "LLM",
      },
      ],
      sync: true,
      });