MasterScroll
Create your D&D 5.5e character with an assistant that knows the rulebooks.
99.79% available over 24 h · Updated last month · History

The problem
Building a D&D 5.5e character means cross-referencing hundreds of rulebook pages: species, classes, backgrounds, feats and rules that change between editions.
Generic assistants mix editions or invent traits. The goal was an assistant that builds the sheet and justifies every choice with the rulebook.
The approach
Three-phase flow orchestrated with LangGraph: onboarding (up to 7 questions about concept and style), draft (RAG over the rulebooks + LLM) and iterative refinement via chat.
Optional web search with Tavily for community content, kept separate from rulebook retrieval.
Interactive final sheet, exportable to PDF.
Architecture
React + Vite + Tailwind frontend; FastAPI backend with SSE streaming.
RAG with LlamaIndex over ChromaDB; ingestion with coordinate-aware PyMuPDF and tesseract OCR for scanned rulebooks; Cohere embed-multilingual-v3.0 embeddings in production (nomic-embed-text with Ollama locally); Cohere reranking.
Swappable LLM: Ollama llama3.1:8b locally or Groq (gpt-oss-120b) in the cloud, behind a common interface.
PostgreSQL for sheets and sessions, Redis for session cache and streaming, WeasyPrint for the PDF. Ingestion from local PDFs or from Google Drive without touching disk.
Decisions that mattered
Rulebooks are not in the repository (copyright): ingestion accepts a Google Drive folder via service account and processes PDFs in memory.
LLM provider and model are chosen by environment variable: free local development with Ollama, Groq in production. When Groq retired llama-3.1-8b (September 2026), the migration was a configuration change. Qwen3-27B was ruled out by its 1,000 output-tokens/minute cap on the free tier; gpt-oss-120b has none.
Reranking after vector search: similarity alone kept pulling traits from the wrong class.
With no relevant passages the assistant still answers (it is a game assistant, not a syllabus) but says the rulebook was not consulted and cites nothing: the reranker threshold only decides what gets cited.
A fully scanned rulebook (no text layer) goes through CPU OCR at about 20 s per page; acceptable because ingestion is a one-off and the index persists on a volume.
Results
In production at masterscroll.iana-ai.com. Seven rulebooks indexed: 5,001 passages with page numbers (one of them, scanned, via OCR).
Measured on 15 Sep 2026 with 10 rules questions (gpt-oss-120b): chat p50 2.6 s, p95 13.3 s; 10 of 10 answers cite rulebook and page.
Complete flow: from seven questions to a PDF sheet.
Next
- Evaluation of the fidelity of cited rules
- Campaign management and multiple characters