Skip to main content

RAGQueryEngine

A protocol class that represents a document ingestation and query engine on top of an underlying database.
This interface defines the basic methods for RAG.
Parameters:

Instance Methods

add_docs

Add new documents to the underlying data store. Parameters:

connect_db

Connect to the database.
Parameters: Returns:

init_db

Initialize the database with the input documents or records.
This method initializes database with the input documents or records.
Usually, it takes the following steps:
1. connecting to a database.
2. insert records 3. build indexes etc.
Parameters: Returns:

query

Transform a string format question into database query and return the result.
Parameters: