darkzard05/rag-system-ollama
Advanced local-first RAG system powered by Ollama and LangGraph. Optimized for high-performance sLLM orchestration featuring adaptive intent routing, semantic chunking, intelligent hybrid search (FAISS + BM25), and real-time thought streaming. Includes integrated PDF analysis and secure vector caching.
What's novel
Advanced local-first RAG system powered by Ollama and LangGraph. Optimized for high-performance sLLM orchestration featuring adaptive intent routing, semantic chunking, intelligent hybrid search (FAISS + BM25), and real-time thought streaming. Includes integrated PDF analysis and secure vector caching.
Code Analysis
8 files read · 3 roundsA local RAG chatbot that ingests PDFs, performs embedding-based semantic chunking with header awareness, builds a LangGraph self-correcting pipeline (hybrid BM25+FAISS retrieval, LLM grading, query rewriting, speculative generation), and serves cited answers via a Streamlit UI and FastAPI server, al
Strengths
Exceptionally thorough error handling with multi-layer PDF extraction fallbacks (PyMuPDF4LLM → C-Engine), JSON repair for broken LLM outputs, circuit breakers, retry with backoff, and phantom-state rollback on pipeline build failure. The semantic chunker is a genuine multi-stage algorithm (sentence splitting → embedding → buffer-based distance → breakpoint detection → header-aware grouping → size optimization → dedup), not a thin wrapper.
Weaknesses
The graph_builder.py file at 98KB is a monolith that concentrates too much logic (JSON repair, grading, speculative generation, node definitions) in one module, hurting maintainability. The codebase has significant Korean/English mixed comments and some circular-import workarounds (e.g., GRADE_MEMO_KEY duplicated as a literal string) that signal architectural friction.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
225
Contributors
1
Files
388
Active weeks
36
Repository
Language
Python
Stars
3
Forks
0
License
MIT