9 ms·
Show HN: Bible as RAG Database
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.
- deleted 3mo ago[deleted]
- sputknick 3mo agoWould love to use if you can get it back up! Sounds like an awesome idea for a way to converse with the Bible
- sputknick 3mo agoNevermind, it eventually loaded
- deleted 3mo ago[deleted]
- jnamaya 3mo agoI built a Bible scholar agent using RAG grounded in the Berean Standard Bible. Is the same concept but an LLM discern the text for you. Here is the link to the demo: https://safi.selfalignmentframework.com/ https://safi.selfalignmentframework.com/ Choose the Bible Scholar agent and use deepseek or Gemini 3.5 for the LLM.
- 3stacks 3mo agoIt’s great to see more stuff like this. Thank you for your contribution
- jnamaya 3mo agoThe site is not loading for me! Interesting project
- mcswell 3mo agoYou have to wait awhile. It came up for me after 30 seconds or so.
- jacksonastone 3mo agoit's basically running on a toaster, sorry
- TeMPOraL 3mo agoIf that toaster didn't have a plan already, then feeding it with monotheistic holy scripture will definitely give it some ideas.
- a96 3mo agoA toaster is just a death ray with a smaller power supply
- TeMPOraL 3mo agoLess power, more hatred towards humankind.
- red-iron-pine 3mo agoonly if you take it in the bath, or don't unplug it before fishing out a trapped slice
- jacksonastone 3mo agoI wonder if polytheistic toaster would be more or less... ambitious.
- mcswell 3mo agoSlow, 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.
- jacksonastone 3mo ago6x'd the speed if you wanted to try again
- anamnesis 3mo ago[dead]
- regus 3mo agoDid you include the Deuterocanonical books?
- zoogeny 3mo agoIt would be nice if there was a listing of exactly what was included somewhere.
- jacksonastone 3mo agoWEB translation of Protestant Canon, but your point is a good one. I will kick the agents.
- smitty1e 3mo agoNo, and it's not KJV. Maybe NKJV? I searched Eccl7:13 "Consider the work of God: for who can make that straight, which he hath made crooked?" and it came back with: Ecclesiastes 7:12-15 For wisdom is a defense, even as money is a defense; but the excellency of knowledge is that wisdom preserves the life of him who has it. Consider the work of God, for who can make that straight which he has made crooked? In the day of prosperity be joyful, and in the day of adversity consider; yes, God has made the one side by side with the other, to the end that man should not find out anything after him. All this I have seen in my days of vanity: there is a righteous man who perishes in his righteousness, and there is a wicked man who lives long in his evildoing.
- jacksonastone 3mo agoAh no it doesn't but could be added. The books are listed in the checkbox list
- LarsDu88 3mo agoPretty effective. You can even type in "child murder" and "genocide" and get relevant passages
- LarsDu88 3mo agoFun exercise. Type in pokemon or japanese. You can really see the nearest neighbor text in embedding space. Pokemon gives passafes referencing animals and japanese passages referencing foreigners
- hogehoge51 3mo agoyes, this is quite fun - very distant in time and geography, but converging in semantic space. 天照大 (Amaterasu) > He brought me into the inner court of the LORD’s house; and I saw at the door of the LORD’s temple, between the porch and the altar, there were about twenty-five men with their backs toward the LORD’s temple and their faces toward the east. They were worshiping the sun toward the east. 神武天皇 (Emperor Jimmu) > As he was worshiping in the house of Nisroch his god, Adrammelech and Sharezer his sons struck him with the sword; and they escaped into the land of Ararat. Esar Haddon his son reigned in his place.
- gaiagraphia 3mo agoFirst 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?”
- jact 3mo agoHypothesis: This passage lists a lot of names repeatedly, and Jacob is in the genealogy of Jesus. Genealogies also list a lot of names. So perhaps somehow it’s jumping from Jesus to Jacob?
- bloaf 3mo agoMy 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?
- andrethegiant 3mo agoI vibed up something similar, comparing the verses of the big 3 religions. Cloudflare vectorize for embeddings db. https://crazy.church https://crazy.church
- kordlessagain 3mo agoThat's impressive and really fast. I asked it what it thought about vector databases: Finally, brethren, whatsoever things are true, whatsoever things {are} honest, whatsoever things {are} just, whatsoever things {are} pure, whatsoever things {are} lovely, whatsoever things {are} of good report; if {there be} any virtue, and if {there be} any praise, think on these things. {honest: or, venerable}
- trafalgar_nah 3mo agoCan I ask what you’re using for voice AI?
- andrethegiant 3mo agoWhisper running in cloudflare AI worker
- NDlurker 3mo agoThis is really cool. Thank you for sharing.
- dredmorbius 3mo agoRAG, for those unfamiliar, retrievel-augmented generation: <https://en.wikipedia.org/wiki/Retrieval-augmented_generation https://en.wikipedia.org/wiki/Retrieval-augmented_generation>
- hogehoge51 3mo agoThe Bible, for those unfamiliar, it’s the civilization source code forked and maintained by the Jesus cult that emerged about 2 millennia ago. https://en.wikipedia.org/wiki/Bible https://en.wikipedia.org/wiki/Bible (To put it in Hacker terms, where I suspect RAG could be a more familiar term than Bible)
- Shadowmist 3mo agoTIL
- jacksonastone 3mo agoshots fired!
- hogehoge51 3mo agoThe return volley is worse! My attempt at explaining the concept of a Bible in terms relative to a "hacker world view" is making me bleed many downvotes ;-) The Bible as a RAG is very interesting for me even as a non religious person - A document that has survived and guided millennia of civilization should be accessible as possible. But also seeing how concepts of the modern world and different ancient worlds map to the Bible via a RAG is fascinating.
- cluckindan 3mo agoSearch for ”destroy”
- boston_clone 3mo agoor “slavery”
- deleted 3mo ago[deleted]
- iqihs 3mo agoNot super impressed with this considering you can get better results in seconds from any basic LLM workflow.
- FloorEgg 3mo agoYes but for probably 1000x the energy/cost.
- jacksonastone 3mo agoI wanted to know it was only returning source. My suspicions always go up when I have the LLM lean on its "deep memories". too much fluff, inconsistent translations, stuff like that.
- keithnz 3mo agoLooking for slavery, it comes up with Leviticus 25:46-49 but misses the context that starts at verse 44.
- jacksonastone 3mo agoGroups by paragraphs when collecting embedding
- ReactiveJelly 3mo ago> The king profits from the field For the solution, read Henry George!
- condwanaland 3mo agoSearched 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
- laichzeit0 3mo agoYou have to keep reinterpreting it until it aligns with whatever the masses currently consider to be true. This has been going on forever. The current hot reinterpretation is to say we’ve been wrong in what the scriptures teach about same-sex relationships and aaacktshually.. it’s fine.
- sapphicsnail 3mo agoJesus doesn't say anything very explicit about homosexuality but he's pretty clear that no one should be rich and it's never ok to kill. I've been seeing a lot of hot reinterpretations on that front.
- jacksonastone 3mo agoYou could make the case I've just been indoctrinated in this stuff (genuine believer) but I take that to be a profoundly progressive verse given the context Paul is writing. Notice the symmetry.
- condwanaland 3mo agoI do notice the symmetry. It is saying that each of them can use the others body as they like, without regard for the other. But that's fine, because they can do it right back. A progressive system is not built off "I'll do what I want to you but I also will let you do it back". That conveniently ignores that there is still an entirely non-consenting party in this. Your body belongs to you. Your partners body belongs to them. And religious institutions teaching the opposite of this is what has lead to decades of marital rape and entitlement. I call that very very far from a progressive system
- cdong 3mo agopg-vector with hnsw is still 15 seconds?
- kordlessagain 3mo agoThis 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 https://github.com/deepbluedynamics/lume Blog post: https://deepbluedynamics.com/blog/lume-retrieval-primitives 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!
- asim 3mo agoThat'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 https://reminder.dev/search It's also open source https://github.com/asim/reminder https://github.com/asim/reminder
- jacksonastone 3mo agoYes! looks like yours has more features (I considered generating the audio) FWIW I observed that the embedding gives the most signal when I pass whole paragraphs (for all I know the Quran is in lyrical verse so maybe that doesn't work)
- asim 3mo agoAh interesting. So I'm using an English translation. Tbh I wish I could do more with the Arabic but the models are not perfect at that. But the idea of giving it whole paragraphs makes a ton of sense. Tried to generate audio but wasn't satisfied with the interpretation of some words, saying that thou may try again.
- deleted 3mo ago[deleted]
- mero22 3mo agoThis is wonderful! Thank you! My friend has been looking for a good transliterated version of the Quran. I see I can hover/click over a word to view the transliteration, is it possible to have an option to show transliteration, like word-by-word translation? I added an issue https://github.com/asim/reminder/issues/111 https://github.com/asim/reminder/issues/111 Thanks again!
- deleted 3mo ago[deleted]
- yjftsjthsd-h 3mo agoAny chance you wrote it up anywhere? I'm somewhat interested in RAG and a worked example would be nice.
- jacksonastone 3mo agoI'll just open source it, just a sec (keep in mind, vibe coded :D) https://github.com/jacksonStone/cross-cannon https://github.com/jacksonStone/cross-cannon
- usrme 3mo agoThanks 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?
- jacksonastone 3mo agoYeah just made repo public: https://github.com/jacksonStone/cross-cannon https://github.com/jacksonStone/cross-cannon
- deleted 3mo ago[deleted]
- cluckindan 3mo agoCan we have apocryphal books too, like Moses 6 & 7 :)
- high_5 3mo agoExcellent! Just searching "giants" pops our many more of these characters than just Nephilim and Goliath.
- atmanactive 3mo agoFor 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...).
- jacksonastone 3mo agoYeah a drop down list like that would be sweet. I think you'd have to format / find the open source version / translation of that text. Finding a well formatted and readable, public use (not just nkjv for example) was tricky For WEB I had to do a good b it of data massaging to get it in a consumable format..
- jacksonastone 3mo agoGot the protestant and catholic now. Orthodox I am discovering is not a simple matter of "just include the canon"!
- atmanactive 3mo agoFantastic. Thank you!
- BuenosDiaz 3mo agoThis is really cool! I like the idea :)
- jupr 3mo agoThere are lots of fair use translations available here at https://www.crosswire.org/sword/index.jsp https://www.crosswire.org/sword/index.jsp
- jacksonastone 3mo agoAh very interesting. For this one, I had to dig up an older repo I made where I converted WEB translation into one big json file to make it easier to work with. Not sure the formats exposed and how... pliable? they are. (https://github.com/jacksonStone/Bible_as_JSON https://github.com/jacksonStone/Bible_as_JSON)
- Bnjoroge 3mo agoCool. What rag techniques did you use?
- johsole 3mo agoVery happy you built this. I was thinking about building this myself.
- ctdinjeu7 3mo ago[dead]
- ahmet_ozel 3mo ago[flagged]
- heliskyr2 3mo ago[flagged]
- bigggbob 3mo agoNice project. The 4GB index / ~15s search part made me think zvec might be a good fit here: https://github.com/alibaba/zvec 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.
- stevefan1999 3mo agojust how far are we from the machine god in the Warhammer 40K universe
- _andrei_ 3mo ago"artificial intelligence" chuckled
- GreyOcten 3mo ago[dead]
- Ashitakar 3mo ago[dead]
- benjaminhays 3mo agoWould love to see this for Jewish legal texts via Sefaria. A RAG database for Talmud Bavli and Yerushalayim would be super neat.
- Reuben_Santoso 3mo agothis is great. I now could find passages that fits semantically
- xmmxovo 3mo agoThat’s so cool. It sounds like I could even drop different books in there and let the data form connections between viewpoints.
- WenboS 3mo ago[dead]