Using local model with basic RAG to help reference rules when playing table top game
Using local model with basic RAG to help reference rules when playing table top game
So, ive never really used RAG before. I kept hearing about it and understood it in concept, so wanted to play around with it. I play a table top map drawing game called DELVE that has lots of rules to keep track of requiring lots of manual page flips on my slow ereader.
I wanted to see of it was possible to teach my local model about DELVE through my engines basic RAG system that works by providing a big text file and doing some keyword searches in it based off user input. The engine pulls in local chunks of text document around important keywords as context. This is different than more complex and sophisticated versions of RAG that work off fancy vector space math or something like that. Whatever, kobold is my engine of choice and I'm happy to have something that half works and is simple enough to grasp.
So the first step was converting the game manual PDF to text file. I did this using calibres ebook-convert tool. Then I looked through and tried to clean some glaring issues up invdvitably theres gonna be jank converting PDF unicode or tables.
sudo apt install calibre
ebook-convert delve.pdf delve.txt
Once its cleaned up a little I threw it in kobold lites context>textdb tab and enabled it.
Its cool how such a simple process manages to let the model leverage local datasets. I was shocked when it correctly recited proper game rules.