represents a response to an LLM tool request.
LLMToolResponse
represents a response to an LLM tool request.
Details
- LLMToolResponse is typically used to represent the answer to an LLM request for information or an external computation.
- Properties of an LLMToolResponse can be accessed with LLMToolResponse[…][prop].
- The following properties are supported:
-
"Request" request as an LLMToolRequest "Tool" tool as an LLMTool "InterpretedParameterValues" interpreted parameter values "Output" tool output "ResponseString" response string - LLMToolResponse objects can be generated with GenerateLLMToolResponse.
Examples
Basic Examples (2)
Generate an LLMToolResponse from a tool providing a related request:
GenerateLLMToolResponse[LLMTool[Association["Name" -> "countcharacter", "Description" -> "",
"Parameters" -> {"string" -> Association["Interpreter" -> "String",
"Help" -> Missing["NotSpecified"], "Required" -> True]},
"Function" -> (StringLength[#string] & ), "Options" -> {}, "LLMPacletVersion" -> "1.2.10"]], LLMToolRequest[Association["RequestID" -> None, "Name" -> "countcharacter",
"ParameterValues" -> {"string" -> "I like turtles"}, "RequestString" -> Missing[],
"Options" -> {}, "LLMPacletVersion" -> "1.2.10"]]]Call an LLM with access to a tool and return the responses to its tool requests:
LLMSynthesize["Use the tool to write a few sentences about Chicago.", {"CompletionText", "ToolResponses"}, LLMEvaluator -> <|"Tools" -> LLMTool[...]|>]Related Guides
History
Introduced in 2023 (13.3)
Text
Wolfram Research (2023), LLMToolResponse, Wolfram Language function, https://reference.wolfram.com/language/ref/LLMToolResponse.html.
CMS
Wolfram Language. 2023. "LLMToolResponse." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LLMToolResponse.html.
APA
Wolfram Language. (2023). LLMToolResponse. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LLMToolResponse.html
BibTeX
@misc{reference.wolfram_2026_llmtoolresponse, author="Wolfram Research", title="{LLMToolResponse}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/LLMToolResponse.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_llmtoolresponse, organization={Wolfram Research}, title={LLMToolResponse}, year={2023}, url={https://reference.wolfram.com/language/ref/LLMToolResponse.html}, note=[Accessed: 12-June-2026]}