From a6e0845894af83fb7d8a531e61ca5815dee516a6 Mon Sep 17 00:00:00 2001 From: Sydney Runkle Date: Tue, 11 Nov 2025 15:54:58 -0500 Subject: [PATCH] note about structured output --- src/oss/langchain/middleware.mdx | 6 ++++++ 1 file changed, 6 insertions(+) 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