Vectara
The Vectara component lets you add documents to a Vectara vector store and then search those documents from your Nappai dashboard. It connects to Vectara’s cloud API, so you can keep your data in the cloud and retrieve it quickly with similarity search.
How it Works
When you add documents, the component sends them to Vectara’s API, where they are embedded and stored. For searches, it calls Vectara’s similarity search endpoint, sending your query and the number of results you want. The component then returns the matching documents as Nappai data objects that can be used in later steps of your workflow.
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: Upload new documents to the Vectara vector store.
- Search: Find documents that are most similar to a given query.
- Retriever: Create a retriever object that can be used by other components to fetch relevant documents on demand.
To use the component, first select the operation you need in the “Operation” field.
Inputs
Input Fields
The following fields are available to configure this component. Each field may be visible in different operations:
-
Embedding: Provide an embedding model that will be used to convert text into vectors.
- Visible in: Add, Search, Retriever
-
Ingest Data: Supply the documents you want to add to the vector store.
- Visible in: Add
-
Operation: Choose which operation (Add, Search, or Retriever) the component should perform.
- Visible in: Add, Search, Retriever
-
Number of Results: Number of results to return.
- Visible in: Add, Search, Retriever
-
Search Query: Enter a search query. Leave empty to retrieve all documents.
- Visible in: Search
Credential
This component requires a Vectara API credential. First, create a credential named Vectara API in the Nappai credentials section, providing the Vectara Customer ID, Corpus ID, and API Key. Then select that credential in the component’s “Credential” field.
Outputs
- Retriever: A retriever object that can be passed to other components to fetch relevant documents on demand.
- Results: A list of data objects that match the search query.
- Vector Store: The underlying Vectara vector store object, useful for advanced operations or debugging.
Usage Example
Adding Documents
- Operation: Add
- Embedding: Choose an embedding model (e.g., OpenAI embeddings).
- Ingest Data: Drag in a file or paste text.
- Number of Results: (Optional) Set to 4.
- Click Run. The component will upload the documents and show a status message.
Searching Documents
- Operation: Search
- Embedding: Same model used for adding.
- Search Query: Type “customer support guidelines”.
- Number of Results: 5
- Click Run. The component returns the top 5 matching documents in the Results output.
Related Components
- Pinecone Vector Store – another cloud vector store option.
- OpenAI Embeddings – generate embeddings for your text.
- Data Loader – import documents from files or databases.
Tips and Best Practices
- Keep credentials secure: Store your Vectara API key in Nappai’s credential manager, not in the component’s inputs.
- Use consistent embeddings: The same embedding model should be used for both adding and searching to ensure accurate similarity.
- Limit results: Start with a small number of results (e.g., 3–5) to keep response times fast.
- Monitor status: Check the component’s status message for errors or confirmation of successful uploads.
Security Considerations
- The Vectara API key is transmitted over HTTPS, but never expose it in logs or UI.
- Ensure that only trusted users have access to the credential in Nappai.
- Use role‑based access controls to restrict who can add or search documents.