Skip to content

🎲 RuleLawyer – An AI-powered assistant that helps you look up and understand board game rules using Retrieval-Augmented Generation (RAG). Upload your rulebooks and ask it anything!

Notifications You must be signed in to change notification settings

vildursn/RuleLawyer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎲 RuleLawyer

RuleLawyer is a lightweight, extensible framework for building a board game rules assistant using Retrieval-Augmented Generation (RAG). Upload your rulebooks (PDFs), process them into searchable chunks, and query them using a local interface powered by OpenAI.


🧠 What It Does

  • πŸ” Extracts text from board game rule PDFs
  • βœ‚οΈ Splits text into manageable chunks
  • 🧬 Embeds the chunks using OpenAI's embedding model
  • πŸ€– Answers questions about rules using semantic search + GPT

πŸš€ Getting Started

  1. Clone the repo
git clone https://github.com/vildursn/RuleLawyer.git
  1. Install necessary packages
   pip install -r requirements.txt
  1. Create a folder inside data/raw for your rulebook, and upload your PDF(s) into that folder

  2. Add your OpenAI key to the .env file

  3. Run the following

Extract and chunk rulebooks

python src/ingest.py

Embed the text chunks

python src/embed.py

Ask questions (WIP)

python src/gui.py

About

🎲 RuleLawyer – An AI-powered assistant that helps you look up and understand board game rules using Retrieval-Augmented Generation (RAG). Upload your rulebooks and ask it anything!

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages