{
  "id": 2312349,
  "title": "Most Developers Test Their Code. Why Don't They Test Their AI?",
  "url": "https://urgent.news/2026/08/21/most-developers-test-their-code-why-dont-they-test-their-ai",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-21T05:21:43.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/jaideepparashar/most-developers-test-their-code-why-dont-they-test-their-ai-1kp3"
  },
  "original_language": "en",
  "account": "Developers are accustomed to testing their software, employing unit tests, integration tests, end-to-end tests, CI pipelines, code reviews, linting, and type checking. When creating an AI feature, however, the testing strategy often reduces to a single, insufficient step: \"I tried it three times and it seems pretty good.\" This is not testing, but rather optimism. Many AI developers fail to recognize the significance of this oversight.\n\nAI applications share a common structure with conventional software. A user request is processed as follows: Context Retrieval → Prompt → LLM → Generated Code → Validation. Each component in this pipeline has the potential to fail. A retrieval system may return incorrect files, a context may be incomplete, a prompt may be ambiguous, the model may hallucinate, and generated code may contain bugs. However, unlike traditional APIs, AI applications typically lack automated methods to detect such failures.\n\nTesting a single input is insufficient when dealing with AI systems, as their outputs are probabilistic. For example, an AI coding assistant tasked with generating SQL queries may perform well for a straightforward query like \"Show me the top 10 customers by revenue.\" However, when queried with a more complex request such as \"Show me the top 10 customers by revenue in 2025, excluding cancelled orders,\" the AI system's behavior may drastically change, producing entirely different results. It is crucial to create an evaluation dataset to address this issue. For instance, test_cases = [ { input : Find the top 10 customers by revenue. , expected_contains : [ GROUP BY , ORDER BY , LIMIT ] }, { input : Find revenue for 2025 excluding cancelled orders. , expected_contains : [ 2025 , cancelled ] }, ] Running the AI system against this dataset whenever changes occur in the prompt, model, retrieval system, context, or workflow allows developers to assess whether performance has improved.\n\nSimilar to software development, prompt engineering in AI is not a one-time task. A production prompt is part of the system and should be treated as such. If the prompt is changed, the performance of the AI system should be evaluated to determine if the modification was beneficial. This approach is likened to the broader discipline of software development, where prompt v1, evaluation, results, and prompt v2 are compared for continuous improvement.\n\nContext plays a crucial role in AI performance. A prompt with a perfect prompt may yield a poor result if the AI receives incorrect context. For instance, an AI coding assistant might generate code based on outdated documentation or irrelevant files. This highlights the importance of testing and engineering context alongside prompts.\n\nWhen AI is integrated into a larger workflow, such as User → Retriever → LLM → Tool Call → Validation → Final Response, the failure points become even more critical. Identifying where a breakdown occurs—whether it's in the retrieval system, the model's tool selection, the API's response, or validation—requires robust evaluation. This underscores the importance of workflows in AI development and the necessity of measuring and debugging at each step.\n\nFor novice AI developers, starting with a modest evaluation dataset of 20–50 representative test cases is recommended. Each case should include input, expected behavior, actual output, pass/fail status, and notes. Running the dataset after significant changes allows for measuring improvement over time. This evaluation dataset becomes a valuable asset in the AI project, capturing what constitutes \"good\" performance and helping engineers make informed decisions.\n\nUltimately, evaluation should be an integral part of the AI development process, following a structure that includes building, evaluating, measuring, and improving the system. This approach ensures that AI systems are reliable and capable of answering the critical question: \"How do you know it works?\" By incorporating evaluation into their GitHub workflows, developers can turn experimentation into a structured engineering process, fostering the creation of robust AI systems.",
  "summary": "Here's something I've been thinking about while building AI systems: Developers are obsessed with testing code. We write unit tests. Integration tests. End-to-end tests. CI pipelines. Code reviews. Linting. Type checking. But then we build an AI feature and suddenly the testing strategy becomes: \"I tried it three times and it seems pretty good.\" That's not testing. That's optimism. And I think…",
  "key_points": [],
  "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."
}