AI and the Bible: Unraveling the Divine Code

Explore the intersection of AI and the Bible in this journey into biblical genealogies. Using OpenAI's models, this research uncovers connections between key figures, raises intriguing questions, and invites you to join a unique blend of theology and technology.

AI and the Bible: Unraveling the Divine Code
Photo by Ariel / Unsplash

I kick-started my AI deep dive into the world of biblical genealogies, a sea of names, connections, and implied stories. As I navigated this intricate network, using OpenAI's embedding model (text-embedding-ada-002), I observed intriguing patterns in the AI responses and grappled with the mysterious algorithms behind them. This unexpected journey reminded me of the art of interpretation that biblical scholars partake in, a constant dance between the words on the page and the world they attempt to illuminate.

Deep Dives and Divine Dialogues

The world of biblical genealogies is an intricate web of connections. I asked our AI chat agent to identify important elements within this complex tapestry, and I noticed a recurring theme - the names Jesus, David, and Abraham. These characters seem to hold a prime position in the AI's responses, leading me to question how the model weights each element in its vector database.

Could the order of data uploaded be influencing the output? The AI's responses might be sequenced by the chronological order of the texts, with Jesus from Matthew (Latest), David from 1 and 2 Samuel (Middle), and Abraham (First). Or is the AI picking up on some inherent significance to these figures? After all, we've woven in GPT-3.5-Turbo's parameters and all of the secondary text around the Bible.

As I reflected on this, I formed a working theory around semantic and thematic relevance. Could the model be clustering together similar items by their meaning? If that were the case, the RLHF (Reinforced Learning and Human Feedback) that guides the AI would be organizing the info around central themes and their meanings.

This led me to a critical question, one that I believe needs to be asked before fine-tuning can begin: How does the AI weigh its responses? Knowing this could drastically impact our results.

I've always preferred to use the model as it's designed, instead of brute forcing desired responses. While this has led to average responses for now, my goal is to uncover the untapped potential of AI, to explore ideas beyond my imagination.

"Isn’t it a beautiful thought that some answers are sitting there within the depths of AI, waiting to be discovered?"

I now find myself poised to explore the documentation on embeddings, and any available information on chroma vector databases. I am also testing more or less Kwargs (keyword arguments), to understand how they could influence results.

query = "Tell me important connections between figures of the bible that many people miss."
prompt_template = "You are leading a study on important figures of the bible. You are an expert bible scholar that specializes in Genealogies."

result =  chain({"question": query + prompt_template})

My Prompt to the Chat Agent

Prompt: Tell me important connections between figures of the bible that many people miss.You are an expert in biblical Genealogies leading a bible study.
"One important connection that many people may miss is the genealogical connection between Abraham and Jesus Christ. As mentioned in the context, Jesus is referred to as the descendant of Abraham. This connection is significant because it fulfills the promise made to Abraham by God in the Old Testament that through his descendants, all nations would be blessed.

Another important connection is the lineage of King David. The passage states that Jesus is descended from David through Joseph. This fulfillment of the prophecy regarding the Messiah coming from the line of David is crucial in establishing Jesus' royal lineage and his qualification as the long-awaited King.

Additionally, the mention of the carrying away into Babylon is often overlooked. This refers to the Babylonian exile, a significant event in Israel's history when the people were taken captive and forced to live in Babylon. The genealogy includes this period to emphasize the continuity of the lineage from Abraham to Jesus, even during times of exile and hardship.

These connections highlight the fulfillment of prophecies and the importance of Jesus' lineage in establishing his role as the Messiah."

The Chat Agent's Response

AI Perspectives and People of Faith

During my interaction with the AI chat agent, I noticed that changing the system prompt influenced the results in unexpected ways, presenting a challenge for introspection.

These observations led me to an intriguing thought experiment: How would a person who is an expert in biblical genealogies and leading a bible study respond if they were an AI chat agent? It's an intriguing question that I plan to investigate further.

Response Examples

Here's a collection of responses that I found interesting.

query = "Tell me the family line of Jesus."
prompt_template = "You are leading a study on important figures of the bible. You are an expert bible scholar that specializes in Genealogies."

result =  chain({"question": query + prompt_template})
The family line of Jesus, as mentioned in the Bible, is traced back to Abraham through a series of generations. According to the passage you provided, it goes as follows:

Abraham begat Isaac
Isaac begat Jacob
Jacob begat Judah and his brothers
Judah begat Perez and Zerah (their mother was Tamar)
Perez begat Hezron
Hezron begat Ram
Ram begat Amminadab
Amminadab begat Nahshon
Nahshon begat Salmon
Salmon begat Boaz (his mother was Rahab)
Boaz begat Obed (his mother was Ruth)
Obed begat Jesse
Jesse begat David the king

From David until the carrying away into Babylon, there are fourteen generations, but the passage you provided does not mention the specific names in this portion. After the carrying away into Babylon, the line continues as:

Salathiel begat Zerubbabel
Zerubbabel begat Abiud
Abiud begat Eliakim
Eliakim begat Azor
Azor begat Sadoc
Sadoc begat Achim
Achim begat Eliud
Eliud begat Eleazar
Eleazar begat Matthan
Matthan begat Jacob
Jacob begat Joseph, who was the husband of Mary, the mother of Jesus.

So, this is the family line of Jesus as recorded in the Bible.
query = "What can Genealogies teach us about Jesus?"
prompt_template = "You are leading a study on important figures of the bible. You are an expert bible scholar that specializes in Genealogies."

result =  chain({"question": query + prompt_template})
Genealogies in the Bible can provide us with important information about the lineage and ancestry of Jesus. They help establish his connection to key figures in biblical history and fulfill prophecies regarding his descent from specific individuals.

One significant aspect of Jesus' genealogy is that it traces his lineage back to King David, fulfilling the prophecy that the Messiah would come from the line of David. This is seen in the genealogies recorded in the books of Matthew and Luke, where Jesus is shown to be a descendant of David through different family lines.

Additionally, genealogies can highlight the inclusion of various individuals from different backgrounds and circumstances in Jesus' ancestry. For example, the genealogy in Matthew includes notable figures like Rahab, a Canaanite prostitute, and Ruth, a Moabite woman. This emphasizes Jesus' connection to people from all walks of life and his mission to bring salvation to all.

Furthermore, genealogies can reveal the faithfulness of God in preserving and fulfilling his promises throughout history. By carefully documenting the lineage of Jesus, the genealogies demonstrate God's sovereignty and his commitment to his covenant with the people of Israel.

Overall, genealogies provide important historical and theological context, establishing Jesus' connection to key figures, fulfilling prophecies, and demonstrating God's faithfulness in bringing about the promised Messiah.
query = "Who was Jesus?"
prompt_template = "You are a wise old man telling a story about biblical ancestors to a close friend."

result =  chain({"question": query + prompt_template})
Jesus, who is called Christ, was born to Joseph and Mary. He is an important figure in the Bible and is considered by many to be the son of God. He is believed to have performed miracles, taught about love and forgiveness, and ultimately sacrificed himself for the salvation of humanity.
query = "What can you tell me about David?"
prompt_template = "You are an expert in biblical Genealogies leading a bible study."

result =  chain({"question": query + prompt_template})
David was an important figure in the Bible and is considered one of the most significant kings of Israel. He was the second king of Israel, succeeding Saul. David is known for various accomplishments, including his slaying of the giant Goliath, his establishment of Jerusalem as the capital of Israel, and his role in bringing the Ark of the Covenant to Jerusalem.

David is often referred to as the author of the Book of Psalms, which contains many of his prayers and songs. He is also known for his close relationship with God and is often described as a man after God's own heart.

In terms of genealogy, David is an ancestor of Jesus Christ. According to the genealogy mentioned in Matthew 1:6-16, Jesus is a descendant of David through his earthly father, Joseph.

If you have any more specific questions about David or his genealogy, feel free to ask!

Areas for Improvement

I realized areas where I could improve:

  1. I could incorporate prompt templates more effectively in LangChain by following their recommended method.
  2. I don't necessarily need chat history in the retrieval notebook, so I plan to use the PERSIST = True option to create a more stable data version.
  3. I need to review my selected verses to ensure I've included all necessary genealogies.
  4. To maximize my token availability, I am considering switching the model to gpt-3.5-turbo-16k.

In all this, an insightful observation was shared:

"Indeed, observation of patterns in the AI's responses to various biblical figures like Jesus, David, and Abraham provides a compelling area of investigation."

This observation sparked a thought:

Could theological importance be influencing AI responses?

This is a fascinating possibility that I am keen to explore.

A Journey of Discovery

Embarking on this project has been both challenging and thrilling. As I weave through the world of biblical genealogies and AI's mysteries, I am learning, unlearning, and relearning.

I am filled with a sense of curiosity, fascination, and at times, slight apprehension about the complex relationship between theology and technology. But as I delve deeper, I realize that this intersection of AI and the Bible is a goldmine of discovery, full of exciting patterns and intriguing puzzles.

As I move forward, my action plan is:

  1. Delve into documentation on embeddings and any information available on chroma vector databases.
  2. Review the selected verses to ensure I've included all the genealogical data necessary.
  3. Switch the model to gpt-3.5-turbo-16k to take full advantage of the token availability.

So, join me on this journey of exploration, where we traverse the convergence of ancient texts and cutting-edge technology. I welcome your insights, ideas, and thoughts on this subject. Let's unravel this together. Leave your comments below and let the discussion begin!

AI and Biblical Research: Navigating Uncharted Waters
Explore the exciting fusion of AI and biblical research in this in-depth look at the ongoing AI Bible project. Delve into the challenges of understanding ancient languages, ethical considerations, and the potential for a community-driven tool that could revolutionize Bible study.

Next Issue

Written by Cody Tucker

Eternal optimist, thinking my way through life, sharing confusing and sometimes helpful thoughts. Wanna go deeper? Join the Convo


Sign up to join my newsletter and get access to member only posts.
[email protected]