Wolfram Computation Meets Knowledge

Wolfram Language & System Documentation Center Wolfram Language Home Page »

LLMTool   

Listing of Parameter Types »

LLMTool["name",params,fun]

represents a tool for use by an LLM enabling it to run fun on parameters described by params.

LLMTool[{"name","description"},params,fun]

uses a description to prompt the LLM.

Details

Examples

open allclose all

Basic Examples  (2)

Define a tool for counting the number of characters in a string:

Use the tool in a call to an LLM:

Define a tool for querying the population of cities by their name and describe it for the LLM:

Use the tool in a call to an LLM:

Scope  (3)

Define a tool for computing power series expansion using multiple different inputs interpretations:

Ask the LLM a question requiring it to query a series expansion for the answer:

Define a tool to expose the TravelDistance function, interpreting parameter as a list of cities:

Find shortest travel path:

Define a tool with some prompting for running Wolfram Language code:

Run an LLM with the tool, returning all the evaluation properties:

Get the completion written by the LLM with prompting and tool calls removed:

Get the completion with tool calls preserved:

Get the associations of LLMToolRequest and LLMToolResponse objects:

Wolfram Research (2023), LLMTool, Wolfram Language function, https://reference.wolfram.com/language/ref/LLMTool.html.

Text

Wolfram Research (2023), LLMTool, Wolfram Language function, https://reference.wolfram.com/language/ref/LLMTool.html.

CMS

Wolfram Language. 2023. "LLMTool." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LLMTool.html.

APA

Wolfram Language. (2023). LLMTool. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LLMTool.html

BibTeX

@misc{reference.wolfram_2024_llmtool, author="Wolfram Research", title="{LLMTool}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/LLMTool.html}", note=[Accessed: 18-May-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_llmtool, organization={Wolfram Research}, title={LLMTool}, year={2023}, url={https://reference.wolfram.com/language/ref/LLMTool.html}, note=[Accessed: 18-May-2024 ]}

Top