Skip to content

Weaviate

The Weaviate component lets you work with a Weaviate vector store right from your Nappai dashboard.
You can add documents to the store, search for similar documents, or create a retriever that can be used by other components in your workflow.

How it Works

When you use the component, it creates a connection to a Weaviate server using the URL you provide.
If you have a Weaviate API credential set up, the component will automatically use the API key from that credential.
The component can then:

  1. Add – Take the documents you feed into the component, embed them with the embedding model you supply, and store the resulting vectors in the specified index.
  2. Search – Run a similarity search against the stored vectors. You can optionally search by text instead of by vector.
  3. Retriever – Build a retriever object that can be passed to other components (e.g., an LLM) to fetch relevant documents on demand.

All of this happens through the LangChain Weaviate vector store wrapper, so you don’t need to write any code.

Operations

This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:

  • Add: Store new documents in the Weaviate index.
  • Search: Find documents that are most similar to a query.
  • Retriever: Create a retriever that can be used by other components to fetch relevant documents.

To use the component, first select the operation you need in the “Operation” field.

Inputs

Note: This component requires a Weaviate API credential.

  1. Configure a Weaviate API credential in the Nappai Credentials section.
  2. Select that credential in the Credential field of this component.

Input Fields

  • Embedding: The embedding model that turns text into vectors.

    • Visible in: Add, Search, Retriever
  • Ingest Data: The documents you want to add to the vector store.

    • Visible in: Add
  • Operation: Choose which operation to run (Add, Search, or Retriever).

    • Visible in: Add, Search, Retriever
  • Index Name: The name of the Weaviate index where documents will be stored or searched.

    • Visible in: Add, Search, Retriever
  • Number of Results: How many documents to return when searching.

    • Visible in: Add, Search, Retriever
  • Search By Text: If checked, the component will search using the text query instead of vector similarity.

    • Visible in: Add, Search, Retriever
  • Search Query: The text you want to search for. Leave empty to retrieve all documents.

    • Visible in: Search
  • Text Key: The key in the Weaviate schema that holds the raw text of each document.

    • Visible in: Add, Search, Retriever

Outputs

  • Retriever: A retriever object that can be passed to other components (e.g., an LLM) to fetch relevant documents.
  • Results: A list of documents that match the search query.
  • Vector Store: The underlying Weaviate vector store object, useful if you need to perform advanced operations later.

Usage Example

Adding Documents

  1. Set Operation to Add.
  2. Provide a list of documents in Ingest Data.
  3. Choose an Embedding model.
  4. Specify the Index Name (e.g., my-index).
  5. Click Run.
    The component will embed the documents and store them in the specified Weaviate index.

Searching Documents

  1. Set Operation to Search.
  2. Enter a query in Search Query (e.g., “machine learning trends”).
  3. Choose an Embedding model that matches the one used when adding documents.
  4. Set Number of Results to the number of matches you want.
  5. Click Run.
    The component returns the top matching documents in the Results output.

Creating a Retriever

  1. Set Operation to Retriever.
  2. Provide an Embedding model.
  3. Specify the Index Name.
  4. Click Run.
    The Retriever output can now be connected to an LLM component to fetch contextually relevant documents during a conversation.
  • Embedding – Generates vector representations of text.
  • Retriever – Uses a vector store to fetch relevant documents.
  • Vector Store – Stores and manages vectors for similarity search.

Tips and Best Practices

  • Use a unique Index Name for each dataset to avoid accidental overwrites.
  • Keep the same embedding model for both adding and searching to ensure consistent vector space.
  • Test the component with a small set of documents first to confirm that the embeddings and search results look correct.
  • If you need to search by plain text, enable Search By Text for faster, non‑vector queries.
  • Store your Weaviate API key securely in the Nappai Credentials section; never hard‑code it in your workflow.

Security Considerations

  • The component uses the Weaviate API credential you select, so the API key is never exposed in the workflow.
  • Ensure that only trusted users have access to the credential in the Nappai Credentials section.
  • When sharing workflows, be mindful that the credential is tied to the user’s account and will not be transferred automatically.