DEV Community

Cover image for Brigada LLM: one chat for internal AI agents
Jonald Penpillo
Jonald Penpillo

Posted on Originally published at penpillo-jonald.online

Brigada LLM: one chat for internal AI agents

Brigada LLM is an internal chat built to give staff one trustworthy place to ask about company policies and quality assessments. Before it, those questions went to different people and different documents, and answers were hard to trace back to a source. Jonald built the system so that every answer cites where it came from, respects what each person is allowed to see, refuses what is out of scope, and gets reviewed and corrected over time. It runs on self-hosted models on the company's own AI server, so policy text never leaves the company's servers.

When an employee types a question, a router decides which specialist should handle it. The router uses bge-m3 embeddings to shortlist the most likely agent, then Qwen3.8 27B judges close calls and splits questions that cover two topics. A two-part question is sent to both agents in parallel, and every answer comes back labelled with the agent that wrote it. This keeps the chat simple for the user while the routing work happens behind the scenes.

Brigada LLM screenshot

The Policy Agent answers company-policy questions with citations. It uses permission-aware hybrid retrieval over the policy library, combining vector and full-text search and fusing the results with RRF. Because retrieval respects permissions, an employee only sees policy content they are allowed to see. The Quality Rubrics Agent, co-built with Jed Tan, explains assessment results; Jed Tan wrote its retrieval core, and Jonald built its interface and answer cards.

The system also handles the practical edges of an internal tool. It replies in English, Tagalog, Taglish, Cebuano or Bislish, matching the employee's language. Prompt-injection screening, rate limits and polite refusals cover anything off-topic. Approved and corrected answers are exported as training data, so the review loop feeds future improvements rather than ending at a single reply.

Brigada LLM screenshot

Jonald measured the system rather than guessing at its quality, using 90 policy questions and a routing test set. The stack is Python, FastAPI, Qwen3.8 27B, bge-m3, pgvector, Supabase and SSE. The purpose behind all of it is straightforward: staff should be able to ask a question once, get an answer they can check, and trust that the system knows what it should not answer.


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)