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(
"lingua/language_detection",
index=index,
data={
"output": output,
"input": row["input"],
},
settings={}
)
[
{
"score": 123,
"passed": true,
"label": "<string>",
"details": "<string>",
"cost": {
"currency": "<string>",
"amount": 123
}
}
]Quality Aspects
Lingua Language Detection
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
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(
"lingua/language_detection",
index=index,
data={
"output": output,
"input": row["input"],
},
settings={}
)
[
{
"score": 123,
"passed": true,
"label": "<string>",
"details": "<string>",
"cost": {
"currency": "<string>",
"amount": 123
}
}
]Authorizations
API key for authentication
Body
application/json
Response
Successful evaluation
Was this page helpful?
⌘I