Skip to content

Commit c2c20fe

Browse files
authored
Adds evaluation links to concepts, how tos, tutorials (#5790)
1 parent d8daee1 commit c2c20fe

File tree

4 files changed

+42
-6
lines changed

4 files changed

+42
-6
lines changed

docs/core_docs/docs/concepts.mdx

+21
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,7 @@ Most modules in LangChain include the `.stream()` method as an ergonomic streami
658658
```ts
659659
import { ChatAnthropic } from "@langchain/anthropic";
660660
import { concat } from "@langchain/core/utils/stream";
661+
import type { AIMessageChunk } from "@langchain/core/messages";
661662

662663
const model = new ChatAnthropic({ model: "claude-3-sonnet-20240229" });
663664

@@ -673,6 +674,8 @@ for await (const chunk of stream) {
673674
gathered = concat(gathered, chunk);
674675
}
675676
}
677+
678+
console.log(gathered);
676679
```
677680

678681
For models (or other components) that don't support streaming natively, this iterator would just yield a single chunk, but
@@ -1085,6 +1088,24 @@ Table columns:
10851088
| Token | [many classes](/docs/how_to/split_by_token/) | Tokens | | Splits text on tokens. There exist a few different ways to measure tokens. |
10861089
| Character | [CharacterTextSplitter](/docs/how_to/character_text_splitter/) | A user defined character | | Splits text based on a user defined character. One of the simpler methods. |
10871090

1091+
### Evaluation
1092+
1093+
<span data-heading-keywords="evaluation,evaluate"></span>
1094+
1095+
Evaluation is the process of assessing the performance and effectiveness of your LLM-powered applications.
1096+
It involves testing the model's responses against a set of predefined criteria or benchmarks to ensure it meets the desired quality standards and fulfills the intended purpose.
1097+
This process is vital for building reliable applications.
1098+
1099+
![](/img/langsmith_evaluate.png)
1100+
1101+
[LangSmith](https://docs.smith.langchain.com/) helps with this process in a few ways:
1102+
1103+
- It makes it easier to create and curate datasets via its tracing and annotation features
1104+
- It provides an evaluation framework that helps you define metrics and run your app against your dataset
1105+
- It allows you to track results over time and automatically run your evaluators on a schedule or as part of CI/Code
1106+
1107+
To learn more, check out [this LangSmith guide](https://docs.smith.langchain.com/concepts/evaluation).
1108+
10881109
### Generative UI
10891110

10901111
LangChain.js provides a few templates and examples showing off generative UI,

docs/core_docs/docs/how_to/index.mdx

+10-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,16 @@ You can peruse [LangGraph.js how-to guides here](https://langchain-ai.github.io/
274274
## [LangSmith](https://docs.smith.langchain.com/)
275275

276276
LangSmith allows you to closely trace, monitor and evaluate your LLM application.
277-
It seamlessly integrates with LangChain, and you can use it to inspect and debug individual steps of your chains as you build.
277+
It seamlessly integrates with LangChain and LangGraph.js, and you can use it to inspect and debug individual steps of your chains as you build.
278278

279279
LangSmith documentation is hosted on a separate site.
280280
You can peruse [LangSmith how-to guides here](https://docs.smith.langchain.com/how_to_guides/).
281+
282+
### Evaluation
283+
284+
<span data-heading-keywords="evaluation,evaluate"></span>
285+
286+
Evaluating performance is a vital part of building LLM-powered applications.
287+
LangSmith helps with every step of the process from creating a dataset to defining metrics to running evaluators.
288+
289+
To learn more, check out the [LangSmith evaluation how-to guides](https://docs.smith.langchain.com/how_to_guides/evaluation).

docs/core_docs/docs/tutorials/index.mdx

+11-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ sidebar_class_name: hidden
77

88
New to LangChain or to LLM app development in general? Read this material to quickly get up and running.
99

10-
### Basics
10+
## Basics
1111

1212
- [Build a Simple LLM Application with LCEL](/docs/tutorials/llm_chain)
1313
- [Build a Chatbot](/docs/tutorials/chatbot)
1414
- [Build an Agent](/docs/tutorials/agents)
1515

16-
### Working with external knowledge
16+
## Working with external knowledge
1717

1818
- [Build a Retrieval Augmented Generation (RAG) Application](/docs/tutorials/rag)
1919
- [Build a Conversational RAG Application](/docs/tutorials/qa_chat_history)
@@ -23,24 +23,30 @@ New to LangChain or to LLM app development in general? Read this material to qui
2323
- [Build a Question Answering application over a Graph Database](/docs/tutorials/graph)
2424
- [Build a PDF ingestion and Question/Answering system](/docs/tutorials/pdf_qa/)
2525

26-
### Specialized tasks
26+
## Specialized tasks
2727

2828
- [Build an Extraction Chain](/docs/tutorials/extraction)
2929
- [Classify text into labels](/docs/tutorials/classification)
3030
- [Summarize text](/docs/tutorials/summarization)
3131

32-
### LangGraph.js
32+
## LangGraph.js
3333

3434
LangGraph.js is an extension of LangChain aimed at
3535
building robust and stateful multi-actor applications with LLMs by modeling steps as edges and nodes in a graph.
3636

3737
LangGraph.js documentation is currently hosted on a separate site.
3838
You can peruse [LangGraph.js tutorials here](https://langchain-ai.github.io/langgraphjs/tutorials/).
3939

40-
### LangSmith
40+
## LangSmith
4141

4242
LangSmith allows you to closely trace, monitor and evaluate your LLM application.
4343
It seamlessly integrates with LangChain, and you can use it to inspect and debug individual steps of your chains as you build.
4444

4545
LangSmith documentation is hosted on a separate site.
4646
You can peruse [LangSmith tutorials here](https://docs.smith.langchain.com/tutorials/).
47+
48+
### Evaluation
49+
50+
LangSmith helps you evaluate the performance of your LLM applications. The below tutorial is a great way to get started:
51+
52+
- [Evaluate your LLM application](https://docs.smith.langchain.com/tutorials/Developers/evaluation)
75.7 KB
Loading

0 commit comments

Comments
 (0)