Actions and tools
Actions and tools, also called 'plugins', can be considered function calls to routines external to the LLM. Relayed by an interpreters and routers, these have made LLMs one of the most powerful enablers of Agentic AI.
Actions and tools¶
Tools generally consist of single function calls to something that will return value to the end-point destination, be that the agent itself or a person interacting with an agent.
Actions can be thought of interacting in an environment, this environment can have external 'tools' or some form of digital or physical embodiment state of the agent. Thhought of in a different way, actions may be be internal or externally focused. focused generally related to an agent's 'memory
, or externally focused, with tools, though their distinction may be moot.
Internal actions generally relate reading, writing or updating, an agents memory, memory state, such as free-text scratech-pad
, an ordered memory-log
or a vector database.
External actions may be to act on simulated or real environments, or otherwise tracked state
, or to use a toolthat an agent may be 'equipped with' to run. These can be API calls or local function calls.
Libraries¶
ToolGen: Unified Tool Retrieval and Calling via Generation
The authors show in their paper a solution that uses individual tokens to indicate tool calls, an allows them to control over 48k tools.
On the Tool Manipulation Capability of Open-source Large Language Models
Paper Provides a method to allow open-source LLMs to work with tools for real-world tasks.
Tool Documentation Enables Zero-Shot Tool-Usage with Large Language Models Demonstrates that presenting documentation of tool usage is likely more valuable than providing examples.
Local LLM Function Calling enforces json semantics for calls to functions
Tool LLM This describes a novel approach enabling over 16000 API's to be called through an intelligent routing mechanism. Github Uses RapidAPI connector to do so.
Executors¶
The action that an agent may take is enabled by an AgentExecutor
or interpreter of the LLM output, that coordinates the call to perform the action.
Interpeters and Routers¶
Interpreters are programs that facilitate model computation by parsing, formatting, or otherwise preparing the data for effective use. They can also be used to route information to the appropriate reciever, such as a tool or other LLM.
Interpreting Such efforts can be used to reduce input complexity, token-count, to detect potentially unreasonable inputs or outputs. These interpreters may be agents or models themselves, thought that is not required.
Link Routing
A model may not be guaranteed to produce equivalent output based on a complex input string such as an html address. Consequently, pre-parsing the output and substituting a simple name for an address, such as 'html_1', and then re-introducing that within any output, both using RegEx, may enable more effective output.
Libraries¶
Guardrails To help format output and prevent improper prompts.
️Guidance Interleaving generation, prompting and logical control to single continuous flow.