{
  "id": 19387030,
  "title": "Guardrail para Claude, GPT e próprio",
  "url": "https://urgent.news/2026/11/10/guardrail-para-claude-gpt-e-proprio",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-10T19:50:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/beanstechbr/guardrail-para-claude-gpt-e-proprio-1km4"
  },
  "original_language": "pt",
  "account": "Guardrails serve as both technical and policy layers to safeguard AI model outputs from being unsafe, unethical, or illegal. These measures are applied through input/output filtering, content classification, negative rules, and reinforcement learning from human feedback (RLHF), though they are not legally mandated in Brazil. Best practices and sector-specific guidelines recommend implementing guardrails. In real-time, they monitor text generation both before and after, employing techniques like prompt injection detection, output classification, and post-generative moderation.\n\nFor models like Claude from Anthropic, guardrails come as native features based on Constitutional AI, requiring a different approach than OpenAI’s GPT. GPT utilizes a moderation API alongside system prompts and supervised fine-tuning. Custom guardrails for proprietary models necessitate tailoring from simple regex rules to more sophisticated RAG-augmented pipelines with legal or medical validation. While there isn’t a specific Brazilian federal law on guardrails, the National AI Strategy (Dec. 10.973/2022) advises \"ethical and technical control mechanisms.\" Regulated industries must align guardrails with CFM, BCB, or CNJ requirements even without stringent legislation.\n\nGuardrails operate at a system level, diverging from basic blacklist filters by assessing risk levels, logical rules (e.g., preventing Penal Code citations without legal context), and interruption mechanisms (stop sequences or rejection sampling). They are designed to be documented, auditable, and integrated into MLOps cycles. Claude prioritizes Constitutional AI, aligning responses with explicit principles during both training and inference. OpenAI’s GPT relies more on external moderation layers and nuanced system messages, offering less transparency into internal mechanisms. Models without standard infrastructure require clear policies, tool selection (like Llama Guard or Microsoft Guidance), and domain-specific validation (legal, medical, financial).\n\nEven without a federal law, guardrails are crucial due to liability considerations under the Consumer Protection Code (Lei 8.078/1990, art. 14) and STJ rulings recognizing the necessity of adequate technical controls in automated systems (REsp 1.892.345/SP, 2023). They help mitigate LGPD violations by preventing personal data leaks and ensuring explainable decision-making. Frequently asked questions clarify that guardrails complement, not replace, human oversight in critical applications, and that while they reduce hallucinations, they do not eliminate them entirely. Continuous red-teaming and up-to-date risk scenarios are crucial for maintaining effectiveness.",
  "summary": "Resposta curta Guardrails para Claude, GPT e modelos próprios são camadas técnicas e políticas que limitam saídas inseguras, não éticas ou ilegais — aplicadas via filtragem de entrada/saída, classificação de conteúdo, regras de negação e RLHF. Não são obrigatórias por lei no Brasil, mas exigidas por boas práticas de governança de IA e diretrizes setoriais emergentes. TL;DR Guardrails operam em…",
  "key_points": [
    "Guardrails safeguard AI outputs from being unsafe, unethical, or illegal.",
    "Claude uses Constitutional AI for native guardrails, unlike GPT's moderation API.",
    "Brazil lacks specific federal law on guardrails but follows ethical AI guidelines."
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}