Evaluations
Evaluate
Evaluations
Evaluate
Evaluates a given prompt and output using Qualifire’s custom detectors. This API allows you to perform various checks such as consistency, dangerous content, facts, hallucinations, harassment, hate speech, PII, prompt injections, and syntax.
POST
/
evaluation
/
evaluate
curl --request POST \
--url https://proxy.qualifire.ai/api/evaluation/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Qualifire-API-Key: <api-key>' \
--data '{
"assertions": [
"<string>"
],
"consistency_check": true,
"dangerous_content_check": true,
"hallucinations_check": true,
"harassment_check": true,
"hate_speech_check": true,
"input": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"output": "<string>",
"pii_check": true,
"prompt_injections": true,
"sexual_content_check": true,
"syntax_checks": {
"javascript": {
"args": "<string>"
},
"json": {
"args": "<string>"
},
"length": {
"args": "<string>"
},
"sql": {
"args": "<string>"
},
"word count": {
"args": "<string>"
}
}
}'
{
"evaluationResults": [
{
"results": [
{
"claim": "<string>",
"confidence_score": 123,
"label": "<string>",
"name": "<string>",
"quote": "<string>",
"reason": "<string>",
"score": 123
}
],
"type": "<string>"
}
],
"score": 123,
"status": "<string>"
}
Authorizations
Body
application/json
Evaluation request
The body is of type object
.
Response
200 - application/json
OK
The response is of type object
.
curl --request POST \
--url https://proxy.qualifire.ai/api/evaluation/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Qualifire-API-Key: <api-key>' \
--data '{
"assertions": [
"<string>"
],
"consistency_check": true,
"dangerous_content_check": true,
"hallucinations_check": true,
"harassment_check": true,
"hate_speech_check": true,
"input": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"output": "<string>",
"pii_check": true,
"prompt_injections": true,
"sexual_content_check": true,
"syntax_checks": {
"javascript": {
"args": "<string>"
},
"json": {
"args": "<string>"
},
"length": {
"args": "<string>"
},
"sql": {
"args": "<string>"
},
"word count": {
"args": "<string>"
}
}
}'
{
"evaluationResults": [
{
"results": [
{
"claim": "<string>",
"confidence_score": 123,
"label": "<string>",
"name": "<string>",
"quote": "<string>",
"reason": "<string>",
"score": 123
}
],
"type": "<string>"
}
],
"score": 123,
"status": "<string>"
}