Skip to main content

VectorChromaQueryEngine

This engine leverages Chromadb to persist document embeddings in a named collection and LlamaIndex’s VectorStoreIndex to efficiently index and retrieve documents, and generate an answer in response to natural language queries. The Chromadb collection serves as the storage layer, while the collection name uniquely identifies the set of documents within the persistent database.
This implements the autogen.agentchat.contrib.rag.RAGQueryEngine protocol.
Initializes the VectorChromaQueryEngine with db_path, metadata, and embedding function and llm.
Parameters:

Instance Methods

add_docs

Add additional documents to the existing vector index.
Loads new Docling-parsed Markdown files from a specified directory or a list of file paths and inserts them into the current index for future queries.
Parameters:

connect_db

Establish a connection to the Chromadb database and initialize the collection. Parameters:

get_collection_name

Get the name of the collection used by the query engine.
Returns:
The name of the collection.
Returns:

init_db

Not required nor implemented for VectorChromaQueryEngine Parameters:

query

Retrieve information from indexed documents by processing a natural language query.
Parameters: Returns:

validate_query_index

Ensures an index exists