Create Evaluator from Transcript API

Create a new evaluator for a specific agent using an existing conversation transcript.

API Endpoint

MethodEndpoint
POSThttps://new-prod.vocera.ai/test_framework/v1/scenarios-external/create_scenario_from_transcript/

Authentication

Include your API key in the request headers:

HeaderDescription
X-VOCERA-API-KEYYour API key obtained from the dashboard

Request Parameters

ParameterTypeRequiredDescription
agentintegerYes*ID of the agent
assistant_idstringYes*The assistant ID associated with agent
namestringNoName of the evaluator
personalityintegerNoID of the personality to use
expected_outcome_promptstringNoPrompt to evaluate expected outcome
transcript_jsonarrayYesTranscript in JSON format

* Only either of agent or assistant_id is required

Example Request

{
  "agent": 1,
  "personality": 1,
  "name": "Appointment Booking Evaluator",
  "expected_outcome_prompt": "Appointment was successfully booked",
  "transcript_json": [
    {"role": "Testing Agent", "time": "0:01", "content": "Hello.", "end_time": 1.94, "start_time": 1.44},
    {"role": "Main Agent", "time": "0:03", "content": "Hello. I want to book appointment.", "end_time": 7.54, "start_time": 3.1}
  ]
}

Response

A successful request returns the created evaluator details.

Response Fields

FieldTypeDescription
idintegerUnique identifier for the evaluator
namestringName of the evaluator
personality_namestringHuman-readable name of the personality
expected_outcome_promptstringPrompt to evaluate expected outcome
instructionsstringAuto-generated instructions based on the transcript

Example Response

{
  "id": 42,
  "name": "Appointment Booking Evaluator",
  "personality_name": "Helpful Assistant",
  "expected_outcome_prompt": "Appointment was successfully booked",
  "instructions": "You are a testing agent evaluating a conversation about booking an appointment. Assess whether the main agent successfully books the appointment as requested."
}

Code Examples

curl -X POST https://new-prod.vocera.ai/test_framework/v1/scenarios-external/create_scenario_from_transcript/ \
  -H "X-VOCERA-API-KEY: <your-api-key-here>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent": 1,
    "personality": 1,
    "name": "Appointment Booking Evaluator",
    "expected_outcome_prompt": "Appointment was successfully booked",
    "transcript_json": [
      {"role": "Testing Agent", "time": "0:01", "content": "Hello.", "end_time": 1.94, "start_time": 1.44},
      {"role": "Main Agent", "time": "0:03", "content": "Hello. I want to book appointment.", "end_time": 7.54, "start_time": 3.1}
    ]
  }'