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(
"langevals/valid_format",
index=index,
data={
"output": output,
},
settings={}
)[
{
"score": 123,
"passed": true,
"label": "<string>",
"details": "<string>",
"cost": {
"currency": "<string>",
"amount": 123
}
}
]Quality Aspects
Valid Format Evaluator
Allows you to check if the output is a valid json, markdown, python, sql, etc. For JSON, can optionally validate against a provided schema.
POST
/
langevals
/
valid_format
/
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(
"langevals/valid_format",
index=index,
data={
"output": output,
},
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