Skip to main content
POST
/
ragas
/
faithfulness
/
evaluate
import langwatch df = langwatch.datasets.get_dataset("dataset-id").to_pandas() experiment = langwatch.experiment.init("my-experiment") for index, row in experiment.loop(df.iterrows()): # your execution code here experiment.evaluate( "ragas/faithfulness", index=index, data={ "output": output, "contexts": row["contexts"], "input": row["input"], }, settings={} )
[
  {
    "status": "processed",
    "score": 123,
    "passed": true,
    "label": "<string>",
    "details": "<string>",
    "cost": {
      "currency": "<string>",
      "amount": 123
    }
  }
]

Authorizations

X-Auth-Token
string
header
required

API key for authentication

Body

application/json
data
object
required
trace_id
string

Optional trace ID to associate this evaluation with a trace

settings
object

Response

Successful evaluation

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

Numeric score from the evaluation

passed
boolean

Whether the evaluation passed

label
string

Label assigned by the evaluation

details
string

Additional details about the evaluation

cost
object