RAGQueryEngine

RAGQueryEngine(*args, **kwargs)

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:
NameDescription
*args
**kwargs

Instance Methods

add_docs

add_docs(
    self,
    new_doc_dir: Path | str | None = None,
    new_doc_paths: list[Path | str] | None = None,
    *args: Any,
    **kwargs: Any
) -> bool

Add new documents to the underlying data store.

Parameters:
NameDescription
new_doc_dirType: pathlib.Path | str | None

Default: None
new_doc_pathsType: list[pathlib.Path | str] | None

Default: None
*argsType: Any
**kwargsType: Any

query

query(
    self,
    question: str,
    *args: Any,
    **kwargs: Any
) -> str

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

Parameters:
NameDescription
questiona string format question

Type: str
*argsAny additional arguments

Type: Any
**kwargsAny additional keyword arguments

Type: Any