ChatDocs for Loop is a local AI assistant that helps developers, contributors, and users navigate the open-source Loop diabetes management app documentation.
It combines local embeddings and Gemini 2.5 Flash to deliver accurate, grounded answers -> and tells you when something isn’t in the docs.
Loop is a powerful open-source app that helps people with diabetes automate insulin delivery.
However, its documentation and codebase can be complex to navigate — especially for newcomers.
ChatDocs was built to bridge that gap: a local, Gemini-powered assistant that helps developers and contributors explore the Loop documentation and repositories conversationally.
This project demonstrates:
- Practical application of LLMs (Gemini) for technical documentation understanding
- Implementation of a Retrieval-Augmented Generation (RAG) pipeline
- Thoughtful UX for developer productivity and knowledge exploration using Makefile
- “Where does Loop define insulin delivery logic in code?”
- “How do I configure a new CGM according to the LoopDocs?”
- “What dependencies does the LoopKit framework have?”
- “Explain how Loop handles carb entries.”
- Context-aware answers powered by Gemini + LangChain, combining human-readable docs and actual source code for deeper reasoning.
- Local and private — all embeddings, retrieval, and chat run on your machine (no external API calls beyond Gemini).
- Transparent retrieval — see which document each answer came from.
- Streamlit interface for developers — simple, fast, and designed for documentation exploration.
| Component | Purpose |
|---|---|
| Gemini API | LLM for reasoning, summarization, and answering queries |
| LangChain | Retrieval-Augmented Generation (RAG) pipeline orchestration |
| Chroma | Local vector database for storing and querying document embeddings |
| Hugging Face (Sentence Transformers) | Embedding generation using all-MiniLM-L6-v2 |
| Streamlit | Interactive web UI for chatting with documentation |
| Python | Core logic, environment, and integration scripting |
┌───────────────────────┐
│ LoopDocs Markdown │
└────────────┬──────────┘
│
Load & Split Docs
│
Embed with HuggingFace
│
Store in Chroma DB
│
Retrieve Context
│
┌─────────────────┴─────────────────┐
│ ChatGoogleGenerativeAI │
│ (Gemini 2.5 Flash) │
└─────────────────┬─────────────────┘
│
Streamlit Chat UI
| Command | Description |
|---|---|
make check-gemini |
Verify your Gemini API key and accessible models |
make setup |
Create virtual environment and install dependencies |
make refresh |
Pull latest LoopDocs and rebuild embeddings |
make inspect |
Inspect Chroma vector database |
make chat |
Start ChatDocs in CLI mode |
make run-ui |
Launch Streamlit web app |
git clone https://github.com/jeaend/ChatDocs.git
cd ChatDocsmake setupCreate a .env file in the root:
GOOGLE_API_KEY=your_gemini_api_keyYou can get a key at https://makersuite.google.com/app/apikey
make check-geminimake refreshCLI version
make chatStreamlit UI
make run-uiThen open the Streamlit URL (usually http://localhost:8501) to start chatting with the Loop docs.
ChatDocs/
│
├── app.py # Streamlit interface
├── config.py # Environment and API key setup
├── requirements.txt
│
├── docs/ # LoopDocs markdown files
├── repos/ # Cloned LoopKit repositories
├── data/ # Local embeddings / vector indexes
│
└── utils/
├── loader_docs.py # Loads LoopDocs
├── loader_code.py # Loads and parses LoopKit repo files
├── embedder.py # Embedding + Chroma store logic
└── chat.py # Retrieval + chat chain
- Multi-source documentation support (adding source code)
- Deployment to Streamlit Cloud / Hugging Face Spaces
- Option to switch between Gemini, OpenAI, and Claude
Jeanne Endres -
Data Science & Software Engineer
LinkedIn | GitHub | Website