AI Applications
Open in the Padhaiko app6.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
- High domain performance: Matches or assists human experts within a specific narrow field.
- Symbolic reasoning: Manipulates symbols and rules rather than pure numeric crunching.
- Separation of knowledge and control: Domain rules live in the knowledge base, separate from the inference engine, so rules can be updated without rewriting code.
- Explanation capability: Can answer HOW (how a conclusion was derived) and WHY (why a question is being asked to the user).
- Handles uncertainty: Uses certainty factors (CF), fuzzy rules, or probabilities when evidence is incomplete.
Architecture of an Expert System
┌──────────────────┐ ┌─────────────────────┐ ┌──────────────────────┐
│ 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:
- Knowledge Base (KB): Stores domain facts (working memory / long-term facts) and heuristic
IF-THENrules. - 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).
- Working Memory: Stores current case facts and intermediate conclusions.
- Explanation Module: Logs fired rules to explain why a question is asked or how a result was reached.
- Knowledge Acquisition Facility & User Interface: Helps knowledge engineers enter/validate rules and lets users interact naturally.
Development Lifecycle and Applications
- Development stages: Identification (problem scope & expert selection) Conceptualization (concepts & relations) Formalization (rules/frames/uncertainty model) Implementation (ES shell like CLIPS/Prolog) Testing & Validation (with domain experts).
- Applications: Healthcare diagnosis (MYCIN, clinical decision support), finance (loan underwriting, fraud screening), manufacturing & troubleshooting (fault diagnosis in turbines/networks), agriculture (crop disease advisory), and configuration (XCON/R1 for VAX computers).
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
| Level | Focus | Example Task / Rule |
|---|---|---|
| 1. Morphological / Lexical | Word structure, roots, prefixes/suffixes, tokenization | Stemming/lemmatization (running run), POS tagging |
| 2. Syntactic (Parsing) | Grammatical structure and word order | Building parse trees (S -> NP VP) |
| 3. Semantic | Literal meaning of words and sentences | Word sense disambiguation (bank = river vs. money) |
| 4. Discourse | Meaning across multiple sentences | Coreference resolution ("Sita went home. She rested.") |
| 5. Pragmatic | Context, speaker intent, world knowledge | Understanding sarcasm or indirect requests ("Can you pass the salt?") |
Major Challenges in NLP
- Ambiguity at every level: Lexical (
bat: animal vs. cricket gear), syntactic ("I saw the man with the telescope"), and pragmatic ambiguity. - Context, idioms, and figurative speech: Metaphors, sarcasm, and cultural idioms do not translate word-for-word.
- Low-resource languages and code-switching: Limited annotated data for languages such as Nepali or mixed Nepali–English text.
- Hallucination and bias in modern models: Fluent outputs can still contain factual errors or societal bias learned from web corpora.
Modern Approaches and Applications
- Evolution of approaches: Rule-based grammars Statistical NLP (-grams, HMMs, TF-IDF) Distributed word embeddings (Word2Vec, GloVe) Transformers & Self-Attention (BERT for understanding, GPT/LLMs for generation, RAG for grounded retrieval).
- Applications: Machine translation, sentiment analysis, chatbots/virtual assistants, information extraction, text summarization, spam filtering, and speech-to-text.
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.
- Fundamentals & pipeline: Image acquisition (pixels ) Preprocessing (filtering, noise removal, histogram equalization) Feature extraction (edges via Sobel/Canny, corners, CNN feature maps) High-level inference.
- Core CV tasks:
- Image classification: Assign a label to the whole image.
- Object detection: Locate and classify multiple objects with bounding boxes (e.g., YOLO, Faster R-CNN).
- Semantic / instance segmentation: Classify every pixel into an object class or individual object mask.
- Optical flow & pose estimation: Track motion and body/object keypoints across frames.
Robotics
Robotics integrates perception, decision making, and physical actuation so an embodied agent operates safely in the real world.
- Core components of a robot:
- Sensors (Perception): Cameras, LiDAR, ultrasonic/IR rangefinders, IMUs, wheel encoders.
- Compute / Controller (Cognition): State estimation (SLAM—Simultaneous Localization and Mapping), path planning, control laws (PID, MPC).
- Actuators & Effectors (Action): Electric motors, hydraulics, grippers, wheels, robotic arms (characterized by Degrees of Freedom, DoF).
- Power & Chassis: Batteries, power electronics, mechanical frame.
- Applications: Industrial welding/assembly arms, autonomous warehouse logistics (AMRs), surgical robots, agricultural drones, autonomous vehicles, and disaster search-and-rescue.
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).
| Aspect | Green AI (Sustainable by Design) | Red AI (Accuracy at Any Cost) |
|---|---|---|
| Primary goal | High accuracy per unit of compute, energy, and carbon | Marginal benchmark gains regardless of compute cost |
| Metrics reported | Accuracy alongside FLOPs, energy (), , latency | Accuracy / F1 score only |
| Model design | Pruning, quantization, knowledge distillation, efficient architectures | Massive parameter scaling and exhaustive retraining |
Practices for Sustainable AI Systems
- Model compression: Quantization (FP32 INT8/INT4), pruning redundant weights, and knowledge distillation (training a compact student from a large teacher).
- Efficient architectures & inference: Mixture-of-Experts (sparse activation), early-exit networks, Edge/TinyML deployment to cut data-centre traffic.
- 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.
- AI for sustainability: Smart electrical grids, precision irrigation, wildfire/flood early warning, and optimizing building HVAC energy use.
Worked Out Examples
6.1
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 ():
(a) Combined certainty ; (b) Rule conclusion certainty .
6.2
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:
Bigram sentence probability .
6.3
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:
Before: ; After: ; Monthly savings: .
Exercises
Exercise: Expert Systems, NLP, Vision, Robotics, and Sustainable AI
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).
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.
In an Expert System, two independent rules conclude hypothesis with certainty factors and . Compute the combined certainty factor .
Apply positive MYCIN combination formula:
Combined certainty factor .
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.
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.
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:
Object detection draws bounding boxes while semantic segmentation classifies every pixel; robots integrate sensors, cognition/control, and actuators. .
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 ): .
Green AI reduces AI's compute/carbon footprint via quantization, pruning, and distillation. The reduced carbon footprint is .