diff --git a/src/oss/langchain/middleware.mdx b/src/oss/langchain/middleware.mdx index 929b7ff5b8..d9dad1d522 100644 --- a/src/oss/langchain/middleware.mdx +++ b/src/oss/langchain/middleware.mdx @@ -1044,6 +1044,12 @@ Use an LLM to intelligently select relevant tools before calling the main model. - Improving model focus and accuracy + + **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. + + :::python ```python from langchain.agents import create_agent