Q&A RAG pipeline
The problem
League changes every few weeks, so a language model can give a convincing answer with an outdated cooldown or stat. New players also ask in shorthand—“Garen R,” for example—rather than using the exact names in the game wiki. I wanted to build a helper that could find current facts, understand those different phrasings, and avoid guessing when a question was outside its scope.
How I approached it
I routed each question to the method suited to it. Ability questions use ChromaDB to find relevant passages in the game wiki; questions that need a ranking or calculation use SQL over a SQLite database. A query rewrite step helps map player shorthand to the names used in the source data. Questions the system was not built to answer get a fixed response.
What the tests showed
On 630 test queries, exact-match accuracy rose from 21.8% for the baseline model to 93.4% for the full system. Retrieval alone reached 55%, and adding query rewriting raised that to 64%. The largest gain came when the system could send comparisons and stat questions to SQL instead of asking the language model to infer numbers from text.
The test set covered 21 champions and formal, casual, and slang versions of 210 questions. Slang still caused retrieval misses, so the 93.4% result describes this test set—not every question a player might ask.
Pipeline
Stats & comparisons
Out of scope
Intent classifier: Gemini assigns one of five intents and selects the right route.
QA uses retrieval over wiki text; statistical questions use SQL over structured game data.
Python · ChromaDB · SQLite · Gemini