Skip to content

Semantic Search

Eliran Wong edited this page May 8, 2023 · 8 revisions

Semantic Search

The Semantic Search feature is now available starting from version 34.78 of the Unique Bible App.

Advantages Compared to Standard Search Methods

With the Unique Bible App semantic search functionality, you can enjoy the following benefits:

  1. Conduct searches using natural language queries, making it easier for you to find what you're looking for in the bible.

  2. Search using various phrases and arrangements, even if you can't recall the exact wording. This feature is particularly effective in locating similar phrases across different bible translations.

  3. Receive responses based on your preferred version of the bible.

  4. Perform more than just a basic search - write summaries, comparisons and more.

Query Any Bible Version of Your Preference

With the semantic search feature of the Unique Bible App (UBA), you can seamlessly query any bible version of your choice and receive relevant responses.

Whenever you utilize UBA's semantic search, the platform automatically verifies the availability of the GPT index on the currently opened bible version.

If the corresponding GPT index is absent, UBA demonstrates its exceptional capabilities by generating them and saving them locally in the "UniqueBible/llama_index/" folder.

The semantic search response is subsequently created based on the GPT index of your selected bible version.

For instance, if you use the ChatGPT chatbot to quote verses, it may provide verses from diverse bible versions. Nonetheless, with UBA's semantic search, you can request GPT to provide quotes from the bible version you're using.

Setup

Users need to register an OpenAI account and generate a API key first at: https://platform.openai.com/account/api-keys

Read pricing at: https://openai.com/pricing

After you get an OpenAI API key, set it up via "Bible Chat" plugin in desktop version:

https://github.com/eliranwong/UniqueBible/wiki/Bible-Chat-with-ChatGPT-API#quickstart

For terminal users, enter:

.chat

...

and select "change API key"

In running modes other than desktop or terminal mode, configure "openaiApiKey" entry in file "config.py"

How to Use

In Unique Bible App main window / master control window command entry, enter:

semantic:::your query

Replace "your query" with your own query

Examples

The following examples use GPT index of NET bible version.

Input:

semantic:::slow to speak

Output:

The phrase "slow to speak" is found in James 3:2, which states, "For we all stumble in many ways. If someone does not stumble in what he says, he is a perfect individual, able to control the entire body as well." This verse is encouraging us to be slow to speak, so that we can avoid stumbling in our words and maintain control over our bodies.

Input:

semantic:::quote verses about "God created the earth"

Output:

Genesis 1:1 - "In the beginning God created the heavens and the earth."
Genesis 1:9 - "God said, “Let the water under the sky be gathered to one place and let dry ground appear.” It was so."
Genesis 1:11 - "God said, “Let the land produce vegetation: plants yielding seeds and trees on the land bearing fruit with seed in it, according to their kinds.” It was so."

Input:

semantic:::Jesus met Nicodemus

Output:

Yes, Jesus met Nicodemus. In John 3:1-2, it states that Nicodemus, a Pharisee and member of the Jewish ruling council, came to Jesus at night and spoke to him. Jesus then replied to Nicodemus in verses 3-8.

Input:

semantic:::similar verses to Genesis 1:1 in Hebrews

Output:

Hebrews 1:2 - "in these last days he has spoken to us in a son, whom he appointed heir of all things, and through whom he created the world."
Hebrews 1:10 - "And, “You founded the earth in the beginning, Lord, and the heavens are the works of your hands."

Input:

semantic:::write a summary on Exodus 13

Output:

Exodus 13 is about the Lord instructing Moses to set apart the firstborn males of the Israelites as his own. Moses then tells the people to remember the day they left Egypt and to celebrate a festival to the Lord for seven days, eating bread without yeast. He also tells them to tell their sons that the Lord brought them out of Egypt with a mighty hand. The Lord then leads the Israelites around the wilderness to the Red Sea, and Moses takes the bones of Joseph with him. The Lord goes before them in a pillar of cloud by day and a pillar of fire by night, so that they can travel day or night.

Input:

semantic:::compare Mark 1 and John 1

Output:

Mark 1 and John 1 both describe the beginning of Jesus' ministry. Mark 1 focuses on Jesus' baptism and the events that follow, while John 1 focuses on the identity of Jesus as the Word of God and the Lamb of God. Both passages emphasize Jesus' authority and the importance of repentance and belief in the gospel. Mark 1 also mentions John the Baptist's ministry of baptizing people for the forgiveness of sins, while John 1 emphasizes the importance of recognizing Jesus as the one sent from God.

Clone this wiki locally