How atulkashyap404/rag-projects works
1. Overall shape
This repository is not one application; it is a collection of mostly standalone LangChain/LLM demos. The main architectural boundary is the folder per project. Most folders contain either a single runnable app.py entrypoint or a notebook for experimentation, plus local sample data.
2. Shared stack
The common runtime is Python, with LangChain as the orchestration layer across projects. Jupyter notebooks are used for exploratory builds and walkthroughs, while app.py files represent packaged demo entrypoints. requirements.txt suggests a shared dependency baseline across the repo.
3. Core RAG pattern reused throughout
The dominant data flow in the repo is: local documents or text files → chunking/preprocessing → embeddings/vector store → retriever → chain/agent → LLM answer. This pattern appears in the RAG pipeline, retriever-chain, document Q&A, advanced Q&A, and on-device projects, with different backends swapped in per folder.
4. Project 01 and Project 02: chatbot and API boundaries
Project 01 chatbot appears to be a local chatbot demo centered on app.py and locallama.py, implying a local model wrapper rather than a remote API dependency. Project 02 APIs explicitly splits into app.py and client.py, so its architecture includes a server/API boundary and a separate consumer/client path.
5. Project 03 to Project 05: learning progression for retrieval
Project 03 RAG Pipeline is a basic retrieval pipeline built from a text corpus (speech.txt) and notebook experimentation. Project 04 Retriever and Chain extends that into retriever + chain composition using PDF input. Project 05 Advanced RAG Q&A Project moves into agent-style orchestration, indicating more dynamic tool/chain selection than the earlier deterministic retrieval flows.
6. Project 06, 08, and 09: hosted LLM-backed Q&A demos
Project 06 Groq inference demonstrates LLM inference through Groq, with both an app and a notebook. Project 08 Powerful Doc Q&A Chatbot and Project 09 Advance Q&A Chatbot are likely production-style Q&A frontends that combine document ingestion with hosted LLM calls. These projects shift the main dependency from local models to an external inference service.
7. Project 07: Hugging Face / GenAI experiments
Project 07 Gen AI contains Hugging Face notebooks and a papers/ directory with PDF research papers. Architecturally, this is a document-analysis workspace: research PDFs feed notebook-driven processing, likely for summarization, retrieval, or model experimentation rather than a deployed app.
8. Project 10: on-device retrieval
Project 10 On-Device AI is the most infrastructure-specific project. The data/ folder contains many PDFs, which act as the local knowledge base, and the README indicates ObjectBox vector storage. The key architectural distinction here is that embeddings/retrieval are kept on-device instead of relying on a hosted vector DB or cloud service.
9. Project 11: image enhancement as a separate vision workflow
Project 11 ImageEnhancer is a different workload from the RAG/chatbot projects. Its app.py suggests a standalone UI or service for image processing, so its pipeline is likely image input → enhancement model/processor → transformed output, rather than text retrieval and generation.
10. Data and artifact handling
PDFs, text files, and papers are the main source assets across the repo. Outcome.pdf files appear to be generated deliverables or result snapshots from notebook runs, not runtime dependencies. This makes the repository read like a lab/workshop archive with reproducible examples and exported outcomes.
11. External services and model providers
The repo references several interchangeable backends across projects: Ollama, Groq, Hugging Face, OpenAI GPT-4o, Groq inference, Astra DB Serverless, Pinecone, FAISS, ChromaDB, and ObjectBox. These are not all used together; instead, each project demonstrates one deployment or retrieval variant, which is why the repo is best diagrammed as multiple vertical slices sharing the same LangChain-centered pattern.
12. How to diagram it accurately
The cleanest architecture diagram is a hub-and-spoke view: a central “LangChain-based app patterns” concept with separate spokes for local chatbot, API service, RAG notebook pipelines, hosted-LLM Q&A, on-device vector retrieval, and image enhancement. Avoid drawing one monolithic system; the repository is a portfolio of independent demos with shared ideas, not a single integrated platform.
Main entry points: Project 01 chatbot/app.py Local chatbot · rag.ipynb RAG notebook · Project 06 Groq inference/app.py Groq app · Project 10 On-Device AI/app.py On-device app
Components 21
Shared stack
Common runtime and dependency baseline used across the demo projects.
- Python + LangChain · Common orchestration layer and execution environment across the repository.
- Requirements · Shared dependency baseline for the demo projects.
requirements.txt
Chat and API demos
Local chatbot and a split client/server example.
- Local chatbot · Main runnable entrypoint for the local chatbot project.
Project 01 chatbot/app.py - Local LLaMA · Local model integration used by the chatbot demo.
Project 01 chatbot/locallama.py - API server · Server-side entrypoint for the API demo.
Project 02 APIs/app.py - API client · Separate client path that calls the API service.
Project 02 APIs/client.py
Retrieval demos
Progression of RAG, retriever-chain, and agent-style notebook experiments.
- RAG notebook · Basic retrieval pipeline experiment over a text corpus.
Project 03 RAG Pipeline/rag.ipynb - Speech text · Plain-text source document used by the RAG pipeline.
Project 03 RAG Pipeline/speech.txt - Retriever chain · Retriever-plus-chain composition over document input.
Project 04 Retriever and Chain/retriver.ipynb - PDF input · Document input used to drive the retriever-chain workflow.
Project 04 Retriever and Chain/imagepro.pdf - Agent Q&A · More dynamic orchestration using agent-style composition.
Project 05 Advanced RAG Q&A Project/agents.ipynb
Hosted LLM demos
Groq, Hugging Face, and document Q&A projects backed by external model services.
- Groq app · Runnable Groq-backed inference demo.
Project 06 Groq inference/app.py - Groq notebook · Notebook used to explore Groq-based model calls.
Project 06 Groq inference/groq.ipynb - HF notebooks · Hugging Face experimentation and walkthrough notebooks.
Project 07 Gen AI/huggingface.ipynb - Paper corpus · Collection of PDF papers used for document analysis experiments.
Project 07 Gen AI/papers - Doc Q&A app · Standalone document question-answering demo.
Project 08 Powerful Doc Q&A Chatbot/app.py - Advanced Q&A · Expanded question-answering chatbot demo.
Project 09 Advance Q&A Chatbot/app.py
On-device retrieval
Local PDF knowledge base with on-device vector storage.
- On-device app · Entry point for the on-device AI project.
Project 10 On-Device AI/app.py - PDF store · Many local PDFs used as the retrieval corpus.
Project 10 On-Device AI/data
Vision demo
Standalone image enhancement workflow.
- Image enhancer · Standalone image enhancement workflow.
Project 11 ImageEnhancer/app.py
Other components
- Demo portfolio · A set of mostly independent LangChain and LLM demo projects rather than one integrated application.
Connections 23
- Demo portfolio → Python + LangChain: shared stack · The demos are built around a common Python and LangChain runtime.
- Demo portfolio → Local chatbot: includes · Project 01 provides a local chatbot entrypoint.
- Local chatbot → Local LLaMA: uses · The chatbot delegates model handling to the local LLaMA wrapper.
- Demo portfolio → API server: includes · Project 02 exposes an API service boundary.
- API client → API server: calls · A separate client path consumes the API.
- Demo portfolio → RAG notebook: includes · Project 03 demonstrates the basic RAG pattern.
- Speech text → RAG notebook: feeds · The text corpus is the retrieval source for the notebook.
- Demo portfolio → Retriever chain: includes · Project 04 extends retrieval into chain composition.
- PDF input → Retriever chain: feeds · A PDF document provides the source material.
- Demo portfolio → Agent Q&A: includes · Project 05 moves toward agent-style orchestration.
- Demo portfolio → Groq app: includes · Project 06 is a Groq-backed inference demo.
- Groq notebook → Groq app: explores · The notebook supports the runnable Groq app.
- Demo portfolio → HF notebooks: includes · Project 07 is a Hugging Face experimentation workspace.
- Paper corpus → HF notebooks: feeds · Research PDFs are processed in notebook experiments.
- Demo portfolio → Doc Q&A app: includes · Project 08 is a document Q&A frontend.
- Demo portfolio → Advanced Q&A: includes · Project 09 is an advanced Q&A chatbot frontend.
- Demo portfolio → On-device app: includes · Project 10 implements local, on-device retrieval.
- PDF store → On-device app: feeds · The local PDF corpus is the knowledge base.
- Demo portfolio → Image enhancer: includes · Project 11 is a separate vision workflow.
- Requirements → Local chatbot: supports · Shared dependencies support the runnable demos.
- Requirements → Groq app: supports · Shared dependencies support the runnable demos.
- Python + LangChain → RAG notebook: orchestrates · LangChain-style orchestration appears in retrieval demos.
- Python + LangChain → On-device app: orchestrates · The on-device project also follows the LangChain-centered pattern.