Latitude Tools
Learn how to use Latitude’s built-in tools in your prompts.
Overview
Latitude comes with a selection of built-in tools that can be used in your prompts. These tools allow you to extend the capabilities of the AI model by providing additional functionality beyond its default behavior.
Latitude Tools are specially useful with Agents, as they will be able to interpret the tool results and improvise accordingly.
Tools may not be available for all providers or models. Check the documentation of your provider to see if tools are supported.
Defining available Latitude Tools
Currently, Latitude supports the following built-in tools:
code
search
extract
To add them to your prompt, simply include them in a latitudeTools
section in your prompt configuration as a list:
Code Tool
The code
tool enables the execution of custom scripts in Python or JavaScript within the conversation. This tool is ideal for:
- Running complex calculations.
- Making API calls to external services.
- Processing and transforming data dynamically.
When the code
tool is available, the AI model can generate and request the execution of code snippets. These snippets can include dependencies that will be installed before execution. Once the code runs, the AI model receives the output as a response.
Search Tool
The search
tool allows the AI model to query the web and retrieve real-time information. It is particularly useful for:
- Looking up recent news or events.
- Finding definitions, facts, or background information.
- Retrieving relevant sources and references.
When this tool is enabled, the AI model can issue search queries, and the search
tool will return a list of results, including titles, URLs, and short descriptions of the retrieved content.
Extract Tool
The extract
tool fetches and processes structured content from a given URL. This is useful for:
- Extracting text, metadata, or images from web pages.
- Summarizing long articles.
- Collecting structured data from online sources.
When available, the AI model can request content extraction by providing a URL. The extracted content will be returned in a structured Markdown format, making it easy to read and process further.