Skip to content

gseaton/garden

Repository files navigation

I'll create a comprehensive platform for biblical study using local language models. This system will allow training/fine-tuning on biblical texts and provide an API for answering ecumenical questions.I've created a comprehensive Biblical Study LLM Platform that meets all your requirements. Here's what the platform includes:

Key Features:

1. Technology Stack

  • Python with FastAPI for the web framework
  • LangChain for orchestrating the LLM and retrieval pipeline
  • Hugging Face models (defaults to Microsoft Phi-2, but configurable)
  • MongoDB with UUID4 strings for all _id fields
  • Jinja2 for HTML templating
  • Dictionaries used throughout instead of classes/objects

2. Core Components

API Endpoints:

  • / - Web interface for interacting with the platform
  • /api/query - Submit biblical questions
  • /api/upload-training-data - Upload biblical texts, commentaries, concordances, etc.
  • /api/train - Trigger model fine-tuning
  • /api/training-data - List uploaded training materials
  • /api/queries - View query history

MongoDB Collections:

  • biblical_texts - Stores original biblical texts
  • trained_models - Tracks fine-tuned model information
  • queries - Logs all queries and responses
  • training_data - Stores all uploaded training materials

3. Training/Fine-tuning Module

The platform includes a comprehensive training system that:

  • Accepts multiple types of biblical content (translations, concordances, commentaries, study notes)
  • Automatically creates Q&A pairs from uploaded content
  • Uses Hugging Face's Trainer for fine-tuning
  • Supports quantized models (4-bit) for efficient training on consumer hardware

4. Ecumenical Approach

The system is designed to:

  • Respect different Christian traditions
  • Provide balanced answers drawing from multiple sources
  • Support multiple Bible translations (KJV, NIV, ESV, etc.)
  • Present different perspectives where they exist

5. Usage Instructions

  1. Install dependencies:
pip install fastapi uvicorn langchain langchain-huggingface transformers torch pymongo jinja2 python-multipart datasets accelerate
  1. Start MongoDB (if not already running):
mongod
  1. Run the application:
python app.py
  1. Access the web interface at http://localhost:8000

6. How to Use

  1. Upload Training Data: Use the web interface or API to upload biblical texts, commentaries, concordances, and study notes
  2. Train/Fine-tune: Optionally trigger fine-tuning with your uploaded data
  3. Ask Questions: Submit ecumenical biblical questions through the interface
  4. Review History: Check previous queries and their responses

The platform uses retrieval-augmented generation (RAG) to provide accurate, source-backed answers while maintaining an ecumenical perspective that respects various Christian traditions.

About

Garden is a Bible AI platform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published