Skip to content

ameenh1/Arrodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LOTM QA System

Monorepo structure:

  • backend/ - Python backend + CLI (FastAPI-ready)
  • frontend/ - Next.js frontend (to be created)

This repo currently contains a CLI-based question-answering system for the Lord of the Mysteries novel using LangChain and Groq.

Setup

1. Create a virtual environment

python -m venv venv
venv\Scripts\activate  # Windows

2. Install dependencies

pip install -r requirements.txt

3. Get API Keys

4. Create .env file

Copy .env.example to .env and fill in your API keys:

GROQ_API_KEY=your_key_here
OPENAI_API_KEY=your_key_here

5. Run the system

python backend\main.py

Dev (frontend + backend)

Starts the FastAPI API on :8000 and the Next.js UI on :3000:

./scripts/dev.ps1

You can override ports:

./scripts/dev.ps1 -BackendPort 8001 -FrontendPort 3001

The first run will:

  1. Load the LOTM novel text
  2. Split it into chunks
  3. Create embeddings (using OpenAI)
  4. Build a vector store in ./chroma_db/

Subsequent runs will use the cached vector store for faster startup.

Usage

Once running, just ask questions:

Ask a question about LOTM: Who is Klein Moretti?
Ask a question about LOTM: What are Pathways?
Ask a question about LOTM: Tell me about Mr. Fool

Type exit to quit.

File Structure

  • backend/main.py - Main CLI script
  • backend/loader.py - Document loading and chunking
  • backend/embeddings_setup.py - Local Chroma vector store helpers
  • backend/supabase_vectorstore.py - Supabase vector store helpers
  • backend/requirements.txt - Python dependencies
  • .env - Your API keys (create from .env.example)
  • chroma_db/ - Local vector store (created on first run)

Notes

  • First run takes 1-2 minutes (embedding the novel)
  • Subsequent runs are fast (loads from cache)
  • Answers are sourced from the novel text with citations

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors