Validate Rule
Changed onValidate a rule by executing it with test data without creating a saved rule.
This endpoint allows testing LLM-as-judge evaluators before saving them. It accepts a rule configuration (same as rule creation) and test data, executes the evaluator, and returns the evaluation results in the same format as batch_invoke_evaluator.
Only LLM-as-judge rules (evaluators) are supported. Code evaluators are not allowed.
The evaluator execution traces are written to the database (in the "evaluators" project), which allows users to see the evaluator execution history.
Request
- Base URLhttps://api.smith.langchain.com
- URLhttps://api.smith.langchain.com/api/v1/runs/rules/validate
- Auth
- API key in header X-API-Key
- or API key in header X-Tenant-Id
- or HTTP bearer
Request body
Response
Successful Response
Changes
- info
added the new
trajectoryenum value to the request property////
- info
- breaking
request property
/was restricted to a list of enum values - breaking
added the pattern
^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$to the request property/// - breaking
the
/response's property type changed fromobjecttostringfor status - breaking
removed the required property
//from the response with the status - breaking
removed the required property
//from the response with the status - breaking
removed the required property
//from the response with the status - info
added the new optional request property
/// - info
added the new optional request property
/// - info
added the new optional request property
/// - info
added the new optional request property
//// - info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
the
request property const valuethread_idwas removed - info
added the new
thread_idenum value to the request property/ - info
added the new
trajectory_idenum value to the request property/
- breaking