Show HN: Bible as RAG Database

(crosscanon.com)

158 points | by jacksonastone 2 days ago

40 comments

  • 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

    • jacksonastone 2 days ago
      Yes! 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 2 days ago
        Ah 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.

      • mero22 1 day ago
        This 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

        Thanks again!

      • 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 2 days 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...).
          • jacksonastone 2 days ago
            Yeah 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 1 day ago
              Got the protestant and catholic now. Orthodox I am discovering is not a simple matter of "just include the canon"!
          • benjaminhays 4 hours ago
            Would love to see this for Jewish legal texts via Sefaria. A RAG database for Talmud Bavli and Yerushalayim would be super neat.
            • 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 1 day 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!

                • 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?”

                  • jact 2 days ago
                    Hypothesis:

                    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?

                  • 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
                    • kordlessagain 2 days ago
                      That'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 1 day ago
                        Can I ask what you’re using for voice AI?
                      • regus 2 days ago
                        Did you include the Deuterocanonical books?
                        • smitty1e 2 days ago
                          No, 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.

                          • martheen 2 days ago
                            That would be WEB, I'm guessing because WEB is public domain.
                            • smitty1e 2 days ago
                              I didn't know what WEB was, but I thought the dots were related.
                          • jacksonastone 2 days ago
                            Ah no it doesn't but could be added. The books are listed in the checkbox list
                            • jacksonastone 1 day ago
                              They are now optionally included based on the canon you pick
                              • zoogeny 2 days ago
                                It would be nice if there was a listing of exactly what was included somewhere.
                                • jacksonastone 2 days ago
                                  WEB translation of Protestant Canon, but your point is a good one. I will kick the agents.
                              • 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
                                • jnamaya 2 days ago
                                  I 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/

                                  Choose the Bible Scholar agent and use deepseek or Gemini 3.5 for the LLM.

                                  • 3stacks 2 days ago
                                    It’s great to see more stuff like this. Thank you for your contribution
                                  • sputknick 2 days ago
                                    Nevermind, it eventually loaded
                                • jupr 2 days ago
                                  There are lots of fair use translations available here at https://www.crosswire.org/sword/index.jsp
                                • 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.
                                  • 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.
                                    • _andrei_ 1 day ago
                                      "artificial intelligence" chuckled
                                      • iqihs 2 days ago
                                        Not super impressed with this considering you can get better results in seconds from any basic LLM workflow.
                                        • jacksonastone 2 days ago
                                          I 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.
                                          • FloorEgg 2 days ago
                                            Yes but for probably 1000x the energy/cost.
                                          • keithnz 2 days ago
                                            Looking for slavery, it comes up with Leviticus 25:46-49 but misses the context that starts at verse 44.
                                          • johsole 1 day ago
                                            Very happy you built this. I was thinking about building this myself.
                                            • LarsDu88 2 days ago
                                              Pretty effective. You can even type in "child murder" and "genocide" and get relevant passages
                                              • LarsDu88 2 days ago
                                                Fun 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 2 days ago
                                                  yes, 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.

                                              • 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?
                                                • stevefan1999 1 day ago
                                                  just how far are we from the machine god in the Warhammer 40K universe
                                                  • Bnjoroge 1 day ago
                                                    Cool. What rag techniques did you use?
                                                    • BuenosDiaz 2 days ago
                                                      This is really cool! I like the idea :)
                                                      • jnamaya 2 days ago
                                                        The site is not loading for me! Interesting project
                                                        • mcswell 2 days ago
                                                          You have to wait awhile. It came up for me after 30 seconds or so.
                                                          • jacksonastone 2 days ago
                                                            it's basically running on a toaster, sorry
                                                            • TeMPOraL 2 days ago
                                                              If that toaster didn't have a plan already, then feeding it with monotheistic holy scripture will definitely give it some ideas.
                                                              • jacksonastone 2 days ago
                                                                I wonder if polytheistic toaster would be more or less... ambitious.
                                                                • a96 2 days ago
                                                                  A toaster is just a death ray with a smaller power supply
                                                                  • TeMPOraL 2 days ago
                                                                    Less power, more hatred towards humankind.
                                                                    • red-iron-pine 2 days ago
                                                                      only if you take it in the bath, or don't unplug it before fishing out a trapped slice
                                                          • dredmorbius 2 days ago
                                                            RAG, for those unfamiliar, retrievel-augmented generation:

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

                                                            • hogehoge51 2 days ago
                                                              The 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

                                                              (To put it in Hacker terms, where I suspect RAG could be a more familiar term than Bible)

                                                              • dredmorbius 2 days ago
                                                                Civilisation, for those unfamiliar ... ;-)
                                                                • chrismorgan 2 days ago
                                                                  “Source code” is not at all the correct term. It’s more like the documentation.
                                                                  • chiply314 1 day ago
                                                                    Im always so disappointed in fellow hn people when reading stuff like this.

                                                                    Its not the code of our civilization at all.

                                                                    religion might be a component for a certain phase in a civilization, but it is one we have to overcome and not a positive one.

                                                                    And its very unclear how much real impact it has (positive or negative). Even without religion, people lived their lifes and progressed.

                                                                    I would argue even in the past religion hindered us as a civilization.

                                                                    Its a snippet of a culture from the middle east which spread certain mental virus across europe.

                                                                    • jacksonastone 2 days ago
                                                                      shots fired!
                                                                      • cluckindan 2 days ago
                                                                        Search for ”destroy”
                                                                      • hogehoge51 2 days ago
                                                                        The 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.

                                                                      • Shadowmist 2 days ago
                                                                        TIL
                                                                        • krapp 1 day ago
                                                                          The Jesus cult had a lot of forks but nothing was standardized until the Council of Nicaea formalized a spec and then later the King James committee published the framework that became the working standard.

                                                                          Think Javascript pre and post Microsoft. But with lots more violence.

                                                                          • mcswell 1 day ago
                                                                            The Jesus cult documents (and the documents before that fork) exist in thousands of languages besides Javascript/English... Indeed, the original FORTRAN/ Greek, plus LISP/ Ethiopic, not to mention the Assembler/ Hebrew from before the fork. And modern languages like Tzeltal/ Python.
                                                                      • cluckindan 2 days ago
                                                                        Can we have apocryphal books too, like Moses 6 & 7 :)
                                                                        • cdong 2 days ago
                                                                          pg-vector with hnsw is still 15 seconds?
                                                                          • Ashitakar 6 hours ago
                                                                            [dead]
                                                                            • heliskyr2 1 day ago
                                                                              [flagged]
                                                                              • ahmet_ozel 1 day ago
                                                                                [flagged]
                                                                                • GreyOcten 23 hours ago
                                                                                  [dead]
                                                                                  • ctdinjeu7 1 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

                                                                                        • jacksonastone 2 days ago
                                                                                          You 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 2 days ago
                                                                                            I 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

                                                                                            • jimmygrapes 2 days ago
                                                                                              Consider this: neither man nor women, when fully committed to each other as if they are one, and maybe even if they are not committed, can control the emotions and impulses inflicted upon them by the other.

                                                                                              It's ok to set aside misgivings about the whole thing and how the world has corrupted it all and just explore the possibility of depth and beauty and love. You don't have to chose the worst interpretation of things, even if others have.

                                                                                              • condwanaland 2 days ago
                                                                                                Describing my interpretation of a passage that quite literally says "your body belongs to someone else" as a 'worst possible reading' would be comically hilarious if not for the rather sinister undertones.

                                                                                                Your interpretation of this passage is reading far more into things and doing far more justifying than mine is

                                                                                                • danhau 2 days ago
                                                                                                  From your earlier comment:

                                                                                                  > It is saying that each of them can use the others body as they like, without regard for the other

                                                                                                  This is your own interpretation and it shows your bias. The bible (and I assume other religious texts) is easy to misinterpret due to bias. It's not written like a technical documentation where the tiniest details are specified; thus giving plenty opportunities to subject a text to arbitrary meaning.

                                                                                                  This was a problem even in biblical times. 2 Peter 3:16

                                                                                                  > as also in all of his letters, speaking in them of these things. In those, there are some things that are hard to understand, which the ignorant and unsettled twist, as they also do to the other Scriptures, to their own destruction.

                                                                                                  The solution is study. Not superficially reading and guesstimating, but to study the text itself, the surrounding verses, the context. Who wrote it? Who's the audience? What, more broadly, are they trying to say? Crosschecking with other verses in bible. Things like that (See Proverbs 2:1-5, Psalm 1:2, Joshua 1:8, Psalm 119:97, 1. Timothy 4:15)

                                                                                                  Coming back to the text in question (1. Corinthians 7:4). The surrounding verses provide context on what this is about:

                                                                                                  > To the unmarried and the widows I say that it is good for them to remain single, as I am. But if they cannot exercise self-control, they should marry. For it is better to marry than to burn with passion. > Let the husband give to his wife her due, and let the wife also do likewise to her husband. > Do not deprive each other except by mutual consent for an appointed time [...].

                                                                                                  Put simply: "marry and enjoy sex." That's basically what the apostle Paul is trying to say here. But of course, that alone doesn't debunk your interpretation.

                                                                                                  Paul also wrote Ephesians 5:28-33

                                                                                                  > In the same way husbands should love their wives as their own bodies. A man who loves his wife loves himself, for no man ever hated his own body, but he feeds and cherishes it [...] Each one of you must love his wife as he does himself; on the other hand, the wife should have deep respect for her husband.

                                                                                                  Also vers 25:

                                                                                                  > Husbands, continue loving your wives, just as the Christ also loved the congregation and gave himself up for it.

                                                                                                  There are further verses, but this comment is getting too long.

                                                                                                  • condwanaland 2 days ago
                                                                                                    Funny how my view that 'your body belongs to yourself and no one else' doesn't require study and cross-referencing and other passages to understand.
                                                                                                    • tanseydavid 2 days ago
                                                                                                      In a marriage context, if you apply "my body, my choice" as a justification for adultery be sure to let us know how that works out for you.

                                                                                                      IMHO there is more to this concept than you are considering.

                                                                                                      • condwanaland 1 day ago
                                                                                                        Your comment is just another flavour of various fallacies christrians trot out i.e., whats stopping you raping and murdering without the bibles moral framework

                                                                                                        And your also trying to twist my words in the opposite direction. I'm here claiming that someone's body belongs to only them. And your response is to say, if its only yours, why don't you go cheat??? Come on, this is straw manning at its finest.

                                                                                                        Your view comes from entitlement. You have a right to your partners body because a book says so. I say different. I have a responsibility to my partner because we are in love and build our beliefs together.

                                                                                                        Your view teaches subservience. You can add all the context you want, but at the end of the day, there is a line that says "your body belongs to your partner". And that line is used to subjugate.

                                                                                                        Whereas a healthy couple would start from the respect that they don't own each other, and then build the boundaries that they are comfortable with.

                                                                                                        • tanseydavid 1 day ago
                                                                                                          >> Your view comes from entitlement

                                                                                                          I did not state a viewpoint other than "I believe that you are considering too narrow a portion of the topic at hand."

                                                                                                          I am not in favor subservience in a relationship, except when such subservience is to the relationship itself, such as where you mention having a "responsibility to your partner."

                                                                                                      • TrnsltLife 1 day ago
                                                                                                        Sure, but that is literally the opposite of the Christian teaching. The previous chapter, 1 Corinthians 6, reads: "You are not your own. You were bought at a price. Glorify God with your body."

                                                                                                        Elsewhere it is written: "Present yourselves as living sacrifices, holy and acceptable until God, which is your reasonable act of worship."

                                                                                                        These are voluntary acts of obedience in the same way that Jesus, though being in the form of God, did not consider equality with God something to be grasped, but humbled himself, taking on the form of a servant, and being obedient even to death on a cross. (Philippians 2).

                                                                                                        To be a Christian is to take up your cross and follow Christ. Consenting to a lack of consent in how your body is treated hence forward. A martyr's painful death. Or the embrace of your spouse.

                                                                                                      • condwanaland 2 days ago
                                                                                                        Also, from your comment

                                                                                                        > "marry and enjoy sex" is what Paul is trying to say

                                                                                                        This is your interpretation and shows your own bias. I read it as "you must have consent from your partner to withhold your body from them". Which is revolting and coercive.

                                                                                                        • jacksonastone 2 days ago
                                                                                                          I think their point is if you are a reader of Paul's work and the surrounding text you can deduce pretty soundly he isn't saying take turns in mutual abuse, but something else. Big picture, Christianity has a central, and odd tension, of sacredness of individual, but also perfect unity in community. The Trinity as the prime example. But marriage also as two flesh becoming one. Much of Christian writing is how to resolve that seeming contradiction (individuality with perfect unity and love)
                                                                                                          • GlitchRider47 2 days ago
                                                                                                            Friend, you are right to question the meaning of the scripture. But, I urge you to continue. Don't stop after you've just begun. Investigate it. This is your kneejerk interpretation. Read the Gospels, read the Acts of the Apostles, see if your interpretation fits.

                                                                                                            Reading a helper function for an api call on a web server doesn't tell you what the web server is used for.

                                                                                                • laichzeit0 2 days ago
                                                                                                  You 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 2 days ago
                                                                                                    Jesus 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.