Skip to main content

LlamaIndexQueryEngine

This engine leverages LlamaIndex’s VectorStoreIndex to efficiently index and retrieve documents, and generate an answer in response to natural language queries. It use any LlamaIndex vector store.
By default the engine will use OpenAI’s GPT-4o model (use the llm parameter to change that).
Initializes the LlamaIndexQueryEngine with the given vector store.
Parameters:

Instance Methods

add_docs

Add new documents to the underlying database and add to the index.
Parameters:

connect_db

Connect to the database.
It sets up the LlamaIndex storage and create an index from the existing vector store.
Parameters: Returns:

init_db

Initialize the database with the input documents or records.
It takes the following steps:
1. Set up LlamaIndex storage context.
2. insert documents and build an index upon them.
Parameters: Returns:

query

Retrieve information from indexed documents by processing a query using the engine’s LLM.
Parameters: Returns: