CASE STUDY — AI / RAG PLATFORM

READMINDME

An AI system that answers from a knowledge base — a Bible-study platform whose assistant answers from scripture and study data, not from thin air.

01 — PROBLEM

Generic AI assistants hallucinate because they don't know the application's knowledge base. For a study tool, a made-up verse or misattributed reference isn't a quirk — it breaks the product's entire promise.

02 — WHAT I BUILT

A retrieval-augmented platform that searches its own knowledge base first, then generates a grounded, structured answer. Solo build: architecture, AI pipeline, backend, data modeling, DevOps, and security.

03 — HOW IT WORKS

Watch a question become a grounded answer.

Every answer takes this path. No retrieval, no response.

04 — KEY CAPABILITIES

What the system demonstrates.

RAGEmbeddingsVector searchpgvectorOpenAIStructured outputsConversation memoryAuthenticationModerationBackend servicesDatabase architecture

05 — UNDER THE HOOD

The numbers behind the pipeline.

For the technically curious — the implementation footprint of a production RAG system.

pipeline stages
14
verse embeddings
36,819
cross-references
603K
read-only bible tables
24
enrichment datasets
10+
API routers
20
backend services
25
Alembic migrations
33
database tables
~40
Docker Compose services
12
LOC AI service
~3,400

06 — ENGINEERING DECISIONS

Business value first, implementation underneath.

Retrieval before generation

The AI searches the application's own knowledge base before it answers, so responses are grounded in real content instead of guesses.

TECHNICAL: 14-stage retrieval pipeline with pgvector similarity search across 36,819 embeddings.

Context worth retrieving

Answers draw on study data a general model doesn't have — original-language detail and how passages relate to each other.

TECHNICAL: Parallel context retrieval across 10+ enrichment datasets, including Greek/Hebrew morphology and 603K cross-references over 24 read-only bible tables.

Answers an app can render

Responses come back as structured data — the interface shows verses, references, and explanations consistently instead of parsing free text.

TECHNICAL: OpenAI structured outputs with conversation memory persisted per user.

Safe accounts, safe content

Sign-in is protected and user content is screened before the AI works with it.

TECHNICAL: Google OAuth with TOTP two-factor authentication and a moderation step in the pipeline.

Operable in production

The whole platform starts from one configuration, and background work runs on a schedule instead of by hand.

TECHNICAL: Docker Compose orchestrating 12 services; APScheduler for scheduled jobs; Redis caching; 33 Alembic migrations across ~40 tables.

07 — TECHNOLOGIES

The stack.

FastAPIPostgreSQLpgvectorRedisOpenAI GPT-4oGoogle OAuthTOTP 2FAAPSchedulerDocker ComposeAlembic

Want AI grounded in your data?

RAG, embeddings, structured outputs — I can help you figure out what your product actually needs.