06
ThomasBot — Bible Chatbot
An intelligent chatbot able to answer Bible questions using a RAG architecture (Retrieval-Augmented Generation). Verses are indexed as semantic embeddings and an open-source LLM answers with context.
Sourced answers, 100% open-source
Stack
What happened?
- 01
The question
Can a chatbot get real understanding of a long text like the Bible, without expensive fine-tuning?
- 02
The problem
A bare LLM will say anything about a text it has never seen. The Bible is long, precise, and every verse must be sourced.
- 03
The hypothesis
If I split the text into verses, turn them into semantic embeddings, and feed the LLM only the passages relevant to the question, it can answer with sources.
- 04
The build
Verses indexed as embeddings (serialized with Pickle) → on-the-fly semantic search → contextual prompt to an open-source HuggingFace LLM → Streamlit interface.
- 05
The failure
At first the model hallucinated whenever semantic search returned an off-topic passage. The answer quality depended entirely on retrieval quality.
- 06
The discovery
The real work happens upstream: with good embeddings and good chunking, even a small open-source model gives sourced, honest answers — including “I don't know” when nothing matches.
- 07
The result
ThomasBot answers Bible questions with sourced verses, fully open-source, with no paid API.
- 08
The next frontier
Better semantic chunking, passage re-ranking, and systematic evaluation of answer quality.
