FruxonDocs
EvaluationMetrics

Create a new evaluation metric for this tenant.

Adds an LLM-judge metric definition to the tenant library and returns its ID. The metric is not applied to any agent until you list it in `PUT AgentEvaluationMetrics` for that agent. Rate-limited per tenant; see `RateLimitingExtensions.SlidingWindowPolicy` for the window.

POST
/v1/tenants/{tenant}/evaluationMetrics
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

tenant*string

The tenant identifier

key*string

camelCase key used as the criterion ID in LLM judge prompts and responses. Must be unique within the tenant. Example: "responseQuality".

Length1 <= length
name*string

Human-readable display name. Example: "Response Quality".

Length1 <= length
description*string

What the LLM judge should evaluate for this metric. Sent verbatim as part of the evaluation criteria JSON.

Length1 <= length
defaultWeight?integer

Suggested weight (1–100) shown by the frontend when an agent opts into this metric. Used as the seeding hint when auto-normalizing a new agent's metric set.

Formatint32
Range1 <= value <= 100
[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/evaluationMetrics" \  -H "Content-Type: application/json" \  -d '{    "key": "string",    "name": "string",    "description": "string"  }'
{
  "id": "00000000-0000-0000-0000-000000000000",
  "key": "string",
  "name": "string",
  "description": "string",
  "defaultWeight": 0,
  "isDeprecated": false,
  "createdAt": 0,
  "modifiedAt": 0
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
Empty