Weaviate (vector search)
Connect Weaviate, an external vector database, to search your Weaviate collections from Runtype. Agents search Weaviate with the Semantic Search built-in tool. Flows search Weaviate with the Vector Search step and write to it with the Store Vector step. Weaviate is a provider option for these tools, not a separate search tool.
Choose a vector provider
Choose a provider based on where you store the vectors:
- Choose Platform Records (pgvector) when you store searchable data in Runtype Records.
- Choose Weaviate when you store searchable data in a Weaviate collection.
- Choose Cloudflare Vectorize when you store searchable data in a Vectorize index.
Before you begin
Make sure that you have the following:
- A Weaviate Cloud cluster or a self-hosted Weaviate instance, with its URL and API key. Runtype must be able to reach the instance over the public internet.
- A Weaviate collection. Runtype embeds search queries with the OpenAI
text-embedding-3-smallmodel by default. Index your collection with the same model, or searches return no matches or fail. - Access to OpenAI for query embeddings. Runtype uses the platform OpenAI key unless you add your own key in Settings > Models. For details, see Platform keys vs. BYOK.
Set up Weaviate
To connect a Weaviate instance to Runtype, follow these steps:
- Copy the cluster URL and API key from Weaviate.
- In Runtype, click Settings > Integrations.
- In Vector Databases, click Add Configuration for Weaviate.
- In Configuration Name, enter a name for the connection.
- In Weaviate Instance URL, enter the cluster URL. For a self-hosted instance,
include the protocol, for example
https://weaviate.example.com. - In API Key, enter the Weaviate API key.
- Optional: To make this connection the default, turn on Set as default Weaviate configuration. Your first Weaviate configuration becomes the default automatically.
- Optional: To send extra headers with every request to Weaviate, on the Advanced tab, enter them in Custom Headers (JSON).
- On the Test Connection tab, click Test Connection. Confirm that the connection succeeds.
- Click Save Configuration.
Searches always use your default Weaviate configuration. To search a different Weaviate instance, set its configuration as the default.
Configure Semantic Search
To connect Semantic Search to a Weaviate collection, follow these steps:
- Add the Semantic Search tool to an Agent.
- In Display name, enter the name that the model sees for this search instance.
- In Provider, select Weaviate.
- In Class name, enter the Weaviate collection name. The name is case-sensitive.
- In Similarity threshold, enter a value from
0to1. Lower values return more results. The default is0.3.
In a Flow Prompt step, the same field is labeled Collection Name.
When the Agent calls Semantic Search, it can set limit from 1 to 20 to
control the maximum number of results. The default is 5.
You can add more than one Semantic Search instance to the same Agent. Point each instance to a different Weaviate collection.
With the Weaviate provider, Semantic Search returns each match’s ID and similarity scores, but not the document text. To retrieve document content from Weaviate, use the Vector Search step in a Flow and set Return Properties.
Search Weaviate in a Flow
To search a Weaviate collection from a Flow, follow these steps:
- Add a Vector Search step to the Flow.
- In Search for, enter the query text or a variable, for example
{{userMessage}}. - In the provider list, select Weaviate.
- In collection, enter the collection name. The name is case-sensitive.
- Set how many results to return and the minimum similarity. The defaults are
5results and a similarity of0.7. - In the embedding model list, select the model that you used to index the collection.
- Expand Search Mode. In Return Properties, enter the collection properties
to return, for example
title, content.
List every property that you need in the next step. If you leave Return Properties empty, results don’t include your document text.
The step also shows a connection list. When you choose a connection there, collection lists that connection’s collections. The search itself ignores the selection and always uses your default Weaviate configuration.
The step saves its results to its output variable. The default name is
search_results. The variable holds an array of matches, and each match has the
following shape:
The returned properties are under properties, not metadata. The score value is
the match’s certainty. To pass the matches
to the step that generates the answer, reference {{search_results}} in its prompt.
If you set metadataFilters on a Vector Search step through the API or an SDK,
Weaviate applies only the first entry.
Use hybrid search
Use hybrid search when your queries include exact identifiers, error codes, or other
terms that vector similarity might miss. To use hybrid search, expand Search Mode
and turn on Enable hybrid search (vector + keyword). In Alpha, enter a value
from 0.1 to 1. Lower values weight keyword search, and higher values weight vector
search. The default is 0.5. The dashboard replaces an Alpha of 0 with 0.5.
Hybrid results have no similarity score, so any similarity value greater than 0 removes
every hybrid result. The dashboard doesn’t accept a similarity of 0, so a hybrid
search that you configure in the dashboard returns no results. To use hybrid search,
save the step through the API with threshold set to 0.
Index content into Weaviate from a Flow
To write vectors into a Weaviate collection from a Flow, follow these steps:
- Add a Store Vector step after the step that generates the embeddings.
- In Store vectors from, enter the variable that holds the embeddings.
- In the destination list, select Weaviate.
- In the connection list, select the Weaviate connection.
- In collection, enter the collection name.
- Expand Metadata and add the fields to store with each vector, for example
contentset to the source text.
Weaviate assigns each object’s ID. The step ignores with ID template for Weaviate.
The Metadata fields become the object’s properties in Weaviate. To get them back
in a search, list the same names in Return Properties. To search the collection
with Semantic Search, generate the embeddings with text-embedding-3-small.
Verify the setup
To confirm that the connection works, run the Flow or Agent with a query that matches a document you know is in the collection. The results include that document’s ID, and in a Vector Search step, the properties that you listed.
Troubleshoot Weaviate search
The following table lists common errors and how to fix them:
Next steps
Use these pages to continue:
- Built-in tools: configure Semantic Search and other built-in tools
- Flow step types overview: add Vector Search and Store Vector steps to a Flow
- Building retrieval that works: choose retrieval strategies and tune hybrid search
- Integrations (PostHog, Weaviate, Daytona): edit or delete Weaviate connections
- API reference: manage Weaviate connections with the
/v1/integrations/weaviateendpoints - Cloudflare (Vectorize and Browser Rendering): connect Cloudflare Vectorize and Browser Rendering
- Using vector steps: generate embeddings, store vectors, and run vector search in a Flow
BYOK-only organizations
With Require your own model keys enabled, Weaviate hybrid search and text2vec-*
server-side vectorization are unavailable. Disable hybrid search and select an explicit
embedding model backed by a selected organization connection. Setting threshold to 0
does not make server-side vectorization eligible.