{"id":877,"date":"2026-10-12T10:37:50","date_gmt":"2026-10-12T08:37:50","guid":{"rendered":"https:\/\/productbooster.dk\/?p=877"},"modified":"2026-10-12T10:37:51","modified_gmt":"2026-10-12T08:37:51","slug":"ai-vs-rules-part-2-4-examples-of-getting-the-best-of-both-worlds","status":"publish","type":"post","link":"https:\/\/productbooster.dk\/?p=877","title":{"rendered":"AI vs. Rules part 2: 4 examples of getting the best of both worlds"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In my previous post, I wrote about how AI and traditional rule-based systems can complement each other.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is one distinction that I think is particularly interesting: using AI to generate the logic is not the same as using AI to execute the logic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AI can be extremely good at understanding complex requirements, working with unstructured data and generating the logic needed to solve a problem. But once that logic has been generated and validated, there are often good reasons to execute it using traditional programmatic logic instead.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This gives us the flexibility of AI combined with the consistency, speed, traceability and cost-efficiency of deterministic execution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are four examples of where I think this makes a lot of sense.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Reading business documents<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I recently talked to a company that has developed a very impressive AI engine for reading unstructured business documents. The engine can understand documents that would be difficult to process using traditional methods.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But understanding a document is only part of the challenge. If you process thousands of documents with similar structures, you also need consistent results.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Their approach is to let the AI engine generate rules or code logic that can then be used to process documents with similar structures. This gives you the flexibility of AI when dealing with the documents, but also the consistency and cost-efficiency of running generated logic instead of relying on AI for every single processing step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Of course, the generated logic still needs to be checked to make sure it actually does what it is supposed to do.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Testing software UI with AI<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AI-powered software testing is becoming increasingly popular, and for good reasons. AI can help explore an application, understand the UI and create test scenarios that would otherwise take a lot of manual work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But there is a catch. A test that runs green today can suddenly turn red tomorrow, even though nothing relevant has changed. Non-determinism is not exactly what you want in a regression test suite.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">What if we could let AI explore the application, create tests and help us validate them, and then freeze the tests that are ready for repeated execution? The test suite could be converted into deterministic, programmatic test logic.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You keep the benefits of AI when discovering and creating tests, but get the predictability of traditional UI testing tools when running them repeatedly. And there is a cost perspective too. Why keep paying for AI to rediscover and rerun the same scenarios if a stable programmatic test can do the job?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Naturally, the tests still need to be maintained when the application changes. And passing a test doesn&#8217;t necessarily mean that the test itself is good enough. But at least you know what is being executed and can reproduce the result.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>3. Data quality and validation<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Imagine a company receiving data from hundreds of different sources. The data has different structures, naming conventions and quality issues. Some sources leave fields empty, others use unexpected values, and some have their own peculiarities.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AI can analyse sample data, identify patterns and anomalies, and help generate validation rules specific to each source.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the rules have been reviewed and validated, they can run as ordinary code every time new data arrives.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This means that you don&#8217;t need AI to rediscover the same data quality issues every time you process a new batch. You can use AI to understand the data and generate the rules, and then let the programmatic logic do the repetitive work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The result can be faster onboarding of new data sources and consistent, explainable validation at scale.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Again, the important part is validating the generated rules. If the AI misunderstands a requirement, you can end up with a very consistent system that consistently does the wrong thing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>4. EDI mappings<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is particularly relevant to the work we do at Bizbrains.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In EDI, we transform data from a source format into a common data model (CDM) and then into the target format. The mapping logic needs to be fast, consistent and traceable. Using AI to transform every message on the fly would introduce unnecessary uncertainty into a process where these properties are essential.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead, we have started using AI to generate the mappings themselves, in XSLT, based on sample data from the customer and our own library of existing mappings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The result is that AI helps us do the complicated work of creating the mapping, while the generated XSLT performs the actual transformation deterministically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This can be a huge time-saver when onboarding a new customer or when an existing customer needs to connect to a new partner with a different set of formats.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And, just like with the other examples, the generated mapping needs to be tested against the expected results. Deterministic execution doesn&#8217;t guarantee that the mapping is correct, but it does make the transformation predictable and reproducible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The common denominator<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These four examples are quite different, but the underlying idea is the same.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AI is very good at dealing with complexity, interpreting unstructured information and generating solutions. Traditional programmatic logic is very good at executing those solutions consistently, quickly and predictably.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But there is an important distinction here.&nbsp;<strong>Deterministic does not mean correct.<\/strong>&nbsp;If we generate the wrong logic, a deterministic system will happily produce the wrong result every single time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That is why validation matters. We need to test the generated logic against expected outcomes, handle exceptions and make sure it does what we intended.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once we have done that, we can benefit from both worlds.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We don&#8217;t always need to choose between AI and traditional software. Sometimes the real opportunity is to use AI to create the logic that we then execute without AI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And that might be a much more interesting way of building AI-powered products than simply putting an LLM in the middle of everything.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my previous post, I wrote about how AI and traditional rule-based systems can complement each other. There is one distinction that I think is particularly interesting: using AI to generate the logic is not the same as using AI to execute the logic. AI can be extremely good at understanding complex requirements, working with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":878,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":11,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-877","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/productbooster.dk\/index.php?rest_route=\/wp\/v2\/posts\/877","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/productbooster.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/productbooster.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/productbooster.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/productbooster.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=877"}],"version-history":[{"count":1,"href":"https:\/\/productbooster.dk\/index.php?rest_route=\/wp\/v2\/posts\/877\/revisions"}],"predecessor-version":[{"id":879,"href":"https:\/\/productbooster.dk\/index.php?rest_route=\/wp\/v2\/posts\/877\/revisions\/879"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/productbooster.dk\/index.php?rest_route=\/wp\/v2\/media\/878"}],"wp:attachment":[{"href":"https:\/\/productbooster.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=877"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/productbooster.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=877"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/productbooster.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=877"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}