curl --request POST \
--url https://app.langwatch.ai/api/evaluations/ragas/faithfulness/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"data": {
"input": "<string>",
"output": "<string>",
"contexts": [
"<string>"
]
}
}'
[
{
"status": "processed",
"score": 123,
"passed": true,
"label": "<string>",
"details": "<string>",
"cost": {
"currency": "<string>",
"amount": 123
},
"raw_response": {},
"error_type": "<string>",
"traceback": [
"<string>"
]
}
]
This evaluator assesses the extent to which the generated answer is consistent with the provided context. Higher scores indicate better faithfulness to the context, useful for detecting hallucinations.
curl --request POST \
--url https://app.langwatch.ai/api/evaluations/ragas/faithfulness/evaluate \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"data": {
"input": "<string>",
"output": "<string>",
"contexts": [
"<string>"
]
}
}'
[
{
"status": "processed",
"score": 123,
"passed": true,
"label": "<string>",
"details": "<string>",
"cost": {
"currency": "<string>",
"amount": 123
},
"raw_response": {},
"error_type": "<string>",
"traceback": [
"<string>"
]
}
]
Successful evaluation
The response is of type object[]
.
Was this page helpful?