DOC: <Issue related to /how_to_guides/evaluation/evaluate_llm_application> #7

Closed
opened 2026-02-21 17:16:57 -05:00 by yindo · 2 comments
Owner

Originally created by @jmattiace on GitHub (May 21, 2024).

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",
});
Originally created by @jmattiace on GitHub (May 21, 2024). 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", }); ```
yindo closed this issue 2026-02-21 17:16:57 -05:00
Author
Owner

@agola11 commented on GitHub (May 23, 2024):

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

@agola11 commented on GitHub (May 23, 2024): 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
Author
Owner

@agola11 commented on GitHub (Jun 17, 2024):

closing for lack of reproducibility / last comment was made last month

@agola11 commented on GitHub (Jun 17, 2024): closing for lack of reproducibility / last comment was made last month
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langsmith-docs#7