---
title: "Update evaluator"
method: PATCH
path: "/v1/platform/evaluators/{evaluator_id}"
tags: ["evaluators"]
---

# Update evaluator

`PATCH /v1/platform/evaluators/{evaluator_id}`

Update an existing evaluator's name, LLM configuration, or code configuration.

## Path parameters

- `evaluator_id` string, required

## Request body

- EvaluatorsUpdateEvaluatorRequest
  - `code_evaluator` EvaluatorsUpdateCodeEvaluatorRequest
    - `code` string
    - `language` string
  - `llm_evaluator` EvaluatorsUpdateLLMEvaluatorRequest
    - `commit_hash_or_tag` string
    - `num_few_shot_examples` integer
    - `prompt_repo_handle` string
    - `use_corrections_dataset` boolean
    - `variable_mapping` object
  - `name` string

## Response `200`

OK

- EvaluatorsUpdateEvaluatorResponse
  - `evaluator` EvaluatorsEvaluator
    - `code_evaluator` EvaluatorsCodeEvaluator
      - `code` string
      - `evaluator_id` string
      - `language` string — Default: "python"
    - `created_at` string
    - `created_by` string
    - `feedback_keys` string[]
    - `id` string
    - `llm_evaluator` EvaluatorsLLMEvaluator
      - `annotation_queue_id` string
      - `commit_hash_or_tag` string
      - `corrections_dataset_id` string
      - `evaluator_id` string
      - `num_few_shot_examples` integer
      - `prompt_id` string
      - `prompt_repo_handle` string
      - `use_corrections_dataset` boolean — Derived from the evaluator's run rules — shared across all rules on this evaluator. Nil when the evaluator has no run rules.
      - `variable_mapping` object — JSONB
    - `name` string
    - `run_rules` EvaluatorsEvaluatorRunRule[]
      - `corrections_dataset_id` string
      - `dataset_id` string
      - `dataset_name` string
      - `group_by` string
      - `id` string
      - `num_few_shot_examples` integer
      - `session_id` string
      - `session_name` string
      - `use_corrections_dataset` boolean
    - `spend_usd` number — Sum of LLM-as-judge run rule spend for the requested period (omitted when feature is disabled).
    - `tenant_id` string
    - `type` 'llm' | 'code'
    - `updated_at` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-05-27** `a0acb3a6a101` — 1 info
  - added the optional property `evaluator/spend_usd` to the response with the `200` status
- **2026-04-14** `e0b167760947` — 7 info
  - added the new optional request property `llm_evaluator/num_few_shot_examples`
  - added the new optional request property `llm_evaluator/use_corrections_dataset`
  - added the optional property `evaluator/llm_evaluator/allOf[#/components/schemas/evaluators.LLMEvaluator]/num_few_shot_examples` to the response with the `200` status
  - added the optional property `evaluator/llm_evaluator/allOf[#/components/schemas/evaluators.LLMEvaluator]/use_corrections_dataset` to the response with the `200` status
  - …3 more
- **2026-04-13** `e86be67718ee` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/langchain-ai/apis/langsmith/changes/v1/platform/evaluators/:evaluator_id/patch.md)

---

[API](https://skmtc.dev/langchain-ai/apis/langsmith.md) · [All operations](https://skmtc.dev/langchain-ai/apis/langsmith/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/langchain-ai/langsmith/revisions/a0acb3a6a101/schema)
