Skip to content

Override API

For validating incoming user messages before they are sent to an LLM, when validation rules must be defined inline within the request instead of relying on Web UI settings.


For validating outgoing LLM responses before they are returned to the end user, with validation configured directly in the request.

Override endpoints allow validation behavior to be defined inline, bypassing Web UI configuration.

Important:

  • Web UI validation settings are not applied
  • Validation is fully controlled via validation_config
  • The corresponding services (dataclean, guardrails, custom) must still be enabled at the deployment level

FieldTypeDescription
application_idstring (UUID)Application identifier. Must exist in HiveTrace.
messagestringUser message or LLM response depending on the endpoint.
validation_configobjectInline validation configuration.

FieldTypeDescription
additional_parametersobjectMetadata for session and user tracking.

Defines validation rules directly inside the request.

{
"application_id": "{{application_id}}",
"message": "My name is John, my CVC is 222, and I own a car.",
"additional_parameters": {
"session_id": "{{client_session_id}}",
"user_id": "{{client_user_id}}"
},
"validation_config": {
"source": "inline",
"inline": {
"guardrails": { "enabled": true },
"custom": {
"enabled": true,
"policies": [
{
"name": "medicine",
"prompt": "Do not provide medical advice or discuss medical topics."
}
]
},
"dataclean": {
"enabled": true,
"clean_type": "masking",
"patterns": ["CVC", { "name": "AUTOMOBILE", "regex": "\\bcar\\b" }]
}
}
}
}

patterns is a list of dataclean patterns. Each item can be:

  • a string with a predefined pattern name
  • an object with a custom pattern { "name": "...", "regex": "..." }

Allowed values for predefined patterns:

PatternDescription
ADDRESSAddress
BANK_CARD_NUMBERBank card number
COMPANYCompany / organization
CVCCard CVC/CVV
DATEDate
DEADLINE_DATEDeadline date
DIAGNOSISDiagnosis
DOMAINDomain
DURATIONDuration
EMAILSEmail addresses
INNINN (taxpayer identification number)
IPIP address
JOB_ROLEJob role / position
KPPKPP
MONEYMoney amounts
NAMEPerson name
OGRNOGRN
OGRNIPOGRNIP
PASSPORT_NUMBERPassport number
PHONE_NUMBERPhone number
SNILSSNILS

dataclean.clean_type (masking type): allowed values

Section titled “dataclean.clean_type (masking type): allowed values”
Masking typeDescription
MASKINGMasking: replaces matches with a mask
DELETIONDeletion: removes matches from the text
DETECTIONDetection: detects matches without modifying the text

Override endpoints return the same response structure as the Base API.