{
  "id": 60706,
  "title": "Lesson 4 - Validation: A must-have cornerstone",
  "url": "https://urgent.news/2026/08/02/lesson-4-validation-a-must-have-cornerstone",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-02T22:59:53.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/smukker/lesson-4-validation-a-must-have-cornerstone-3bd2"
  },
  "original_language": "en",
  "account": "Validation was never the responsibility of a traditional software development life cycle (SDLC), coming after the fact that QA teams verified the software's functionality. In building Slooster, the hard parts were initially focused on creating prompts, tuning them, and defining schemas for parameters and outputs. The system was built locally, leading the author to postpone validation. However, integrating large language models (LLMs) into the equation disrupts this traditional SDLC model, as LLMs produce outputs based on guessing rather than certainty. The same prompt can yield varying or incorrect results, necessitating validation as a fundamental aspect of the software from the outset.\n\nAfter deploying Slooster Guide to staging, the author tested the system but encountered placeholder data instead of real vendor information. This inconsistency was due to the model's unpredictability, which could not be prevented by pre-deployment testing. To address this issue, the author introduced a validation layer with retries to catch and rectify bad outputs. Validation, however, incurs costs and must be tailored to the specific use case, considering factors such as where it runs, the level of retries, and whether a human interacts with the results.\n\nThe validation process involves first applying deterministic checks using a schema validator to identify structurally invalid outputs. However, placeholder responses like \"Vendor A\" pass these checks but are semantically incorrect. A separate model checking mechanism is required to address semantic errors, involving a validation prompt that assesses the model's output against the same criteria used for the initial prompt. This can be executed by the same model that generated the response or through a different provider and model for an independent verification.\n\nThe key takeaway is that not every response should be subjected to retries, nor should any response be trusted without verification. Providing users with confidence in the answer is crucial, clearly communicating the level of trust and allowing users to intervene if necessary. This feedback should be integrated back into the system for future improvements. Due to the inherent unpredictability of LLMs, caching results is essential but must be done intelligently. Reusing good results when appropriate and allowing users to regenerate when needed strikes a balance between efficiency and validation. Lastly, selecting the appropriate model for each prompt type, based on the complexity and importance of the task, optimizes the overall system performance while ensuring robust validation.",
  "summary": "In a traditional SDLC, validation was someone else's job and it came later. QA teams checked that the software did what it was supposed to. The behavior was repeatable, so eventually you automated the checks and moved on. So when building Slooster, I did the hard parts first: Building the prompts, tuning them, defining schemas for parameters and outputs. Building a system to pick the provider,…",
  "key_points": [
    "Validation was never part of traditional SDLC, now a must-have cornerstone.",
    "LLMs produce varying or incorrect outputs, requiring validation from the start.",
    "Validation layer with retries and semantic checks ensures reliable outputs."
  ],
  "editors_take": null,
  "illustration": "https://urgent.news/ill/60706.png",
  "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."
}