Case Study

JayPalGPT

In Progress

A local, single-user document Q&A assistant, grounded only in your own uploaded documents.

Stack
Python · FastAPI · ChromaDB · sentence-transformers · Gemini · SQLite
JaypalGPT sign-in screen, running locally at 127.0.0.1:8010

Overview

JayPalGPT is a local, single-user document Q&A assistant. Upload personal, professional, or educational documents and ask questions answered only from their content — no hallucinated answers from outside the uploaded material.

Problem

Documents that matter — personal records, professional files, learning material — are scattered, and asking a general-purpose AI assistant about them means either pasting sensitive content into a third-party chat or not asking at all.

Solution

A retrieval-augmented Q&A system that runs locally: documents are chunked, embedded, and stored in a local vector database; a question retrieves the relevant chunks first, and Gemini answers grounded only in what was retrieved — with the source snippets shown alongside the answer, not just a bare answer.

Key Features

  • Document upload with category tagging (personal / professional / educational)
  • Retrieval-augmented Q&A with source-snippet citations, not just an answer
  • Multi-turn conversation memory — follow-up questions resolve correctly against prior turns
  • Category filtering on queries
  • All documents and chat history encrypted at rest
  • Session-based authentication with login rate limiting and lockout
  • Backup and restore tooling, with restore verified by decrypting every restored file against the live encryption key

Architecture

A FastAPI backend serves a static HTML/JS frontend. Uploaded documents are chunked and embedded with sentence-transformers, stored in ChromaDB as the vector store; a query embeds the question, retrieves the nearest chunks (optionally filtered by category), and passes them to Gemini as grounding context. Chat history persists to SQLite, encrypted at rest with the same key used for document storage — so a single backup/restore path covers both.

Technology

Python, FastAPI, ChromaDB, sentence-transformers for embeddings, Google Gemini via google-genai, SQLite for encrypted chat history.

Development Approach

Built using an AI-assisted development workflow (AIDLC) — Claude Code, Kiro and Amazon Q accelerate implementation, while architecture, decisions and quality remain owned by the developer.

Challenges

Keeping answers strictly grounded in the retrieved documents — rather than drifting toward the model's general knowledge — is an explicit, ongoing design rule: conversation memory adds continuity across turns, never new facts outside what was retrieved.

Decisions & Trade-offs

Local-only, single-user by design, rather than a multi-tenant hosted product — that trade-off buys real data privacy (everything, including chat history, encrypted at rest) at the cost of not being something other people can sign up for yet.