Gemma CogniVault

May 25, 2026·
Ndimofor Aretas
Ndimofor Aretas
· 2 min read
projects

Overview

Gemma CogniVault is a 100% local, privacy-first AI study companion. Your documents stay on your hardware. Inference runs via Ollama on localhost. No telemetry, no embeddings sent to third parties, no exceptions. A live Privacy Vault Audit Panel confirms zero external connections at runtime.

It’s also genuinely capable — Gemma 4’s full surface (completion, vision, tools, reasoning) running on your laptop, wrapped in an app that turns your documents into quizzes, multi-lesson workshops, flashcard decks, and visual mindmaps, with a learning-progress dashboard and 25 achievement badges.

What’s inside

LayerTechnology
LLM & EmbeddingsOllama · gemma4:e4b · embeddinggemma
Agent FrameworkStrands Agents SDK
BackendFastAPI · Python 3.10+ · Pydantic
Vector SearchFAISS IndexFlatIP + BM25Okapi · Reciprocal Rank Fusion
Document Parsingpypdf · python-docx · python-pptx · openpyxl · trafilatura
OCRpytesseract · pymupdf · Pillow
Audiofaster-whisper
Workflow EngineDBOS + PostgreSQL
FrontendReact 19 · TypeScript · Vite · Tailwind v4 · Framer Motion · TanStack Query

Four sections

SectionWhat it’s for
💬 ChatAsk anything about your documents. Cited answers, scope filter, voice, attachments.
📚 Knowledge BaseUpload, categorise, and manage your documents. SHA-256 change detection on re-upload.
🎓 Study HubFour AI-powered study modes: Quiz · Workshop · Flashcards · Mindmaps.
📊 DashboardTotal study time, current streak, 25 achievement badges, 90-day activity heatmap.

Highlights

  • 🧠 Thinking Mode — collapsible reasoning panel streams Gemma 4’s chain of thought before the answer
  • 🔍 Hybrid Retrieval — FAISS dense + BM25 keyword fused with Reciprocal Rank Fusion
  • 🖼️ Multimodal — attach images, PDFs, and DOCX inline in chat
  • 🛟 Durable workflows — DBOS-checkpointed ingestion; crash-safe and resumable
  • 🏆 25 achievement badges — auto-tracked across chat, quizzes, workshops, flashcards, mindmaps
  • 🔒 Vault Audit Panel — live “zero external connections” indicator

Writing about it

I’m publishing a series of posts unpacking the engineering decisions behind CogniVault — privacy framing, the retrieval stack, the agent loop, ingestion durability, getting JSON out of a local model, drawing mindmaps without a graph library, the gamification layer, and how the test suite avoids needing any infrastructure to run.

See the blog for the full series.

Try it

git clone https://github.com/ndimoforaretas/local-gemma-rag.git
cd local-gemma-rag
./scripts/setup.sh   # one-time
./scripts/start.sh

Then open http://localhost:8000.

Ndimofor Aretas
Authors
IT Trainer & Fullstack Developer
An experienced developer and certified IT trainer (IHK) based in Germany, passionate about sharing knowledge and making complex technical concepts accessible through hands-on technical content creation and projects.