rag-base
A foundational module that provides core interfaces for document storage and retrieval in Retrieval-Augmented Generation (RAG) systems.
Overview
The rag-base module defines the fundamental abstractions for working with document storage in RAG applications. It includes:
The
LookupStorageinterface for looking up documents by their identifiersThe
WriteStorageinterface for adding and updating documentsThe
DeletionStorageinterface for deleting documents by their identifiersThe
SearchStorageinterface that provides ranking capabilities based on query relevance, returningSearchResultitems with scoresThe
SearchRequestinterface andSimilaritySearchRequestimplementation for defining search parametersThe
DocumentWithPayloaddata class for associating documents with metadata or payloadSupport for generic document types, allowing flexibility in the types of documents that can be stored and retrieved
This module serves as the base for all RAG submodules (e.g., rag-vector) by providing a consistent API for document operations. It is designed to be implementation-agnostic, allowing different storage backends to be used interchangeably while maintaining a consistent interface for document management and retrieval.
For usage examples, see the ../../docs/docs/retrieval-augmented-generation.md guide.
A foundational module that provides core interfaces for document storage and retrieval in Retrieval-Augmented Generation (RAG) systems.
Overview
The rag-base module defines the fundamental abstractions for working with document storage in RAG applications. It includes:
The
LookupStorageinterface for looking up documents by their identifiersThe
WriteStorageinterface for adding and updating documentsThe
DeletionStorageinterface for deleting documents by their identifiersThe
SearchStorageinterface that provides ranking capabilities based on query relevance, returningSearchResultitems with scoresThe
SearchRequestinterface andSimilaritySearchRequestimplementation for defining search parametersThe
DocumentWithPayloaddata class for associating documents with metadata or payloadSupport for generic document types, allowing flexibility in the types of documents that can be stored and retrieved
This module serves as the base for all RAG submodules (e.g., rag-vector) by providing a consistent API for document operations. It is designed to be implementation-agnostic, allowing different storage backends to be used interchangeably while maintaining a consistent interface for document management and retrieval.
For usage examples, see the ../../docs/docs/retrieval-augmented-generation.md guide.