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.
- π 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
- Clone the repo
git clone https://github.com/vildursn/RuleLawyer.git- Install necessary packages
pip install -r requirements.txt-
Create a folder inside
data/rawfor your rulebook, and upload your PDF(s) into that folder -
Add your OpenAI key to the .env file
-
Run the following
python src/ingest.pypython src/embed.pypython src/gui.py