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.
POST
/
legacy
/
ragas_faithfulness
/
evaluate
Copy
import langwatchdf = 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( "legacy/ragas_faithfulness", index=index, data={ "output": output, "contexts": row["contexts"], }, settings={} )