AI & LLM
OGE — Operational Gaming Environment
Lead Engineer on a Real-Time AI Simulation Platform
- Role
- Lead full-stack engineer
- Timeline
- 22 months
- Team
- Small client-side + contract team
- Live link
- oge.dare-engineering.org ↗
- 136,000+
- lines of production code
- 63
- data models
- 149
- API routes
- 14
- real-time WebSocket channels
The problem
Crisis simulations — students taking operational roles, consulting expert advisors, negotiating, and committing to consequential decisions — are among the most effective ways to teach judgement under pressure, and among the hardest to run: every element requires a knowledgeable human available in real time. Expert availability, not curriculum or appetite, caps the exercise. Nothing off the shelf composes the alternative — an LMS has no live phase clock or AI participants, a chatbot cannot be restricted to a professor's own documents or observed live. The platform had to be built.
My approach
Grounded AI advisor system
Each advisor carries its own document corpus, chunked and embedded into an isolated vector namespace, so retrieval isolation is architectural rather than prompt-enforced. Seven distinct chatbot types cover advice, adjudication, post-game analysis, and AI-moderated team formation.
Production RAG
Retrieval parameters cascade from platform default to advisor to individual document. A full-context mode bypasses retrieval for designated material; room- and advisor-level results merge through a hybrid path; document extraction runs a two-engine fallback chain hardened after real client PDFs broke the first approach.
Multi-provider resilience
OpenAI and Anthropic Claude sit behind a common interface with identical streaming, token-counting, and cancellation semantics. Requests retry with backoff then fail over to the secondary provider — an outage degrades the session, it doesn't stop the class.
Real-time simulation engine
Built on Django Channels from the start — 14 WebSocket consumers and 57 message types covering advisor chat, negotiation, team rooms, decisions, timers, and adjudication across seven game modes.
Governance & security
Per-player caps on messages, tokens, and spend; live professor monitoring of every conversation; full persistence of every message and decision. A security review ahead of a feature's first classroom use caught four genuine authorization gaps, remediated before any class ran.
System shape
Frontend
React, TypeScript, Redux, Vite, Tailwind CSS
Backend
Django, Django REST Framework, Django Channels, WebSockets
Data
PostgreSQL, Redis, Weaviate
Infra
AWS S3, Docker, GitHub Actions
AI
OpenAI API, Anthropic Claude, RAG, Model Context Protocol
What I'd do differently
The vector store had to be treated as a derived cache, never a source of truth, from day one — a total loss of the production vector database was recovered with zero data loss as a pure re-index precisely because of that discipline. If starting over, I'd formalize that re-indexing path as a first-class operation earlier rather than proving it under incident pressure.
Stack
Frontend
- React
- TypeScript
- Redux
- Vite
- Tailwind CSS
Backend
- Django
- Django REST Framework
- Django Channels
- WebSockets
Data
- PostgreSQL
- Redis
- Weaviate
Infra
- AWS S3
- Docker
- GitHub Actions
AI
- OpenAI API
- Anthropic Claude
- RAG
- Model Context Protocol
Result
A live platform in continuous classroom use — a single professor configures an advisor once and it serves an entire cohort simultaneously, every conversation captured for assessment, every scenario exportable and reusable. Its two largest features shipped in the most recent two months of a 22-month engagement.