LangSmith · Function
expect
LangSmith's expect API makes approximate checks on pytest test results. It can compare predictions with references, check values directly, and record expectation feedback.
Last updated
- Since
- v0.5
Syntax
expect.edit_distance(prediction=..., reference=...).to_be_less_than(...)
expect.value(value).to_contain(...)
expect.value(value).against(check)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
expect.embedding_distanceexpect.edit_distanceexpect.valueto_be_less_thanto_containagainst