Artificial Intelligence: A Practical Introduction
A practical introduction to AI using a support-message classifier to explain rules, machine learning, training, inference and model evaluation.
Artificial Intelligence: A Practical Introduction
Artificial intelligence (AI) is a broad name for computer systems designed to perform tasks that usually require human judgement, such as recognizing speech, classifying images, forecasting demand, or generating text. The label covers many different methods. A spam filter, a chess program, and a language model are all examples of AI, but they work in different ways and have different limits.
This guide uses a simple example—a support team sorting incoming messages—to explain the difference between a rule-based program, a machine-learning model, training, and inference.
Rules and learned patterns
A rule-based program follows conditions written by a developer. For example: if an email subject contains “invoice” and an attachment is present, send the message to billing. Rules are explicit and predictable, but people must anticipate the cases the program will encounter.
A machine-learning model instead uses parameters learned from examples. A team might label past messages as “billing”, “account access”, or “technical support”, then use those examples to train a classifier. Given a new message, the trained classifier estimates which label is the best fit. It can recognize combinations that were not written as exact rules, but it may still make mistakes—especially when a message differs from its training data.
Machine learning is one area of AI. Neural networks are a family of machine-learning models made from connected layers of mathematical operations. Deep learning uses neural networks with multiple layers. Large language models are neural networks trained to process and generate text; they predict likely next tokens from their input and learned parameters. Their fluent output can be useful, but fluency does not mean the answer has been checked or is true.
Training is different from using a model
Training is the process of adjusting model parameters using data and an objective. In a simple text classifier, training examples pair a message with its correct category. The training process compares predictions with labels and updates parameters to reduce errors on the training objective. A separate validation set can help measure performance on examples not used for those updates.
Inference is what happens when a trained model receives new input and produces a prediction or response. In production, the support team might send each new message to the classifier, review the predicted category, and route it. The team does not necessarily train the model every time it is used.
This distinction is useful when evaluating product claims. A service that calls a hosted model may use inference without training a new model. Fine-tuning is a further training step that adapts a model using additional data; it is not the same as adding a prompt or connecting a model to a search index.
How to evaluate a small classifier
Accuracy alone can hide important failures. If 95 out of 100 messages are “general questions”, a model that always predicts that category is 95% accurate but useless for routing the five urgent account-access cases.
For a multi-category classifier, a practical review can include:
- A held-out evaluation set: examples kept separate from training so results are less likely to reflect memorization.
- Per-category precision: when the model predicts a category, how often is it right?
- Per-category recall: of the messages that truly belong to a category, how many did the model find?
- A human fallback: what happens when confidence is low or the categories are ambiguous?
- Ongoing monitoring: whether errors increase as message topics and customer behavior change.
For example, missing an account-lockout message may be more costly than sending an ordinary product question to a person for review. The decision threshold should reflect the consequences of each error, not just a single summary score.
What an AI model cannot promise
AI does not guarantee accuracy, fairness, privacy, or independence from human input. Model behavior depends on the task, data, training choices, interface, connected tools, and how people use the output. Even a benchmark result may not predict performance on a different population or in a live workflow.
When using a model, ask what data it receives, where processing happens, whether people review consequential decisions, what happens when it is wrong, and how the system is monitored. For generative models, verify factual claims against suitable sources and avoid treating generated text as a substitute for professional judgement in high-impact situations.
In summary
AI is not one technique or one capability. Rules encode conditions directly; machine-learning systems infer patterns from data; training adjusts a model; and inference applies the trained model to new input. These distinctions make it easier to understand what a product actually does and what evidence is needed before relying on it.
For project-specific AI releases, see ArkAiLab and the Open4Bits model collection. For other engineering notes, browse the ArkDevLabs Blogs.