Repository navigation
Home

Photo by Alex Knight on Unsplash
NutriPepper is the backend of a nutrition-education robot called Pepper. It answers nutrition questions and generates lessons using only a small knowledge base of public Kenyan, WHO and FAO guidance documents, and it cites the passages it used.
Educational tool, not medical advice. Alpha software (
v0.1.0-alpha). Read Known Issues and Limitations before relying on it.
- A client sends a question or topic to a FastAPI endpoint.
- The retriever finds relevant passages: semantic search plus keyword search, fused and re-ranked (Retrieval Pipeline).
- The generator asks a language model to answer only from those passages, with
[1]-style citations (Prompts and Lessons, LLM Layer). - The response goes back to the client.
- In the background, a verifier checks the answer against the passages and logs a grounding score (Grounding Verification, Data and Logging).
| I want to... | Go to |
|---|---|
| Run it locally | Getting Started |
| Change models or providers | Configuration, LLM Layer |
| Call the API | API Reference |
| Understand the design | Architecture |
| Add or rebuild the knowledge base | Knowledge Base |
| Check quality and test results | Evaluation, Testing |
| Fix a problem | Operations and Troubleshooting |
| Contribute | Contributing, Project Layout |
| Endpoints |
POST /query, POST /learn/structured, POST /learn/text
|
| Knowledge base | 6 documents, 810 chunks (English only) |
| Retrieval | ChromaDB + BM25, Reciprocal Rank Fusion, cross-encoder re-rank |
| LLM providers | Anthropic, DeepSeek, OpenAI (set per tier) |
| Storage | SQLite (interaction log) |
| Tests | 47, no network or API keys needed |
Evaluation numbers in this project are a historical baseline produced before the move to Anthropic and DeepSeek. The generator model was not recorded in the result files; earlier project documents attribute runs to GPT-3.5-turbo and GPT-4-turbo. Retrieval metrics depend only on the retriever, the knowledge base and the test set. Grounding, attribution and latency figures depend on the generator and the host, are not comparable to the current default setup, and have not been re-run. See Evaluation.
Source code: https://github.com/PantheraNestah/nutripepper-rag
Documentation last verified against the code on 2026-11-05. Evaluation figures are historical, see Evaluation. Educational tool, not medical advice.
Use it
How it works
- Architecture
- Retrieval Pipeline
- LLM Layer
- Prompts and Lessons
- Grounding Verification
- Knowledge Base
- Data and Logging
Quality
Develop