Case study 04 · Retrieval and conversation

A study desk that knows where its answers come from.

Theoria is a public conversational product over an Orthodox-profiled biblical and theological corpus. It treats stance, source ownership, retrieval shape, evaluation, and durable conversation as product architecture—not prompt decoration.

Role
Product architect, retrieval designer, full-stack builder
Domain
Scripture and Orthodox theological study
Interface
Conversational web product with persistent threads
Delivery
Protected edge route to a separately operated application origin
Corpus posture
One deployment, one explicit domain profile, registered sources, reproducible rebuild.
Tool posture
Retrieval tools for passages, comparison, doctrine, consultation, debate, and corpus discovery.
Product posture
Durable conversations, streaming delivery, and server-side answer completion.
The problem

Retrieval across traditions can flatten the very distinctions that matter.

A theological answer is shaped by more than whether the right verse appears in search. Canon, translation, original-language context, council or confession, historical witness, source license, and the user's intended posture all affect what a grounded answer should say.

A generic retrieval layer can surface plausible text while silently mixing authority, tradition, and editorial stance. A generic chat surface can also lose long-form work when a connection ends or a model response outlives the browser request.

Theoria addresses both sides: a profile-stamped corpus and MCP retrieval engine underneath, and a durable conversational product with explicit completion and deployment behavior above it.

What I built

The source system and the conversation system evolve together.

The engine is reusable; the deployment's profile, database, source policy, and interface give Theoria its specific identity.

01 / Profiled corpus

Stance belongs in data.

The deployment profile is stamped into its database. Sources, canon behavior, aliases, and tradition-specific material are reproducible inputs—not runtime flags that can drift between requests.

02 / Meaning retrieval

Search beyond exact words.

Literal text sits beside enriched principle, metaphor, application, and argument spaces so the model can retrieve the underlying shape of a question while retaining source handles.

03 / Durable answer lifecycle

The server owns completion.

Threads persist, responses stream through the UI, and answer generation completes on the server rather than disappearing when a browser connection ends.

Architecture

A protected route into a source-aware tool loop.

The public domain stays stable while the application and retrieval engine operate behind a separately controlled origin boundary.

01 / Browser

Conversation UI

Threads, messages, citations, loading and completion states, and responsive interaction.

02 / Edge

Protected public route

The stable arthurshafer.com path proxies the application without exposing private engine details.

03 / App

Durable chat service

Persistent conversations, server-owned generation, streaming events, health, and graceful shutdown.

04 / MCP

Retrieval tools

Tool selection across passages, words, doctrine, consultation, debate, and library inventory.

05 / Corpus

Profiled source database

Registered source material, embeddings, full-text search, enrichment layers, and rebuild manifests.

Evaluation philosophy
“Convergence is useful evidence—but it can still be a local maximum.”
How quality is tested
  • Golden queries for retrieval meaning and tool selection
  • Integration tests against the populated corpus
  • Adversarial debate loops that expose content gaps
  • Cooperative conversation loops that expose usability gaps
  • Explicit deferral when a fix risks the core retrieval behavior
  • Rebuildable source manifest and profile stamp
Outcome

A public product built from an evaluation discipline.

Theoria is live as a real conversational application, not merely an MCP server or local experiment. Visitors can create durable threads and work through long questions against the deployed source profile.

The project also demonstrates a repeatable product lesson: domain retrieval improves when the source policy, corpus profile, tool vocabulary, evaluation harness, interface, and deployment lifecycle are designed as one system.