# AI Is Not the Solution to Every Problem: When Rule-Based Systems Make More Sense

> Source: <https://dev.to/shivraj8615/ai-is-not-the-solution-to-every-problem-when-rule-based-systems-make-more-sense-jnh>
> Published: 2026-09-27 12:44:19+00:00

*Extensive Use of AI for Simple Task Costing Token and Even Then Not Producing Favorable Results*

Today AI has been the buzzword every industry that wants to solve their task with the utilisation of AI, whether it be LLM application for RAG on technical document to ask for solutions, whether it be code, idea, calculation etc., any diffusion model for design, poster generation and all, using image processing model like YOLO to solve problems like defect detection.

But recent developments I noticed that there is too much extensive use of AI for simple task which a simple rule-based program can perform better. This is a concerning matter as the cost of running any simple AI task is far more than running a rule-based program.

**A Practical Example: P&ID to Bill of Material**

For example, last month I witnessed a software demo of creation of Bill of Material from P&ID using YOLO which is great as it is a repetitive task if customer ask for continuous revision and human error comes in picture with that counting each and every equipment present there makes this task extensive.

The solution is there are software to generate P&ID and BOQ but restriction is the template on which BOQ is required and the template on which P&ID is created.

Coming back to the YOLO based solution it uses the object detection technique where each P&ID is given in image form to the model and each equipment is detected as an object obviously each equipment used is trained on that model.

This seems a very good solution to give the count of it. But the limitation is the line tracing, properties and other technical difficulties comes in place due to a P&ID being a multilayer and additional of new equipment will need training of it again plus AI being the buzzword and if it comes in picture the cost of the solution sky rocket.

**A Rule-Based Approach**

Now this problem can be solved by simple use of logic and understanding of drawing and Python.

As any drawing is basically a graph and the layers are vertically stacked 2D sheet at different coordinate from one dimension and weight are looking at drawing from other axis so different stack of 2D graph gives you a combination of a 2D drawing as now the layers are separated then comes one layer in that you can consider each block used or equipment used is a node which is connected to each other by a pipe.

Now the basic understanding of graph analysis by Python using library ezdxf just change DWG to DXF or any other format to DXF as DWG is proprietary and closed as per AutoCAD.

Now that can simply give you layer by layer JSON of each equipment and as Python is handy you can use pyxl like library to directly insert these values in your required Excel template or to generate a PDF in required format.

This simple rule-based solution can save cost, perform better than any AI based solution with that it saves you hours of training and computation cost.

**AI Should Be Used Where It Makes Sense**

That's why I think everyone should read or at least decision maker should read the Kaggle course on AI ethics because that gives you clear idea where to use, how to evaluate and finally decision making for the use case.

AI is the buzzword but it necessarily should not be the solution of every problem statement.

The simple task solution can be great with a rule-based program works better than AI based solution as I shown earlier and this is also to give an idea to solution builder that before making solution for any use case please evaluate every aspect of it.

AI is a double-edged sword so keep that in mind the computation cost, training time, data collection and so on.

*The Role of LLMs in Rule-Based Solutions*

As one more thing once you devised the rule-based solution and created the logic you can get that coded from any LLM that will be fast, time saving and useful addition in the process.
