Skip to main content

Use Retool Vectors

Retool-managed Vectors is a hosted vector database that enables you to store unstructured text from documents and web pages for use with AI models through Retool. Retool abstracts away the complexities of preparing text and automatically generates the required data for AI models to make decisions using your data.

You can include related information from Retool-managed Vectors to provide more context. This allows you to instruct AI models to use your own data when making decisions, such as responding to a customer with context from support articles.

The following guide explains how to add text to Retool-managed Vectors and use it with the Generate text AI resource query.

Vector contents

Each vector you create can contain either document text or URLs, not both.

1. Enable Vectors​

Before creating a Vector, ensure that the feature is enabled. Navigate to Settings > AI, and toggle on the Vectors setting.

2. Create a Vector​

To get started, navigate to the Resources tab in your organization and select Retool Vectors. You can create two types of Vectors:

  • Document Vector: Store plain text that you enter manually or extract from uploaded PDF documents.
  • URL Vector: Store text fetched from publicly accessible web pages.

The following instructions cover both Vector types. To continue with this guide, create a URL Vector.

To create a Document Vector:

  1. Navigate to the Resources settings and click Retool Vectors.
  2. Click Add Vector.
  3. Specify a name and select Document.
  4. Click Create.

3. Add embeddings​

Click Add document and select whether to upload a PDF file or add plain text manually. Retool extracts text from PDF documents automatically.

4. Use Retool-managed Vectors in AI resource queries​

To include context from Retool-managed Vectors in apps, prompt the agent to use it in a function.

Use the web pages in Retool Vectors to draft a reply to the customer ticket with answers from the documentation.

Wrap up​

You have now created a new vector store using Retool-managed Vectors, added text content, and performed an AI resource query with Vector context.