PadhaikoAll subjects

AI Applications

Artificial Intelligence (ENCT 351)

Open in the Padhaiko app

6.1 Expert systems: Characteristics, architecture, development and various applications

An Expert System (ES) is a knowledge-based computer program that emulates the decision-making ability of a human specialist in a narrow, well-defined domain (such as medical diagnosis or mineral prospecting). Classic examples include DENDRAL (mass spectrometry analysis) and MYCIN (bacterial blood infection diagnosis).

Characteristics of Expert Systems

Architecture of an Expert System

Architecture of a rule-based Expert SystemText
 ┌──────────────────┐      ┌─────────────────────┐      ┌──────────────────────┐
 │  Domain Expert   │─────►│ Knowledge Acquisition│─────►│   Knowledge Base     │
 └──────────────────┘      │     Subsystem       │      │  (Facts + IF-THEN    │
                           └─────────────────────┘      │   production rules)  │
                                                        └──────────┬───────────┘
                                                                   │
 ┌──────────────────┐      ┌─────────────────────┐      ┌──────────▼───────────┐
 │   End User       │◄────►│   User Interface &  │◄────►│  Inference Engine    │
 └──────────────────┘      │ Explanation Module  │      │  (Forward/Backward   │
                           │    (HOW / WHY)      │      │   Chaining + Memory) │
                           └─────────────────────┘      └──────────────────────┘

Core components:

  1. Knowledge Base (KB): Stores domain facts (working memory / long-term facts) and heuristic IF-THEN rules.
  2. Inference Engine: Applies rules via Forward Chaining (data-driven: start from observed facts, fire matching rules toward conclusions) or Backward Chaining (goal-driven: start from a hypothesis and work backward to check supporting facts).
  3. Working Memory: Stores current case facts and intermediate conclusions.
  4. Explanation Module: Logs fired rules to explain why a question is asked or how a result was reached.
  5. Knowledge Acquisition Facility & User Interface: Helps knowledge engineers enter/validate rules and lets users interact naturally.

Development Lifecycle and Applications

6.2 NLP: Level of analysis, challenges, modern approaches and applications

Natural Language Processing (NLP) enables computers to understand, interpret, and generate human language (text and speech).

Levels of Linguistic Analysis

Five Core Levels of NLP Analysis
LevelFocusExample Task / Rule
1. Morphological / LexicalWord structure, roots, prefixes/suffixes, tokenizationStemming/lemmatization (running run), POS tagging
2. Syntactic (Parsing)Grammatical structure and word orderBuilding parse trees (S -> NP VP)
3. SemanticLiteral meaning of words and sentencesWord sense disambiguation (bank = river vs. money)
4. DiscourseMeaning across multiple sentencesCoreference resolution ("Sita went home. She rested.")
5. PragmaticContext, speaker intent, world knowledgeUnderstanding sarcasm or indirect requests ("Can you pass the salt?")

Major Challenges in NLP

Modern Approaches and Applications

6.3 Robotics and computer vision: Fundamental, components and applications

Computer Vision (CV)

Computer Vision enables machines to extract meaningful high-level information from digital images and video.

Robotics

Robotics integrates perception, decision making, and physical actuation so an embodied agent operates safely in the real world.

6.4 Sustainable AI systems

Training and serving massive AI models consumes substantial electricity, water (for data-centre cooling), and specialized silicon. Sustainable AI covers both AI for Sustainability (applying AI to environmental goals) and Sustainability of AI (Green AI) (reducing AI's own carbon and resource footprint).

AspectGreen AI (Sustainable by Design)Red AI (Accuracy at Any Cost)
Primary goalHigh accuracy per unit of compute, energy, and carbonMarginal benchmark gains regardless of compute cost
Metrics reportedAccuracy alongside FLOPs, energy (), , latencyAccuracy / F1 score only
Model designPruning, quantization, knowledge distillation, efficient architecturesMassive parameter scaling and exhaustive retraining

Practices for Sustainable AI Systems

  1. Model compression: Quantization (FP32 INT8/INT4), pruning redundant weights, and knowledge distillation (training a compact student from a large teacher).
  2. Efficient architectures & inference: Mixture-of-Experts (sparse activation), early-exit networks, Edge/TinyML deployment to cut data-centre traffic.
  3. Green compute & scheduling: Running heavy training jobs in regions/hours powered by renewable electricity and sharing pre-trained foundation weights instead of training from scratch.
  4. AI for sustainability: Smart electrical grids, precision irrigation, wildfire/flood early warning, and optimizing building HVAC energy use.

Worked Out Examples

Example 6.1

6.1 (6 marks)

In a medical expert system using MYCIN certainty factors (), Rule 1 gives hypothesis with , and Rule 2 independently supports with . (a) Find the combined certainty when both are positive. (b) If a rule requires Symptom A AND Symptom B with and and rule strength , find the resulting certainty of the rule's conclusion.

Combine two positive CFs supporting the same hypothesis: Using MYCIN's parallel combination formula for :

Conjunctive premise (AND) and rule propagation: For A AND B, MYCIN takes the minimum premise certainty:

Multiply by the rule's attenuation/strength factor ():

Answer:

(a) Combined certainty ; (b) Rule conclusion certainty .

Example 6.2

6.2 (6 marks)

In a corpus, word counts are , , , , , and . Compute the bigram probability (starting from sentence marker <s>).

Apply the bigram Markov assumption:

Estimate each conditional probability from maximum likelihood bigram counts:

  • .
  • .
  • .

Multiply:

Answer:

Bigram sentence probability .

Example 6.3

6.3 (5 marks)

An unoptimized FP32 vision model consumes per month across cloud GPUs in a grid whose carbon intensity is . Applying INT8 quantization and pruning reduces inference energy consumption by . Compute the monthly carbon emissions before optimization, after optimization, and the monthly saved.

Baseline emissions (FP32):

Emissions after energy reduction (remaining ):

Monthly savings:

Answer:

Before: ; After: ; Monthly savings: .

Exercises

Exercise: Expert Systems, NLP, Vision, Robotics, and Sustainable AI

Question 1

Draw the block architecture of an Expert System, explain the roles of the Knowledge Base, Inference Engine, and Explanation Module, and distinguish between forward and backward chaining.

Components: The Knowledge Base stores domain facts and IF-THEN rules; the Inference Engine matches facts against rules to derive conclusions; the Explanation Module traces fired rules to answer HOW a conclusion was reached and WHY a question is being asked.

Forward vs. Backward Chaining: Forward chaining is data-driven (starts from known facts and fires rules until a goal is derived, suited for monitoring/planning). Backward chaining is goal-driven (starts from a candidate hypothesis and checks rules recursively to verify supporting facts, suited for diagnosis).

Answer:

An ES separates its Knowledge Base from its Inference Engine and adds an Explanation Module (HOW/WHY). Forward chaining reasons from data to goals; backward chaining reasons from hypotheses back to supporting facts.

Question 2

In an Expert System, two independent rules conclude hypothesis with certainty factors and . Compute the combined certainty factor .

Apply positive MYCIN combination formula:

Answer:

Combined certainty factor .

Question 3

List the five levels of NLP analysis and give one concrete example of ambiguity in natural language. Explain how modern Transformer-based LLMs differ from traditional -gram models.

Five levels: Lexical/Morphological (word forms), Syntactic (grammar/parse tree), Semantic (literal meaning), Discourse (cross-sentence coherence/coreference), and Pragmatic (intent in context).

Ambiguity & modern shift: Example syntactic ambiguity: "I saw the man with binoculars" (either I used binoculars or the man held them). Traditional -gram models condition on a fixed short window of words and suffer data sparsity; Transformers use self-attention over long contexts with dense learned representations.

Answer:

The five levels are lexical, syntactic, semantic, discourse, and pragmatic. Unlike fixed-window -gram counts, Transformers use dense embeddings and self-attention to model long-range context.

Question 4

Distinguish between object detection and semantic segmentation in Computer Vision, and state the three main hardware/software components of an autonomous robot. Also, if an object detector achieves Precision and Recall , compute its -score.

CV & Robotics: Object detection localizes each object instance with a bounding box and class label; semantic segmentation labels every single pixel by class. An autonomous robot combines sensors (perception), controller/compute (SLAM, planning, control), and actuators (motors, grippers).

-score calculation:

Answer:

Object detection draws bounding boxes while semantic segmentation classifies every pixel; robots integrate sensors, cognition/control, and actuators. .

Question 5

What is Sustainable AI (Green AI vs. AI for Sustainability)? Describe three practical techniques to make deep learning models more energy-efficient. If training a model originally uses on a grid emitting , and knowledge distillation plus pruning cuts energy by , what is the new carbon footprint?

Concepts & techniques: Sustainable AI includes Green AI (minimizing AI's own energy/carbon cost) and AI for Sustainability (using AI for climate/energy efficiency). Techniques: (1) Quantization (FP32 INT8), (2) Weight pruning, (3) Knowledge distillation into smaller student models.

Carbon calculation:

  • Original emissions: .
  • After energy reduction (using ): .
Answer:

Green AI reduces AI's compute/carbon footprint via quantization, pruning, and distillation. The reduced carbon footprint is .

← Neural Networks and Deep Learning AlgorithmsEmerging Trends →