The planned roadmap for the lightweight RAG framework is complete. The project now covers the full local RAG pipeline while keeping provider integrations and heavier capabilities optional.
- Python package configuration with
pyproject.toml. src/package layout.- Ruff, mypy, and pytest configuration.
- Concise documentation in
README.mdanddocs/. - Public API tests for the complete local pipeline.
- Domain package organization:
rag.documentsrag.embeddingsrag.indexesrag.retrievalrag.generation
- Public
RAGfacade for ingestion, retrieval, and answer generation. - Extracted responsibilities:
CorpusRetrieverCitationBuilderConversationHistory
- Backward-compatible flat-module exports:
rag.ragrag.modelsrag.loadersrag.chunkingrag.llmsrag.promptingrag.vector_storerag.protocols
- Inline text ingestion with
RAG.add_text(). - TXT loading.
- Markdown loading.
- PDF loading.
- DOCX loading.
- Optional OCR image loading with
RAG.add_image(). - Format-specific loader modules behind a
FileLoaderdispatcher.
- Deterministic text chunking.
- Configurable chunk size and overlap.
- Pydantic models for:
- documents
- chunks
- search results
- citations
- messages
- answers
EmbeddingModelprotocol.- Local hashing embedding model.
- Local n-gram hashing embedding model.
VectorStoreprotocol.- In-memory vector store.
- SQLite-backed persistent vector store.
- Semantic retrieval over embedded chunks.
- Exact metadata filtering.
- Operator-based metadata filtering:
$eq$ne$in$nin$contains$exists$gt$gte$lt$lte
- Optional lexical reranking with
LexicalReranker.
- Prompt construction from retrieved context.
LLMprotocol.CallableLLMadapter.RAG.ask().- Streaming responses with
RAG.stream(). - Source citations.
- Conversation history.
- Provider adapters:
OpenAILLMAnthropicLLM
openaiextra for OpenAI integration.anthropicextra for Anthropic integration.providersextra for both provider SDKs.ocrextra for OCR image loading.
The framework is feature-complete for its intended scope: a modern, lightweight, well-structured Python RAG library suitable for a portfolio project.
Future work should be driven by concrete use cases rather than feature parity with larger frameworks. Good candidates would be packaging for PyPI, retrieval quality benchmarks, examples, or a small demo application.