Roadmap
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.
Completed Milestones
1. Project Foundation
- 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.
2. Architecture Hardening
- 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
3. Document Ingestion
- 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.
4. Chunking And Models
- Deterministic text chunking.
- Configurable chunk size and overlap.
- Pydantic models for:
- documents
- chunks
- search results
- citations
- messages
- answers
5. Embeddings And Indexes
EmbeddingModelprotocol.- Local hashing embedding model.
- Local n-gram hashing embedding model.
VectorStoreprotocol.- In-memory vector store.
- SQLite-backed persistent vector store.
6. Retrieval
- 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.
7. Generation
- Prompt construction from retrieved context.
LLMprotocol.CallableLLMadapter.RAG.ask().- Streaming responses with
RAG.stream(). - Source citations.
- Conversation history.
- Provider adapters:
OpenAILLMAnthropicLLM
8. Optional Integrations
openaiextra for OpenAI integration.anthropicextra for Anthropic integration.providersextra for both provider SDKs.ocrextra for OCR image loading.
Current Status
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.