Skip to content

Igniters-week5 - ESV Bible companion RAG AI#2046

Open
nsikanikpoh wants to merge 2 commits intoed-donner:mainfrom
nsikanikpoh:igniters-week5
Open

Igniters-week5 - ESV Bible companion RAG AI#2046
nsikanikpoh wants to merge 2 commits intoed-donner:mainfrom
nsikanikpoh:igniters-week5

Conversation

@nsikanikpoh
Copy link
Contributor

I used langchain, gpt-4.1-nano . Gradio to build an ESV Bible companion that balances word-for-word accuracy with modern, readable English like the ESV Bible does. Handy for a Sunday School teacher, Bible scholar, or personal studies.

  • Given a Sunday school topic, the companion generates bible verses that are relevant to the topic.
  • Given an excerpt from the Bible, the companion generates bible verses that are relevant to the excerpt
  • At the end of every answer, the companion generates what The bible wants us to do as lessons from the bible verse found. @iamumarjaved
Screenshot from 2026-03-04 22-42-37 Screenshot from 2026-03-05 00-13-08 Screenshot from 2026-03-05 00-14-59 Screenshot from 2026-03-05 00-16-50 Screenshot from 2026-03-05 00-25-29

@iamumarjaved
Copy link
Contributor

@nsikanikpoh Thank you for the submission. Just for future reference you can improve these few things in the code:

  • load_dotenv() is called after embeddings is initialized in ingest.py, move it to the top before any env-dependent code, and remove the unused OpenAIEmbeddings import
  • No error handling if KNOWLEDGE_BASE directory doesn't exist or has no .md files will silently produce an empty vector store
  • combined_question() concatenates all prior user messages for retrieval, which can pollute queries in long conversations — limit to the last 2–3 turns
  • format_context() has a stray print(doc.metadata) debug statement that should be removed before deploying
  • History is passed as raw list[dict] into convert_to_messages() explicitly construct HumanMessage/AIMessage objects instead to avoid silent breakage

@iamumarjaved
Copy link
Contributor

@ed-donner This is ready to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants