This evaluator detects the language of the input and output text to check for example if the generated answer is in the same language as the prompt,
or if it’s in a specific expected language.
POST
/
lingua
/
language_detection
/
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( "lingua/language_detection", index=index, data={ "output": output, "input": row["input"], }, settings={} )