Manage embeddings in Retool-managed Vectors
Learn how to manage text embeddings stored in Retool-managed Vectors.
You can use Retool-managed Vectors to store plain text or extracted text from PDF documents, or text from publicly accessible web pages.
Create a vector
Within the scope of Retool-managed Vectors, a Vector is a collection of unstructured text (known as embeddings). You create a vector to define the overall relationship and then add text or URLs to it. For example, if you wanted to build an AI-powered chat tool and want it to use context from your support site, you would create a vector (such as Documentation) and add URLs from your documentation site.
To create a Vector:
- Navigate to the Resources landing page and click Retool Vectors.
- Click Create new and select Vector from the dropdown list.
- Specify a Vector name.
- The Default embedding model is
text-embedding-ada-002
, but you can select the OpenAI embedding model of your choice from the dropdown. - Add Filter labels to filter vectors with Retool AI queries. Refer to Use Retool AI to query vectors with filters and metadata for more information.
To use filters and metadata in Retool AI queries, you must define them when creating a vector. If no filter labels are provided, all vectors are searched during a query.
- Add metadata to the Default metadata field in key-value pairs.
- Choose whether the Vector type is a Document or a Site URL.
Each vector you create can contain either document text or URLs, not both.
- Click Create.
Edit a vector
You can edit the Vector name, Description, Filter labels, and Default metadata of a Retool-managed Vector.
You cannot change the embedding model of a vector once it has been created.
Select the vector to edit, click •••
, then select Edit vector details.
If necessary, click Delete Vector to remove it. All vector data will be removed and cannot be recovered—you would need to recreate the vector.
Remove documents and URLs
Toggle the checkbox next to the document or URL in a vector to select it, then click Delete.
You can add documents or plain text to a vector manually or query the Retool Vectors resource in apps or workflows.
List Vectors
You can query the Retool Vectors resource in apps or workflows to list all available Vectors. This enables you to build apps that allows users to select a Vector and perform further actions, such as adding documents or URLs to it.
- Set Resource to Retool Vectors.
- Set Vector action to List all Vectors.