Zilliz RAG Knowledge Base icon

Zilliz RAG Knowledge Base

Build and manage RAG knowledge base with Zilliz vector database

Overview

This node integrates with the Zilliz vector database to perform advanced retrieval-augmented generation (RAG) knowledge base operations. Specifically, the "Query with Context" operation retrieves relevant contextual document chunks from a Zilliz collection based on a semantic query, either provided as natural language text or as a pre-computed vector embedding.

Typical use cases include:

  • Enhancing AI agents by providing them with relevant context extracted from large document collections.
  • Semantic search scenarios where users want to find documents or passages related to a query with similarity scoring.
  • Applications requiring retrieval of multiple relevant text chunks along with metadata for downstream processing or display.

For example, an AI chatbot could use this node to fetch the most relevant paragraphs from a product manual stored in Zilliz, improving answer accuracy by grounding responses in actual documentation.

Properties

Name Meaning
Database Name Name of the Zilliz database to query; defaults to "default" if not specified.
Collection Name The specific Zilliz collection within the database to query against. Must start with a letter and contain only letters, numbers, and underscores.
Query Text Natural language query string used for semantic search.
Query Vector JSON array representing a pre-computed query embedding vector. Required if no Query Text is provided.
Search Options A set of parameters controlling the search behavior:
- Max Results Maximum number of relevant documents/chunks to return (1–100).
- Similarity Threshold Minimum similarity score (0 to 1) to filter results by relevance.
- Filter Expression Additional filter conditions to narrow down search results.
- Include Metadata Boolean flag indicating whether to include full document metadata in the results.

Output

The output JSON object contains:

  • query: The original query string or indication that a vector query was used.
  • context_chunks: An array of objects representing retrieved context chunks, each including:
    • content: The text content of the chunk.
    • source: The title or source document name.
    • relevance: Similarity score indicating how closely the chunk matches the query.
  • context_text: A concatenated string of all retrieved chunks formatted with relevance and source annotations, suitable for feeding into AI models.
  • total_context_length: Character length of the combined context text.
  • sources: A list of unique source titles from which context chunks were retrieved.
  • collection: The name of the queried collection.
  • database: The name of the queried database.

No binary data output is produced by this operation.

Dependencies

  • Requires connection credentials for the Zilliz vector database, including an API key and cluster endpoint.
  • Relies on the external Zilliz client library bundled with the node to communicate with the vector database.
  • The node expects that query vectors are either computed externally or that a natural language query is provided to generate embeddings upstream.

Troubleshooting

  • Missing or invalid query vector: If neither a valid query vector nor query text is provided, the node throws an error requesting a query vector be computed or a query text be supplied.
  • Invalid JSON in Query Vector: If the query vector parameter contains malformed JSON, an error will indicate invalid JSON input.
  • Collection name validation: Collection names must start with a letter and contain only letters, numbers, and underscores; otherwise, the node will reject the input.
  • Empty or missing collection/database: Ensure the specified collection and database exist and are accessible with the provided credentials.
  • Similarity threshold filtering: Setting the similarity threshold too high may result in zero results returned; lowering it can increase recall.
  • API connectivity issues: Network or authentication problems with the Zilliz service will cause errors; verify API keys and endpoints.

Links and References

Discussion