diff --git a/libs/partners/typesafe/README.md b/libs/partners/typesafe/README.md index fbe0f20983..7f181dff79 100644 --- a/libs/partners/typesafe/README.md +++ b/libs/partners/typesafe/README.md @@ -87,7 +87,7 @@ agent = create_agent( ) ``` -The middleware asks one independent `Noul` question per candidate tool ("is this tool needed next?"), batched into a single TypeSafe request against the latest human message, before every model call. Tools whose probability clears `relevance_threshold` (default `0.3`) are kept, ranked by that probability, and capped at `max_tools` if set. Use `always_include` to keep specific tools regardless of classification. This API is experimental and may change without notice. +The middleware asks one independent `Noul` question per candidate tool ("is this tool needed next?"), batched into a single TypeSafe request against the latest human message, before every model call. Tools whose probability clears `relevance_threshold` (default `0.5`) are kept, ranked by that probability, and capped at `max_tools` if set. Use `always_include` to keep specific tools regardless of classification. This API is experimental and may change without notice. ### LangChain messages as state diff --git a/libs/partners/typesafe/langchain_typesafe/experimental/middleware/tool_selector.py b/libs/partners/typesafe/langchain_typesafe/experimental/middleware/tool_selector.py index 931b4fe9da..810d95e293 100644 --- a/libs/partners/typesafe/langchain_typesafe/experimental/middleware/tool_selector.py +++ b/libs/partners/typesafe/langchain_typesafe/experimental/middleware/tool_selector.py @@ -90,7 +90,7 @@ class TsToolSelectorMiddleware( def __init__( self, *, - relevance_threshold: float = 0.3, + relevance_threshold: float = 0.5, max_tools: int | None = None, always_include: list[str] | None = None, ) -> None: