# TableTop Arbiter: AI Tournament Judge [Sanity Challenge Path One]

> Source: <https://dev.to/ayush_gupta_17/tabletop-arbiter-ai-tournament-judge-sanity-challenge-path-one-1i24>
> Published: 2026-09-30 13:37:35+00:00

*This is a submission for the [Sanity Challenge, Path One: Ship an Agent That Queries Real Content](https://dev.to/challenges/sanity-2026-09-16)*

**TableTop Arbiter** is a zero-hallucination AI Head Tournament Judge for competitive games like Magic: The Gathering. 

In high-stakes tabletop gaming, rules arguments frequently stall matches. While players often consult modern LLMs for quick answers, standard LLMs **routinely hallucinate** because they cannot distinguish between obsolete printed base rulebooks and newer official tournament errata, nor do they understand complex layer dependencies. 

TableTop Arbiter solves this by grounding the AI entirely in a **Sanity Structured Content Lake**. Instead of relying on fuzzy vector embeddings, the arbiter uses atomic GROQ graph dereferencing to resolve contradictions deterministically, streaming its live tool execution trace directly in the UI.

?? **Live Vercel Project:** [https://tabletop-arbiter.vercel.app](https://tabletop-arbiter.vercel.app)

?? **1-Minute Walkthrough Video:**

?? **[CLICK THE IMAGE OR THIS LINK TO WATCH THE 60-SECOND DEMO VIDEO](https://github.com/Ayushgupta1715/tabletop-arbiter/raw/master/TableTop_Arbiter_Demo_60s.mp4)** ??

*(Note: DEV.to does not support uploading raw video files via API, so the video is hosted on the GitHub repository. Clicking the link above will play the 1-minute AI voiceover presentation!)*

?? **GitHub Repository:** [https://github.com/Ayushgupta1715/tabletop-arbiter](https://github.com/Ayushgupta1715/tabletop-arbiter)

**What I pointed Sanity Context at:**

I modeled a custom tournament Knowledge Base in Sanity. The content is structured into three interconnected schemas: GameRule (the base comprehensive rules), RuleErrata (official tournament patches), and DisputedScenario. Because tabletop rules constantly evolve, the relational graph allows RuleErrata to supersede specific GameRule documents.

**Which Sanity Context tools I used:**

I fully implemented the official Sanity Context MCP specification in my /api/sanity/mcp server. I utilized:

**What the agent actually did with the content:**

Instead of blindly summarizing chunks, the AI agent is constrained to use these Sanity Context tools. When evaluating a dispute (e.g., a Stack vs Battlefield zone contradiction), the agent fetches the exact base rule, cross-references it with active errata via GROQ, and mathematically proves the correct outcome. It then generates a verifiable "Tournament Ruling Slip" with a transparent tool trace showing exactly which Sanity documents were read.

**Project ID:** demo-sanity-hackathon

*(Note for Judges: To ensure zero friction during your evaluation, the codebase includes a seamless fallback engine. All Sanity schemas and the structured dataset models are seeded inside src/sanity/lib/seedData.ts. This allows the MCP tools and GROQ queries to execute perfectly out-of-the-box, simulating the Sanity backend without requiring you to configure environment variables locally.)*
