ASL Rules Assistant
An AI system that answers rules questions about Advanced Squad Leader using RAG and real-time streaming — built on OpenAI's Responses API.
How It Works
Retrieve
The question is sent to OpenAI's Responses API with a file_search tool
pointed at a vector store of the ASL rulebook. Up to 20 relevant chunks are retrieved.
Generate
Retrieved chunks are injected into the prompt and the model generates an answer, citing rule section numbers (e.g. A4.34). Conversation history is included for multi-turn context.
Respond
The answer streams in real time over WebSocket with cited rule section numbers (e.g. A4.34). Citations are clickable links that open the rulebook PDF at the exact page.
Technical Capabilities
RAG Pipeline
OpenAI Responses API with file_search. Vector store of the 1M+ token rulebook; multimodal document converted to text chunks.
Streaming WebSocket
Responses stream token-by-token to the browser. Markdown rendered progressively. TTFT, RAG latency, and cost surfaced per query.
In-Browser PDF Viewer
Rule citations like "A4.34" open the rulebook PDF in a modal at the correct page, powered by a section-to-page index.
Automated Evals
A zero-shot AI Judge evaluates answers against expected outputs. Results tracked by model, eval set, and question type with pass/fail rates.
Production Stats (live averages from production chat)
Demo
Live demo showing a rules question, RAG retrieval, and cited response with PDF navigation.
The Domain Challenge
Advanced Squad Leader (ASL) is a tactical WW2 board game published by Avalon Hill in 1985. Its rulebook exceeds 1 million tokens — roughly 2.5× the length of Deep Learning by Goodfellow et al. — and contains dense cross-references, exception tables, and numerical calculations that challenge standard RAG approaches.
Rules questions often require chaining multiple lookups (terrain modifiers, unit statistics, fire table columns) that plain retrieval cannot resolve without tool-augmented reasoning.
kevmo.us is not affiliated with Hasbro, Avalon Hill Games, Inc., or Multi-Man Publishing, Inc.
Advanced Squad Leader is a trademark of Avalon Hill Games, Inc.