Mercado Tech Brasil introduces LLMOps, the discipline that brings to language models the same rigor MLOps brought to traditional machine learning. Generative AI models write very well, and that's exactly where the risk lies: a wrong answer, well written, is easy to believe. Putting this kind of system into operation without controls is like publishing a persuasive text with no review at all.
What LLMOps is
LLMOps is the extension of MLOps to systems built on LLMs. Beyond testing, versioning and monitoring, it covers what is specific to generative AI:
- control of prompts and their versions, since a changed instruction changes the system's behavior;
- logging and tracing of every call, with question, context and answer;
- automated and human evaluation of answers;
- monitoring for security, bias, data leakage and hallucinations.
Evals: the tests of LLMOps
Evals are structured tests that measure answer quality. They can run offline, with a fixed set of questions before each change, or online, on a sample of real usage. The most common criteria:
- faithfulness: does the answer reflect what the provided sources say?
- factual accuracy: are the facts correct?
- source grounding: does each important claim have an identifiable origin?
- usefulness: does the answer meet the needs of whoever asked?
- safety: did the system avoid exposing data or producing inappropriate content?
Automated and human evaluation
Some evals can be automated, including by using another model as the judge. But a sample reviewed by business experts remains essential, especially at the start, to calibrate what a good answer looks like in that context.
An everyday LLMOps example
Picture an assistant that generates internal reports. Before any new version is released, it goes through checks like these:
- does every critical claim have an associated source?
- is there any contradiction between the generated text and the reference documents?
- does the new version answer the same questions consistently with the previous one?
If any check fails, the version doesn't ship. This turns quality into an objective criterion rather than the impression of whoever tested it last.
LLMOps and cybersecurity go hand in hand
In my work with agile projects and cybersecurity, I see that many generative AI risks are, at heart, information risks: sensitive data sent without need, answers that reveal restricted content, instructions embedded in external documents that try to change the assistant's behavior. LLMOps gives visibility into these points and makes it possible to act before they turn into incidents.
To start in a lean way:
- build a set of real questions with the expected answers, and run it on every change;
- version prompts together with the code;
- log interactions in line with Brazil's data protection law (LGPD), keeping only what's necessary;
- define who reviews failures and how often.
With these four habits, the team starts discussing data instead of opinions, and every improvement is backed by evidence.
Translated from the original in Portuguese. Read the original.