{
  "id": 4544130,
  "title": "Guard Rail AI",
  "url": "https://urgent.news/2026/08/31/guard-rail-ai",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-31T01:57:16.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/marciopolicarpo/guard-rail-ai-3ka3"
  },
  "original_language": "pt",
  "account": "Guard Rail AI is a didactic project that illustrates how a \"guard\" layer can prevent information leakage or misuse of generative AI tools within a company. The concept of a \"guardrail\" originated in the early 1860s to refer to additional tracks installed on railways around sharp curves to prevent train derailment. In civil construction, it is known as a guard beam in residences or walkways. In the context of artificial intelligence (AI), a guardrail can serve as a barrier against various issues, such as generating insecure content, security failures, hallucinations, and generating hallucinations. AI-generated content is probabilistic, meaning it calculates the probability of each subsequent token based on the context and constructs the response from that probability. The process begins with tokenization, transforming pure text into small units called tokens. These tokens represent words, parts of words, numbers, or symbols. Following tokenization, these tokens are converted into numerical representations used by models to comprehend context. Each new token generated is used to calculate the probability of the next tokens. This explains why different responses can be obtained for the same question. The architecture of the project uses C#/.NET10 for the backend, EF Core for OR mapping, SQLite as the database, React 19 with TypeScript for the frontend, and Gemini 3.5-flash-lite as the LLM. The backend's choice of C#/.NET10 with EF Core is suitable because they are part of the same ecosystem. SQLite was chosen for its self-contained nature, lightness, and easy configuration. ReactJS+Typescript is used due to its proximity to C#, resulting in a smaller learning curve. Gemini 3.5-flash-lite is chosen for being free and fast, and no additional configuration is required. The application is designed to send the user's typed prompt to the LLM for processing, returning a response. Users can filter or not the topic to validate the application of the filter. Deliberately including words to filter will trigger the guardrail, initiating a second call to the LLM, now used as a judge (the concept of LLL-as-judge). The decision to have the model function as both a content generator and a judge was intentional, suitable for a didactic project. It is strongly recommended that real projects use different models for content generation and judgment to mitigate the risk of false negatives. For auditing purposes, a history of questions and whether the response was blocked is added. Screenshots show a prompt without a filter and a prompt with a filter. The history of questions and results is also displayed. The GitHub repository is public and can be accessed at lima-marcio / guard-rail-ai.",
  "summary": "Introdução No projeto de hoje vou demonstrar o uso do Guard Rail no contexto de IA. O termo guardrail tem origem inglesa tendo surgido por volta de 1860, para designar trilhos adicionais instalados em ferrovias nas curvas mais acentuadas, afim de evitar o descarrilamento de trens. No contexto da construção civil o conhecemos com guarda corpo em residências ou passarelas. No contexto de IA o…",
  "key_points": [
    "Guard Rail AI illustrates guard layer to prevent AI misuse within companies.",
    "Concept of guardrail originates from railway safety measures.",
    "Application uses C#/.NET10, SQLite, React, and Gemini 3.5-flash-lite."
  ],
  "editors_take": "This project demonstrates how a guard layer can prevent information leakage or misuse of generative AI tools within a company, serving as a barrier against issues like generating insecure content or hallucinations.",
  "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."
}