Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/oss/langchain/middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,12 @@ Use an LLM to intelligently select relevant tools before calling the main model.
- Improving model focus and accuracy
</Tip>

<Note>
**How it works:** This middleware uses structured output to ask an LLM which tools are most relevant for the current query. The structured output schema defines the available tool names and descriptions.

Model providers often add this structured output information to the system prompt behind the scenes.
</Note>

:::python
```python
from langchain.agents import create_agent
Expand Down