DOC: <Issue related to /how_to_guides/evaluation/evaluate_llm_application>
jmattiace opened this issue · comments
Jason Mattiace commented
The documentation for evaluating a Langchain runnable for Typescript has an error. It mentions Then, pass the runnable.invoke method to the evaluate method.
with the following code snippet:
import { evaluate } from "langsmith/evaluation";
await evaluate(chain, {
data: datasetName,
evaluators: [correctLabel],
experimentPrefix: "Toxic Queries",
});
What I have found in my testing is that the chain
function needs to be called -> chain()
.
Updated example:
import { evaluate } from "langsmith/evaluation";
await evaluate(chain(), {
data: datasetName,
evaluators: [correctLabel],
experimentPrefix: "Toxic Queries",
});
Ankush Gola commented
That seems incorrect/weird. I'm unable to repro -- using chain
works fine for me:
await evaluate(chain, {
data: "Toxic Queries",
evaluators: [correctLabel],
experimentPrefix: "Toxic Queries",
});
Please upgrade to latest TS SDK (0.1.25) and let me know if the issue persists
Ankush Gola commented
closing for lack of reproducibility / last comment was made last month