Artificial Intelligence and Intelligent AutomationIntroduction and ContextArtificial intelligence (AI) refers to computational systems designed to perform tasks that normally require human intelligence, such as perception, learning, reasoning, language use and decision-making. Intelligent automation combines AI with workflow orchestration, software integration and robotic process automation (RPA) so that systems can interpret information, make bounded decisions and execute actions with limited human intervention. AI is not a single technology. It is an umbrella field containing several approaches. Machine learning learns patterns from data; natural language processing (NLP) handles human language; computer vision interprets images and video; expert systems encode explicit rules and domain knowledge; generative AI creates new content; and RPA automates structured interactions with business applications. Effective professional practice requires selecting the appropriate approach rather than treating every automation problem as a problem for a large neural network. Learning ObjectivesAfter studying this chapter, students should be able to: - Explain the relationships among AI, machine learning, deep learning, generative AI and intelligent automation.
- Distinguish supervised, unsupervised and reinforcement learning.
- Describe the operation and applications of NLP, computer vision, expert systems and RPA.
- Assess data quality, representativeness, privacy and security requirements.
- Interpret common model-performance measures and identify misleading evaluations.
- Explain deployment, monitoring, human oversight and model lifecycle management.
- Evaluate the limitations, ethical risks and governance requirements of AI-enabled systems.
1. A Conceptual Model of AI SystemsAn AI system usually contains six connected elements: - Problem definition: the decision, prediction or generation task is specified.
- Data and knowledge: examples, documents, sensor readings, rules or feedback are supplied.
- Representation: information is converted into features, tokens, embeddings or symbolic facts.
- Model: an algorithm maps inputs to predictions, classifications, actions or generated outputs.
- Execution: the output is delivered to a user or connected to an operational process.
- Evaluation and governance: quality, safety, fairness, security and compliance are monitored.
The terms AI, machine learning and deep learning are related but not synonymous. AI is the broad field. Machine learning (ML) is an AI approach in which a system learns a mapping from data rather than being programmed with every rule. Deep learning is ML based primarily on multilayer neural networks. Generative AI produces new text, images, audio, video, code or other data-like outputs; it may use deep learning but is defined by its output purpose, not merely by its architecture. A useful distinction is between prediction and automation. A model may predict that an invoice is suspicious, but an automation platform determines what happens next: hold payment, request approval, create a case or notify an investigator. Intelligent automation therefore combines probabilistic AI outputs with deterministic workflow controls. 2. Machine Learning Foundations2.1 Learning paradigmsSupervised learning uses labelled examples. Each training example contains input variables and a known target. Classification predicts categories, such as fraudulent or legitimate. Regression predicts numerical values, such as delivery time. Unsupervised learning works without target labels. Clustering groups similar records, while dimensionality reduction represents data with fewer variables. These methods support segmentation and exploration but do not automatically reveal meaningful business categories. Reinforcement learning trains an agent through interaction with an environment. At each step, the agent observes a state, selects an action and receives a reward or penalty. It is useful for sequential decisions, but reward design is difficult: an incomplete reward may encourage behaviour that satisfies the metric while violating the real objective. 2.2 Training, validation and test dataA dataset is commonly divided into training, validation and test sets. Training data estimates model parameters. Validation data supports model selection and hyperparameter tuning. The test set is held back for a final, relatively unbiased estimate of generalisation. Overfitting occurs when a model learns accidental details of the training data and performs poorly on new cases. Underfitting occurs when the model is too simple to represent important relationships. Regularisation, appropriate model complexity, cross-validation and sufficient data can reduce these problems. Data leakage occurs when information unavailable at the time of a real decision enters training or evaluation. For example, using a customer’s eventual payment status to predict whether the customer will pay is leakage. Leakage produces impressive but invalid performance. 2.3 Model evaluationFor binary classification, let TP be true positives, TN true negatives, FP false positives and FN false negatives. Accuracy = (TP + TN) / (TP + TN + FP + FN) Precision = TP / (TP + FP) Recall = TP / (TP + FN) F1 = 2 × (Precision × Recall) / (Precision + Recall) Accuracy is the proportion of all predictions that are correct. Precision is the proportion of predicted positives that are actually positive. Recall, also called sensitivity, is the proportion of actual positives detected. F1 is the harmonic mean of precision and recall and is useful when both are important. These measures assume mutually exclusive binary outcomes and non-zero denominators. They do not by themselves establish fairness, causality, business value or safety. For regression, common measures include mean absolute error (MAE) and root mean squared error (RMSE). If yᵢ is the observed value, ŷᵢ is the prediction and n is the number of cases: MAE = (1/n) × ∑ᵢ₌₁ⁿ |yᵢ − ŷᵢ| RMSE = √[(1/n) × ∑ᵢ₌₁ⁿ (yᵢ − ŷᵢ)²] Both have the same units as the target. RMSE penalises large errors more strongly than MAE. Evaluation should also consider calibration, latency, cost of errors, subgroup performance and performance after deployment. Worked example. Suppose a screening model produces TP = 80, TN = 850, FP = 50 and FN = 20. There are 1,000 cases. Accuracy is (80 + 850) ÷ 1,000 = 0.93, or 93%. Precision is 80 ÷ (80 + 50) ≈ 61.5%. Recall is 80 ÷ (80 + 20) = 80%. The model therefore detects most positive cases, but a positive result is correct only about three times in five. Whether that is acceptable depends on the cost of investigation and missed cases. 2.4 Features, representations and algorithmsA feature is an input variable used by a model. Feature engineering may include encoding categories, scaling numerical values, extracting dates or creating domain-specific indicators. Modern deep-learning systems often learn representations automatically, but data preparation and domain understanding remain essential. Common algorithms include linear and logistic regression, decision trees, random forests, gradient-boosting models, support-vector machines, k-means clustering and neural networks. There is no universally best algorithm. Selection depends on data size, structure, interpretability, latency, maintenance and risk. 3. Generative AI and Foundation ModelsGenerative AI models learn statistical regularities in large datasets and generate outputs conditioned on a prompt or other input. Large language models (LLMs) represent text as tokens and estimate likely continuations. A simplified autoregressive relationship is: P(x₁, x₂, …, xₜ) = ∏ₖ₌₁ᵗ P(xₖ | x₁, …, xₖ₋₁) Here xₖ is the token at position k and t is the sequence length. The relationship describes factorisation of a sequence probability; it does not mean that a model possesses human understanding or that its output is necessarily true. A transformer uses attention mechanisms to relate tokens in a sequence. Pre-training learns general patterns from large corpora. Fine-tuning adapts a model to a task or style. Instruction tuning improves response to commands, while retrieval-augmented generation (RAG) supplies relevant organisational documents at response time. RAG can improve currency and traceability, but it does not guarantee that retrieved material is authoritative or that the generated answer faithfully represents it. Generative systems may hallucinate: they produce fluent but unsupported or false content. Other risks include prompt injection, confidential-data disclosure, copyright disputes, malicious content, excessive computing cost and automation bias. High-impact uses should require source validation, restricted data handling, output testing and human approval. 4. Natural Language ProcessingNLP enables systems to process written or spoken language. A typical pipeline includes collection, cleaning, tokenisation, representation, model inference and evaluation. Tasks include: - text classification, such as routing support requests;
- named-entity recognition, such as identifying people, organisations and dates;
- sentiment and intent analysis;
- information extraction from contracts and invoices;
- machine translation and speech recognition;
- question answering and summarisation.
Traditional NLP uses dictionaries, grammar rules and statistical models. Contemporary systems commonly use embeddings, in which words, phrases or documents are represented as vectors whose geometry captures some semantic relationships. Similarity is often measured using cosine similarity: cos(θ) = (a · b) / (||a|| ||b||) Vectors a and b must be non-zero; θ is the angle between them. The value is dimensionless and ranges from −1 to 1. Similarity is evidence of representational proximity, not proof that two statements are factually equivalent. NLP performance varies with language, dialect, domain vocabulary, spelling, ambiguity and context. Evaluation must include representative samples and error categories. A chatbot that scores well on generic benchmarks may still fail on local legislation, technical abbreviations or sensitive customer interactions. 5. Computer VisionComputer vision extracts information from images or video. Image classification assigns a label to an image; object detection identifies objects and bounding boxes; segmentation assigns labels to pixels; optical character recognition (OCR) converts visual text into machine-readable characters. A practical vision solution requires image acquisition, labelling, preprocessing, model training, evaluation and deployment. Lighting, camera angle, resolution, occlusion and environmental change strongly affect performance. A model trained on carefully staged photographs may fail in a warehouse with dust, shadows or damaged labels. Intersection over Union (IoU) evaluates overlap between a predicted and a reference bounding box: IoU = Area of (Prediction ∩ Ground Truth) / Area of (Prediction ∪ Ground Truth) IoU ranges from 0 to 1 for ordinary finite regions. A detection is often counted as correct only when IoU exceeds a selected threshold and the class is correct. The threshold must be reported because changing it changes measured performance. Vision applications include quality inspection, medical-image assistance, traffic monitoring, inventory counting and document processing. Facial recognition and biometric applications require especially careful legal, privacy, accuracy and proportionality analysis. 6. Expert Systems and Knowledge-Based AIAn expert system represents domain knowledge explicitly. Its principal components are: - a knowledge base containing facts and rules;
- an inference engine applying rules;
- a working memory containing current case facts;
- a user interface; and
- often an explanation facility showing why a conclusion was reached.
A rule may be expressed as: IF a device is overheating AND fan speed is low, THEN inspect the cooling system. Forward chaining starts with known facts and derives conclusions. Backward chaining starts with a goal and searches for rules that could establish it. Expert systems are valuable where rules are stable, auditable and supplied by specialists. They are less suitable where knowledge is tacit, rapidly changing or difficult to express symbolically. Maintenance is a major issue: incomplete or contradictory rules can create unreliable conclusions. A hybrid system may combine rules for safety constraints with ML for perception. 7. Robotic Process Automation and Intelligent AutomationRPA uses software robots to perform repeatable actions in applications, such as reading a structured email, copying fields between systems, validating a form and updating a record. RPA commonly interacts through user interfaces, APIs, databases or files. Traditional RPA is deterministic and rule-based. Intelligent automation adds OCR, NLP, classification, process mining, decision models and workflow orchestration. A robust process separates uncertain interpretation from controlled execution. For example, AI may extract invoice fields, while deterministic rules validate totals and a human approves exceptions. RPA is appropriate when processes are high-volume, stable, rules-based and digitally accessible. It is a poor choice for processes with frequent interface changes, unclear ownership, highly variable judgement or fundamentally defective procedures. Automating a bad process can increase the speed and scale of error. Important design practices include idempotency, exception handling, audit logs, credential protection, retries with limits, transaction reconciliation and controlled rollback. An idempotent operation produces the same intended result when safely repeated; this is important when a network failure leaves uncertain whether an action succeeded. 8. Data Requirements and Data GovernanceAI quality depends on more than quantity. Useful data should be relevant, accurate, timely, sufficiently complete, consistently labelled and representative of the population and operating conditions. Data provenance records where data came from, how it was transformed and who is permitted to use it. Important questions include: - Is the target label reliable and consistently defined?
- Does the sample represent future users and edge cases?
- Are protected characteristics being used lawfully and appropriately?
- Could historical decisions encode discrimination?
- Is personal or confidential data minimised, secured and retained only as needed?
- Can an individual request correction, access or deletion where applicable?
Data governance assigns ownership, access rules, quality controls, retention requirements and incident procedures. Privacy-enhancing practices include minimisation, pseudonymisation, access control, encryption and privacy impact assessment. Pseudonymisation reduces direct identification but does not make data anonymous. Fairness is multidimensional. A model can show similar error rates across groups while producing different positive-prediction reliability, or satisfy one fairness criterion while violating another. Therefore, fairness assessment must be connected to the application, legal obligations, affected communities and available remedies rather than reduced to one score. 9. Deployment and the AI LifecycleA production AI system requires more than a trained model. A typical lifecycle is: - define the use case, stakeholders, risks and success criteria;
- collect, govern and document data;
- build a baseline and train candidate models;
- validate technical, operational and ethical requirements;
- deploy gradually with access controls and rollback;
- monitor performance, drift, incidents and user feedback;
- retrain, revise or retire the system.
Data drift occurs when input distributions change. Concept drift occurs when the relationship between inputs and the target changes. Monitoring should compare current data and outcomes with validated reference conditions. It should also monitor latency, availability, cost, false positives, subgroup outcomes, security events and human override rates. MLOps applies software-engineering discipline to ML: version control for code and data, reproducible pipelines, automated tests, model registries, approval gates and observability. A model card or system documentation should state intended use, limitations, training information, evaluation populations, known risks and contact points. Human-in-the-loop design is not achieved merely by placing a person at the end of a workflow. The person must have sufficient time, information, authority and competence to challenge the output. Automation bias occurs when users accept machine recommendations without adequate scrutiny. 10. Responsible Use, Security and RegulationResponsible AI requires lawful purpose, accountability, transparency appropriate to the context, safety, privacy, security, accessibility and mechanisms for contesting harmful decisions. High-impact decisions involving employment, education, credit, health or public services warrant stronger controls than low-risk content recommendation. Security threats include adversarial examples, data poisoning, model extraction, membership inference, prompt injection, insecure plugins and supply-chain compromise. Controls may include input validation, least-privilege access, network segmentation, secrets management, red-team testing, content filtering, rate limits and incident response. Organisations should conduct an impact assessment before deployment. It should identify affected groups, foreseeable misuse, error costs, legal duties, fallback procedures and accountable owners. Records should distinguish model recommendations from human decisions and preserve sufficient evidence for audit without retaining unnecessary personal data. Limitations must be stated plainly. AI systems do not automatically possess common sense, moral responsibility, current knowledge, causal understanding or domain authority. Statistical correlation does not establish causation. A highly accurate average result can conceal serious failures for minority groups or rare but consequential cases. 11. Illustrative Case: Intelligent Invoice ProcessingBackgroundA medium-sized distributor receives 12,000 invoices each month as PDFs and email attachments. Staff manually extract supplier, date, purchase-order number, tax and total values before entering them into an enterprise resource planning system. Problem and analysisManual entry causes delays and transcription errors. However, invoices vary in layout, some are scans, and fraudulent or duplicate invoices may be submitted. A fully autonomous payment decision would be unsafe because extraction confidence is not equivalent to legitimacy. ApproachThe organisation implements a staged intelligent-automation design. OCR and a document model extract fields. A validation service checks required fields, arithmetic consistency and purchase-order matching. Duplicate detection compares supplier, invoice number, date and amount. A rules engine rejects impossible values and routes exceptions. Invoices with high-confidence extraction and successful validation enter a queue for approval; low-confidence or anomalous cases go to trained staff. Every extraction, correction, rule result and approval is logged. The team creates a representative test set containing typed, scanned, multilingual and deliberately corrupted invoices. It measures field-level precision and recall, end-to-end exception rates, processing time and false-payment risk. It tests performance by supplier and document type, not only as an overall average. OutcomeProcessing time decreases, but the system does not eliminate human review. When a supplier changes its template, extraction performance declines; monitoring detects the shift and the affected template is added to retraining and testing. The organisation retains a manual fallback and periodically samples automatically approved invoices. Learning pointsThe case illustrates that intelligent automation is a socio-technical system. AI performs uncertain perception, deterministic controls constrain actions, people handle exceptions, and governance makes the process auditable. Success is measured by reliable business outcomes and controlled risk, not by model accuracy alone. Contemporary Developments and Best PracticesCurrent practice is moving toward multimodal foundation models, smaller domain-specific models, retrieval-based systems, edge inference, synthetic data and agentic workflows. These developments can improve capability but also increase the need for evaluation. An autonomous agent that can call tools or change records has a larger action surface than a text-only assistant. Recommended professional practice is to: - begin with a clearly defined problem and a non-AI baseline;
- use the simplest reliable method that meets requirements;
- establish data ownership, provenance and quality tests;
- evaluate on realistic, time-separated and subgroup-specific data;
- separate model confidence from business authorisation;
- design human review for uncertainty and high-impact outcomes;
- secure credentials, interfaces and retrieved documents;
- monitor drift, errors, fairness, cost and user behaviour;
- document limitations, decision rights and escalation paths; and
- provide rollback, appeal and retirement procedures.
Chapter SummaryAI is a broad field encompassing learning, reasoning, perception and generation. Machine learning may be supervised, unsupervised or reinforcement-based, and its performance must be evaluated with measures suited to the task and error costs. Generative AI and NLP enable language and content applications but can hallucinate, leak information or reproduce bias. Computer vision requires representative images and careful treatment of environmental variation. Expert systems provide explicit, explainable rules, while RPA executes repeatable digital actions; intelligent automation combines these capabilities with workflow and human oversight. Reliable deployment depends on data quality, valid train-validation-test practice, avoidance of leakage, lifecycle monitoring and MLOps. Responsible use requires privacy, security, fairness, transparency, accountability and proportionate human control. The central professional principle is that an AI model is only one component of a governed socio-technical system. Key TermsArtificial intelligence: The field of systems performing tasks associated with human intelligence. Machine learning: AI methods that learn patterns or mappings from data. Deep learning: Machine learning using multilayer neural networks. Supervised learning: Learning from examples with target labels. Unsupervised learning: Learning structure from data without target labels. Reinforcement learning: Learning actions through rewards and interaction. Overfitting: Learning training-specific detail that harms generalisation. Data leakage: Use of information unavailable at the real decision time. Precision: The proportion of predicted positives that are correct. Recall: The proportion of actual positives that are detected. Generative AI: AI that produces new content such as text, images or code. Large language model: A model that learns statistical patterns in token sequences. Retrieval-augmented generation: Generation supported by retrieved external information. Natural language processing: Computational processing of human language. Computer vision: Computational interpretation of images or video. Expert system: A knowledge-based system using explicit rules and inference. Robotic process automation: Software automation of repeatable digital tasks. Data drift: Change in the distribution of input data. Concept drift: Change in the relationship between inputs and the target. MLOps: Engineering and governance practices for operational machine learning. Review Questions5 Short Answer Questions- Distinguish artificial intelligence, machine learning and deep learning.
- What is data leakage, and why does it invalidate evaluation?
- Define precision and recall.
- State two appropriate uses and two limitations of RPA.
- What is the purpose of human-in-the-loop design?
5 Long Answer Questions- Explain supervised, unsupervised and reinforcement learning, giving an application for each.
- Describe an end-to-end lifecycle for deploying and monitoring an AI system.
- Compare generative AI, expert systems and RPA in terms of knowledge representation, uncertainty and governance.
- Explain why representative data and subgroup evaluation are important for responsible AI.
- Discuss the principal security, privacy and ethical risks of an enterprise LLM application.
3 Analytical / Application Questions- A fraud model has excellent accuracy but misses most fraudulent transactions because fraud is rare. Which measures and operational tests should be examined, and why?
- Design an intelligent-automation workflow for processing student applications. Identify the AI components, deterministic controls, human-review points and audit records.
- A computer-vision model performs well in a laboratory but poorly at a client site. Analyse possible causes and propose a remediation and monitoring plan.
Multiple Choice Questions with AnswersQuestion 1Which statement best distinguishes machine learning from traditional rule programming? A. Machine learning always uses images rather than text B. Machine learning learns patterns or mappings from data C. Machine learning cannot be evaluated quantitatively D. Machine learning requires no data preparation Correct Answer: B. Machine learning learns patterns or mappings from data Question 2In a binary classifier, what does recall measure? A. The proportion of predicted positives that are correct B. The proportion of all predictions that are correct C. The proportion of actual positives that are detected D. The proportion of predicted negatives that are correct Correct Answer: C. The proportion of actual positives that are detected Question 3A model has TP = 80 and FP = 20. What is its precision? A. 60% B. 75% C. 80% D. 90% Correct Answer: C. 80% Question 4Which situation is an example of data leakage? A. Scaling training features using training-set statistics B. Using future payment status to predict whether a customer will pay C. Holding a test set aside until final evaluation D. Removing duplicate training records Correct Answer: B. Using future payment status to predict whether a customer will pay Question 5What is a principal characteristic of generative AI? A. It only retrieves exact records from a database B. It creates new content conditioned on an input C. It can operate only through manually written rules D. It guarantees that every generated statement is true Correct Answer: B. It creates new content conditioned on an input Question 6Which task is most directly associated with computer vision? A. Bounding-box object detection B. Token probability estimation C. Forward chaining over business rules D. Password rotation Correct Answer: A. Bounding-box object detection Question 7What is the main role of an inference engine in an expert system? A. To capture camera images B. To apply knowledge-base rules to available facts C. To encrypt every database column D. To generate random training labels Correct Answer: B. To apply knowledge-base rules to available facts Question 8Which process is most suitable for conventional RPA? A. A rapidly changing process requiring open-ended judgement B. A high-volume, stable process with explicit rules C. A process with no digital interfaces or records D. A process whose objective has not been defined Correct Answer: B. A high-volume, stable process with explicit rules Question 9What is concept drift? A. A change in the relationship between inputs and the target B. A deliberate increase in model size C. A method for encrypting model parameters D. A reduction in the number of test cases Correct Answer: A. A change in the relationship between inputs and the target Question 10Which practice most directly supports safe deployment of an AI system? A. Removing all human review to maximise speed B. Evaluating only the average accuracy C. Using monitoring, audit logs and a rollback procedure D. Training on confidential data without access controls Correct Answer: C. Using monitoring, audit logs and a rollback procedure
|