The Baza system is a local knowledge base designed for role-playing games, utilizing RAG technology to provide information to players. It functions as a virtual NPC that can be deployed at various locations, such as libraries or taverns, to answer player questions based on pre-loaded game materials.

The system uses Markdown files with YAML frontmatter to manage game content. Each document is indexed into a PostgreSQL database using pgvector, allowing for semantic search. Access to specific information is restricted based on roles, locations, factions, or individual player IDs, ensuring that the LLM only accesses authorized data.

To maintain immersion, the system includes an actor-validator loop that prevents the AI from revealing its nature, hallucinating facts, or drifting from its assigned character role. Players authenticate via secret words, QR codes, or images, and the system can be configured to support voice interaction with distinct character voices.

The developer plans to expand the system with features such as narration for world-building, an inventory and quest management system, and the ability to export game sessions into PDF documents for historical records.