POST
/
ragas
/
factual_correctness
/
evaluate
curl --request POST \
  --url https://app.langwatch.ai/api/evaluations/ragas/factual_correctness/evaluate \
  --header 'Content-Type: application/json' \
  --header 'X-Auth-Token: <api-key>' \
  --data '{
  "data": {
    "output": "<string>",
    "expected_output": "<string>"
  }
}'
[
  {
    "status": "processed",
    "score": 123,
    "passed": true,
    "label": "<string>",
    "details": "<string>",
    "cost": {
      "currency": "<string>",
      "amount": 123
    },
    "raw_response": {},
    "error_type": "<string>",
    "traceback": [
      "<string>"
    ]
  }
]

Authorizations

X-Auth-Token
string
header
required

Body

application/json
data
object
required
settings
object

Evaluator settings

Response

Successful evaluation

status
enum<string>
required
Available options:
processed,
skipped,
error
score
number

Evaluation score

passed
boolean

Whether the evaluation passed

label
string

Evaluation label

details
string

Additional details about the evaluation

cost
object
raw_response
object

Raw response from the evaluator

error_type
string

Type of error if status is 'error'

traceback
string[]

Error traceback if status is 'error'