I published my first Python package — a reusable RAG core library
Source: Dev.to
Overview
If you’ve ever built a Retrieval‑Augmented Generation (RAG) system, you know the pain: every new project means rewriting the same boilerplate—vector store setup, embeddings, chunking, LLM wiring. I got tired of it, so I packaged it up.
Features
- FAISS vector store with persistence, deduplication, and metadata filtering
- Semantic search with MMR support
- Local LLM inference via Ollama
- Modular installs — grab only what you need
- Abstract base classes so you can extend it your way
Installation
pip install pyragcore[all]
Usage
from pyragcore import BasePipeline
class MyPipeline(BasePipeline):
def ingest(self, source: str) -> str:
# your ingestion logic here
...
pipeline = MyPipeline(persist_dir="./memory", output_folder="./output")
source_id = pipeline.ingest("./my_document.pdf")
answer = pipeline.ask("What is this document about?", source_id=source_id)
print(answer)
Status
It’s still early days (v0.1.11) and I’m actively working on it, but it’s already powering a couple of projects I built—a document chat bot.
Links
Feel free to share feedback, ideas, or contributions. If you build something with it, let me know!