Spaces:
Running
Running
File size: 1,415 Bytes
e43c82d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | """RAG Engine: A clear, educational Retrieval-Augmented Generation system.
Designed to illustrate how a production-grade RAG pipeline works:
- Ingestion & Text Extraction (PDF / Text)
- Semantic Text Chunking
- Dense Vector Embeddings (with offline Hash fallback)
- Sparse BM25 Keyword Search
- Hybrid Retrieval with Reciprocal Rank Fusion (RRF)
- Augmented Generation with Source Citations
- Faithfulness and Relevancy Evaluation
"""
from rag_engine.documents import Document, load_text_file, load_pdf_file
from rag_engine.chunking import TextChunk, chunk_document, chunk_documents
from rag_engine.embeddings import HashEmbeddings, get_embedding_model
from rag_engine.vector_store import VectorStore
from rag_engine.bm25_search import BM25SearchIndex
from rag_engine.hybrid_search import HybridRetriever, reciprocal_rank_fusion
from rag_engine.generator import generate_answer
from rag_engine.eval import evaluate_faithfulness, evaluate_relevancy, evaluate_response
from rag_engine.pipeline import RAGPipeline
__all__ = [
"Document",
"load_text_file",
"load_pdf_file",
"TextChunk",
"chunk_document",
"chunk_documents",
"HashEmbeddings",
"get_embedding_model",
"VectorStore",
"BM25SearchIndex",
"HybridRetriever",
"reciprocal_rank_fusion",
"generate_answer",
"evaluate_faithfulness",
"evaluate_relevancy",
"evaluate_response",
"RAGPipeline",
]
|