How Abby Is Trained on Scripture — Our RAG Architecture Explained
8 min read · March 28, 2026
When people hear "AI Bible assistant," a fair question follows: how does it know the Bible? Is it just ChatGPT with a religious prompt? Did someone feed it a theology textbook? Can it make up verses?
These are legitimate concerns. Most AI tools generate answers from statistical patterns learned during training — patterns that include every corner of the internet, with no particular commitment to accuracy or orthodoxy. Abby works fundamentally differently. This article explains exactly how.
The Core Idea: Retrieval, Not Memory
Abby uses a technique called Retrieval Augmented Generation — RAG for short. The key insight is simple: instead of relying on what the AI "remembers" from training, we retrieve real Bible verses from a dedicated database and give them to the AI as context before it generates a response.
This means the AI isn't recalling Scripture from some hazy training signal. It's reading actual verses, right now, selected specifically for your question. The Scripture comes before the explanation — not after.
The Database: 31,103 Verses with Vector Embeddings
Every verse in the World English Bible — all 31,103 of them — is stored in a PostgreSQL database with a vector extension called pgvector. Each verse has two representations:
- The text itself — book, chapter, verse number, and full verse content, exactly as it appears in the WEB translation.
- A 1536-dimensional vector embedding — a numerical representation of the verse's meaning, generated by OpenAI's embedding model. This captures the semantic content of the verse, not just its keywords.
When you ask "What does the Bible say about anxiety?", your question is also converted into a vector embedding. The database then finds the verses whose embeddings are closest to your question's embedding — meaning the verses most semantically relevant to what you're asking, not just the ones containing the word "anxiety."
This is why Abby can find relevant verses even when you don't use the exact biblical vocabulary. Asking about "worry" or "stress" or "being overwhelmed" will surface verses about anxiety, peace, trust, and God's provision — because the meanings are similar, even when the words differ.
What Happens When You Ask a Question
The Pipeline — Step by Step
- Intent classification — Before any API call, your message is classified as a greeting, off-topic, or on-topic biblical question. This runs locally, at zero cost. Off-topic questions (math, recipes, sports) are gently redirected.
- Content moderation — Your message passes through OpenAI's moderation system. Self-harm triggers an immediate crisis response with real helpline numbers. A theological override system ensures legitimate biblical questions about difficult topics aren't blocked.
- Semantic retrieval — Your question is embedded and matched against 31,103 verse embeddings using cosine similarity. The most relevant verses are retrieved.
- Context assembly — Retrieved verses are formatted as context, combined with a persona-specific system prompt (Companion, Pastor, or Theologian), and sent to the language model.
- Grounded generation — The AI generates a response based on the retrieved verses. It's instructed to cite specific verses, explain them in context, and not fabricate references.
- Citation refinement — After the response is generated, a post-processing step parses which verses were actually cited in the text and surfaces those as citation badges — so the UI shows exactly which verses Abby referenced.
- Streaming delivery — The response arrives in real time, word by word, so you're never staring at a loading spinner.
Every layer exists for a reason. The intent classifier saves cost and keeps Abby focused. The moderation layer protects vulnerable users. The retrieval layer ensures scriptural grounding. The citation refinement ensures the UI shows truth, not noise.
Why Not Just Use ChatGPT?
If you ask ChatGPT "What does the Bible say about anxiety?", you'll get an answer. It might even be decent. But there are fundamental problems with that approach:
No citation guarantee. ChatGPT generates verse references from training patterns. It sometimes fabricates plausible-sounding references — "Proverbs 42:7" or a paraphrased verse that doesn't match any translation. You'd never know unless you checked.
No theological commitment. General AI was trained on every theological opinion ever published online — liberal, conservative, heretical, orthodox, and everything in between. It synthesizes from all of it without flagging contradictions or committing to any tradition.
No safety pipeline. A vulnerable person asking ChatGPT about hopelessness might get a generically positive response. Abby's moderation system detects crisis indicators and responds immediately with empathy and real helpline numbers — 988 Suicide & Crisis Lifeline, Crisis Text Line 741741.
"Your word is a lamp to my feet, and a light for my path." — Psalm 119:105 (WEB)
What About the AI Model Itself?
Abby uses OpenAI's language models for response generation — the same underlying technology behind ChatGPT. So what makes it different?
The answer is context, not model. When ChatGPT generates a Bible answer, it draws from its entire training dataset — every website, forum post, and contradictory opinion it ever processed. When Abby generates a Bible answer, it draws from specific retrieved verses plus a carefully designed system prompt that instructs it to:
- Cite only the verses provided in the context — never fabricate references.
- Present multiple theological perspectives fairly on secondary doctrines where traditions disagree.
- Be clear and unwavering on core orthodoxy — the Trinity, the deity of Christ, salvation by grace through faith.
- Respond to sarcasm with warmth, answer the underlying question, and redirect pure trolling gently.
- Never claim to replace pastoral counsel, professional therapy, or personal Scripture study.
The model is the engine. The retrieval system, the prompt engineering, and the safety pipeline are the vehicle. The engine is the same; the vehicle is purpose-built for a specific destination.
The Translation: World English Bible
Abby currently uses the World English Bible (WEB). This is a modern English translation based on the American Standard Version, updated for contemporary readability. It's in the public domain, which means we can display full verse text without copyright restrictions.
The WEB is a formal equivalence translation — it prioritizes accuracy to the original Hebrew, Aramaic, and Greek texts while remaining readable. It uses "Yahweh" for the divine name in the Old Testament, following the original Hebrew rather than substituting "LORD."
What We Don't Do
Transparency means being honest about limitations too:
We don't fine-tune the model on theological data. Abby's grounding comes from retrieval, not model modification. We don't inject theological bias into the model weights themselves.
We don't claim perfection. The AI can still make mistakes in its explanations — misinterpret context, oversimplify a complex doctrine, or miss a nuance. The verse citations are real; the explanations are AI-generated and should be engaged with critically, just like any commentary.
We don't replace your Bible. Abby is a study companion, not a substitute. The goal is always to point you back to Scripture itself — to open your Bible, read the passage, and think about what it means.
"All Scripture is God-breathed and profitable for teaching, for reproof, for correction, and for instruction in righteousness, that each person who belongs to God may be complete, thoroughly equipped for every good work." — 2 Timothy 3:16-17 (WEB)
Frequently Asked Questions
Is Abby trained on the Bible?
Not in the traditional AI sense. All 31,103 verses of the WEB are stored as vector embeddings in a database. When you ask a question, relevant verses are retrieved by semantic similarity and provided to the AI as context — so every answer is grounded in actual Scripture, not generated from memory.
What is RAG and how does Abby use it?
RAG (Retrieval Augmented Generation) retrieves relevant documents from a database before generating a response. Abby retrieves real Bible verses matched to your question, then generates explanations grounded in those verses — dramatically reducing hallucination.
Can Abby make up Bible verses?
Abby's citation system is designed to prevent this. Every citation badge shows a real verse retrieved from the database — with book, chapter, verse number, and full text. The AI generates explanations based on these retrieved verses, not from memory.
What Bible translation does Abby use?
The World English Bible (WEB) — a modern, readable, public-domain translation based on the American Standard Version, updated for contemporary English.