Skip to main content

LLM Tools (Function Calling)

A tool is a function or operation that can be called directly or by a language model (LLMs). The Spice runtime has several tools available by default, giving LLMs access to various parts of the runtime. Tools can also be added or configured by the user by declaring them in the tools section of spicepod.yaml.

For details about providing LLMs tool access, see Language Model Tools.

Example

tools:
- name: arpanet
from: websearch
description: "Search the web for information."
params:
engine: perplexity
perplexity_auth_token: ${ secrets:SPICE_PERPLEXITY_AUTH_TOKEN }

For details on tool specifications, see the Tools Spicepod Reference.

Available Tools​

NameDescriptionDefault Group
list_datasetsList all available datasets in the runtime.auto
sqlExecute SQL queries on the runtime.auto
table_schemaGet the schema of a specific SQL table.auto
document_similarityRetrieve documents based on an input query.auto
sample_distinct_columnsGenerate a synthetic sample of data with distinct values.auto
random_sampleSample random rows from a table.auto
top_n_sampleSample the top N rows from a table based on a specified ordering.auto
memory:loadRetrieve all stored memories from the last time period.memory
memory:storeStore information from LLM interaction(s) for future reference.memory
websearchSearch the web for information.-

Tool Groups​

Tool groups are predefined sets of tools that can be provided to LLMs in a single tool name. For example, the auto tool group provides all default tools to the LLM (see above table).

models:
- name: full-runtime
from: openai:gpt-4o
params:
tools: auto # Use all default tools

Available tool groups:

  • auto: All default tools (see above table).
  • memory: Memory tools for storing and retrieving information across conversations.