Show HN: Bible as RAG Database

crosscanon.com

151 points by jacksonastone 2 days ago


Made this in a free evening. Index an permissive license translation of the Bible (WEB) into a RAG database to allow returning passages of similar semantic meaning. Lots of fun. For example, "more money more problems" returns Ecclesiastes 5:9-13 which, I'll just say, is spot on..

"Moreover the profit of the earth is for all. The king profits from the field. He who loves silver shall not be satisfied with silver, nor he who loves abundance, with increase. This also is vanity. When goods increase, those who eat them are increased; and what advantage is there to its owner, except to feast on them with his eyes? The sleep of a laboring man is sweet, whether he eats little or much; but the abundance of the rich will not allow him to sleep. There is a grievous evil which I have seen under the sun: wealth kept by its owner to his harm."

Anyway - thought it was fun enough to share. It's slow and I vibe coded it so I haven't sorted out how to make it not take 15 seconds to vector search against the full 4GB index.

asim - 2 days ago

That's cool! I did the same for the Quran to see how RAG works. I also indexed related works called "Hadith" and the names of Allah. It initially required indexing everything using OpenAI embeddings and then powered by it.

https://reminder.dev/search

It's also open source

https://github.com/asim/reminder

kordlessagain - 2 days ago

This is really cool...great job! It's a favorite pastime of mine to index various large corpora.

As for speed, this might help for code referencing: https://github.com/deepbluedynamics/lume

Blog post: https://deepbluedynamics.com/blog/lume-retrieval-primitives

I use a small local model to extract entities for the graph, but it's not necessary.

You can optionally use GTR-T5 which is a few years old now, but still good for generating fast and free embeddings. That step is only run once if you run it in hybrid mode.

Feel free to take and remix or use!

atmanactive - a day ago

For completeness, this should include all possible books, including Ethiopian, and then it should include a drop-down with pre-defined sets one could choose from (Protestant, Catholic, Orthodox...).

mcswell - 2 days ago

Slow, but interesting. I used the query "government" and got back passages in Romans 13 (as I expected), but also passages in Daniel and Ezra describing decrees by government officials, which made sense.

bigggbob - 20 hours ago

Nice project. The 4GB index / ~15s search part made me think zvec might be a good fit here: https://github.com/alibaba/zvec

It’s an in-process vector DB, so the “local corpus, no separate server” shape is pretty much what it’s designed for. Its benchmark numbers are quite strong, and recent versions also support full-text + hybrid retrieval and DiskANN.

This would be an interesting case to try with zvec: same corpus, same embedding model, then compare indexing time, index size, memory usage, and query latency on normal hardware.

ReactiveJelly - 2 days ago

> The king profits from the field

For the solution, read Henry George!

- 2 days ago
[deleted]
andrethegiant - 2 days ago

I vibed up something similar, comparing the verses of the big 3 religions. Cloudflare vectorize for embeddings db. https://crazy.church

regus - 2 days ago

Did you include the Deuterocanonical books?

jupr - a day ago

There are lots of fair use translations available here at https://www.crosswire.org/sword/index.jsp

sputknick - 2 days ago

Would love to use if you can get it back up! Sounds like an awesome idea for a way to converse with the Bible

usrme - 2 days ago

Thanks for creating this, this is really fun to play around with! Is the code for this out in the open if someone would want to peek under the hood?

high_5 - 2 days ago

Excellent! Just searching "giants" pops our many more of these characters than just Nephilim and Goliath.

_andrei_ - 9 hours ago

"artificial intelligence" chuckled

stevefan1999 - 10 hours ago

just how far are we from the machine god in the Warhammer 40K universe

johsole - a day ago

Very happy you built this. I was thinking about building this myself.

yjftsjthsd-h - 2 days ago

Any chance you wrote it up anywhere? I'm somewhat interested in RAG and a worked example would be nice.

NDlurker - 2 days ago

This is really cool. Thank you for sharing.

iqihs - 2 days ago

Not super impressed with this considering you can get better results in seconds from any basic LLM workflow.

keithnz - 2 days ago

Looking for slavery, it comes up with Leviticus 25:46-49 but misses the context that starts at verse 44.

Bnjoroge - a day ago

Cool. What rag techniques did you use?

LarsDu88 - 2 days ago

Pretty effective. You can even type in "child murder" and "genocide" and get relevant passages

bloaf - 2 days ago

My search returned what might as well have been a random assortment of bible verses. It made me wonder what Terry Davis would have thought of modern AI. Would it be the natural evolution of his shortcut for random bible verses that he built into TempleOS, or would it be the opposite and a voice of evil?

BuenosDiaz - a day ago

This is really cool! I like the idea :)

- 2 days ago
[deleted]
jnamaya - 2 days ago

The site is not loading for me! Interesting project

dredmorbius - 2 days ago

RAG, for those unfamiliar, retrievel-augmented generation:

<https://en.wikipedia.org/wiki/Retrieval-augmented_generation>

cluckindan - 2 days ago

Can we have apocryphal books too, like Moses 6 & 7 :)

gaiagraphia - 2 days ago

First result for "Jesus":

>Jacob kissed Rachel, and lifted up his voice, and wept. Jacob told Rachel that he was her father’s relative, and that he was Rebekah’s son. She ran and told her father. When Laban heard the news of Jacob, his sister’s son, he ran to meet Jacob, and embraced him, and kissed him, and brought him to his house. Jacob told Laban all these things. Laban said to him, “Surely you are my bone and my flesh.” Jacob stayed with him for a month. Laban said to Jacob, “Because you are my relative, should you therefore serve me for nothing? Tell me, what will your wages be?”

- 2 days ago
[deleted]
cdong - 2 days ago

pg-vector with hnsw is still 15 seconds?

- 2 days ago
[deleted]
GreyOcten - 2 hours ago

[dead]

heliskyr2 - 21 hours ago

[flagged]

ahmet_ozel - a day ago

[flagged]

ctdinjeu7 - a day ago

[dead]

anamnesis - 2 days ago

[dead]

condwanaland - 2 days ago

Searched for "sexual exploration". One of the results i got returned was from corinthians and read:

The wife doesn’t have authority over her own body, but the husband does. Likewise also the husband doesn’t have authority over his own body, but the wife does.

I'm so glad this religion of peace sees consent as profoundly unimportant