v4

OpenAPI 3.1.02026-08-01207318738.7 KB
AI Eval

Update an eval prompt set

Update a prompt set's name, description, and/or prompts. When prompts is supplied, it fully replaces the existing list — existing prompts omitted from the list are deleted, entries without an id are created, and entries with a matching id are updated in place.

patch/api/v1/ai/eval/prompt-sets/{promptSetId}

Path parameters

promptSetIdstring uuid required

The unique identifier of the eval prompt set.

Example:550e8400-e29b-41d4-a716-446655440000

The unique identifier of the eval prompt set.

Request body

descriptionstring nullable

New description for the prompt set. Pass null to clear. Max 1024 characters.

namestring

New human-readable name for the prompt set. 255 characters or fewer.

Example request

{
  "prompts": [
    {
      "expectation": "The top product by revenue should be Aniseed Syrup.",
      "prompt_text": "What are the top 10 products by revenue this quarter?"
    }
  ]
}

Response

Prompt set updated successfully.

Example response

{
  "prompt_set": {
    "created_at": "2025-01-15T10:00:00.000Z",
    "description": "Regression suite for the orders topic",
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "model_id": "880e8400-e29b-41d4-a716-446655440003",
    "name": "Orders regression",
    "prompts": [
      {
        "created_at": "2025-01-15T10:00:00.000Z",
        "expectation": "The top product by revenue should be Aniseed Syrup.",
        "id": "770e8400-e29b-41d4-a716-446655440002",
        "prompt_text": "What are the top 5 products by revenue?",
        "updated_at": "2025-01-15T10:00:00.000Z"
      }
    ],
    "slug": "orders-regression",
    "updated_at": "2025-01-15T10:00:00.000Z"
  }
}