Does my app need AI?
Be able to determine whether a feature requires AI or if standard rules are sufficient.
Prerequisites
- BFrom idea to apprequired
- BRule-based systems and machine learningrequired
Everyday explanation
AI is not always the answer. Often, standard code is better — faster, cheaper, and always correct.
The question to ask: can the rules be written down?
| Task | Rules exist? | Choose |
|---|---|---|
| Calculate the total in a shopping cart | yes, exact | code |
| Check that a password has 8 characters | yes | code |
| Sort by date | yes | code |
| Determine if an image shows a cat | no | AI |
| Summarise a text | no | AI |
| Suggest the next step in a process | partially | both |
The rule: if the rules can be written down — write code. It will be correct every time, it costs nothing per use, and you can explain exactly why.
If they cannot — there are thousands of ways a cat can look and no list covers them all — then AI is needed.
Intuition
What it costs to choose AI unnecessarily:
| Standard code | AI | |
|---|---|---|
| Cost per use | ~0 | money every time |
| Speed | milliseconds | seconds |
| Correct answer | always (if the code is right) | usually |
| Explanation | exact | approximate |
| Works without internet | yes | usually not |
| Maintenance | the code | model, prompt, evaluation |
The last row is the one that is underestimated: an AI feature requires ongoing supervision. The model is updated, behaviour changes, and what worked last autumn may not work this spring.
When AI is the right answer:
| Signal | Example |
|---|---|
| Input is messy and varied | free text, images, speech |
| Rules are too many to write down | language understanding |
| “Approximately right” is acceptable | suggestions and summaries |
| Rules change constantly | trends, language usage |
When AI is the wrong answer:
| Signal | Why |
|---|---|
| The answer must be exact | calculation, payment, authorisation |
| The decision has major consequences for someone | must be justifiable and appealable |
| It must run in milliseconds | too slow |
| A good formula already exists | no reason to use AI |
The most common pattern in real apps is to mix them: AI handles the messy part (understanding what the user wrote), standard code handles the exact part (calculating the price). Neither part does the other’s job.
Interactive
Assess eight features in a hypothetical app for a publishing house. Write “code”, “AI” or “both” — and one sentence on why.
| # | Feature | Your choice |
|---|---|---|
| 1 | Show which titles are published | |
| 2 | Calculate the publishing fee | |
| 3 | Suggest a book based on what you have liked before | |
| 4 | Search by title | |
| 5 | Search for “an exciting book about space” | |
| 6 | Remind the day before the book is due back | |
| 7 | Read an ISBN from a photographed barcode | |
| 8 | Answer “do you have anything similar to Harry Potter?” |
Answer key with justification:
- Code — a database query.
- Code — a formula: days × fee.
- Both — a simple rule (same genre) goes a long way; AI gives better suggestions.
- Code — text matching.
- AI — requires understanding what “exciting” and “about space” mean.
- Code — a date and a scheduled job.
- Code — barcode reading is a solved task with standard libraries, not AI.
- AI — requires understanding of similarity between books.
Number 7 is the trickiest. It feels like AI because it involves an image, but barcodes are designed to be easy to read mechanically and ready-made libraries exist. Throwing an image model at the problem would be more expensive and worse.
Number 3 shows the most common pattern: start with the rule, measure how good it is, and add AI only if the measurement shows it is needed.
Mastery means
- Determine if a feature needs AI
- Justify the choice using the rule of clear rules
- Recognise the costs of choosing AI unnecessarily
Sign in to do the exercises and build your mastery up.
Sources
- Google — People + AI Guidebook — free to read
- CS Unplugged (CC BY-SA 4.0) — CC BY-SA 4.0
- Skolverket — About AI in school (in Swedish) — Skolverket's open terms