Brigada LLM is an internal chat for Brigada's AI agents. Staff ask a question in one place, and a router reads it and sends it to the right specialist: the Policy Agent for company-policy questions with citations, or the Quality Rubrics Agent for explanations of assessment results. The system was built to give staff one trustworthy place to ask about policies and quality assessments, with answers that cite their source, respect what each person is allowed to see, refuse what is out of scope, and get reviewed and corrected over time.
The router is the first step. It uses bge-m3 embeddings to shortlist which agent should handle the question, then Qwen3.8 27B judges close calls and splits two-part questions. When a question covers two topics, it is split and asked to both agents in parallel, and every answer comes back labelled with the agent that wrote it. Jonald built the router and the Policy Agent; the Quality Rubrics Agent was co-built with Jed Tan, who wrote its retrieval core, while Jonald built its interface and answer cards.
For policy questions, the Policy Agent runs permission-aware hybrid retrieval over the policy library, combining vector and full-text search fused with RRF, and returns answers with citations. It replies in English, Tagalog, Taglish, Cebuano or Bislish, matching the employee's language. Prompt-injection screening, rate limits and polite refusals for off-topic requests keep the system safe by design.
Everything runs on self-hosted models on the company's own AI server, so policy text never leaves the company's servers. Approved and corrected answers are exported as training data, closing a human review loop that lets the system improve over time. The stack is Python, FastAPI, Qwen3.8 27B, bge-m3, pgvector, Supabase and SSE.
The system is measured, not guessed: it was evaluated on 90 policy questions and 76 routing cases. That test set covers both the routing decision and the cited policy answers, giving the team a concrete baseline for the review loop.
Brigada LLM is a system built by Jonald Penpillo, a software developer and AI engineer in the Philippines.
Read the case study: Brigada LLM
Originally published at penpillo-jonald.online. Written with AI from the project's case study notes and published automatically.


Top comments (0)