Skip to content
PantheraNestah edited this page Nov 5, 2026 · 3 revisions

NutriPepper RAG Backend

The Pepper humanoid robot, the platform NutriPepper is built for
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.

How it works in five lines

  1. A client sends a question or topic to a FastAPI endpoint.
  2. The retriever finds relevant passages: semantic search plus keyword search, fused and re-ranked (Retrieval Pipeline).
  3. The generator asks a language model to answer only from those passages, with [1]-style citations (Prompts and Lessons, LLM Layer).
  4. The response goes back to the client.
  5. In the background, a verifier checks the answer against the passages and logs a grounding score (Grounding Verification, Data and Logging).

Choose your path

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

Quick facts

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 status

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

Clone this wiki locally