Skip to content

Search Bible with Natural Language via ChatGPT

Eliran Wong edited this page Oct 6, 2023 · 10 revisions

Search Bible with Natural Language via ChatGPT

Two command keywords in Unique Bible App are created for users to search bible modules with natural language.

They are:

  1. GPTSEARCH::: - generate a standard sql query, upon user input, and proceed a search

  2. SEMANTIC::: - semantic search of bible texts

This wiki page describes the first case.

Searching with GPTSEARCH::: is faster but searching with SEMANTIC::: is more flexible.

For semantic search, read https://github.com/eliranwong/UniqueBible/wiki/Semantic-Search

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

Enter your OpenAI API key in UBA:

In desktop version, launch "OpenAI API Key" dialog from menu "UniqueBible > Other Preferences".

openai_api_key

Alternately, you can set it up via "Bible Chat" plugin in desktop version:

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

For terminal mode users, run:

.chat

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

Usage

Enter command that starts with the keyword "GPTSEARCH" in command entry:

GPTSEARCH:::[BIBLE_VERSION(S)]:::[QUERY]

Examples:

GPTSEARCH:::NET:::slow to speak

GPTSEARCH:::NET:::verses contain both Jesus and love

GPTSEARCH:::NET:::verses contain spirit but not holy

GPTSEARCH:::NET:::verses contain faith in chapter 3

GPTSEARCH:::verses that contain both 'God' and 'faith' in the book of Isaiah

GPTSEARCH:::verses that contain 'God' and 'Lord' and regular expression 'Jesus.*?love'

Graphical User Interface

With Master Control Search tab, enter your query directly without entry of command keyword.

master_search

Semantic Search

https://github.com/eliranwong/UniqueBible/wiki/Semantic-Search

More about Using ChatGPT in UBA

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

Clone this wiki locally