Artificial IntelligenceUnit 108 min read

Expert Systems & AI Applications: Rules, Shells, and Real-World Impact

Unit 10 of Artificial Intelligence explores expert systems—how rule-based reasoning mimics human expertise, their architecture (knowledge base, inference engine), and real-world applications in medicine, finance, and industry. It also covers AI’s broader societal impact, ethical dilemmas, and emerging trends like AI in

What is an Expert System?

An expert system is a computer program that uses knowledge and inference rules to solve problems in a specific domain, mimicking the decision-making ability of a human expert. Unlike general AI, expert systems focus on narrow, well-defined tasks (e.g., diagnosing diseases, configuring systems, or troubleshooting).

Key Components of an Expert System

UsesInteracts withKnowledgeBaseInferenceEngineUserInterface
Key components of an expert system and their interactions (simplified)

How It Works: A Trace Example

Problem: Diagnose a car engine issue (overheating). Knowledge Base (Rules):

  1. IF engine temperature > 100°C AND coolant level = low THEN suggest "Check coolant."
  2. IF engine temperature > 100°C AND radiator fan = faulty THEN suggest "Replace fan."
  3. IF oil pressure = low THEN suggest "Check oil level."
Action: Recommend rest and fluidsRule 1: IF fever AND cough THEN possible fluAction: Isolate patient and consult specialistRule 2: IF fever AND rash THEN possible measlesRoot Node (Initial Query)
Example of forward-chaining inference tree for medical diagnosis

Inference Steps (Forward Chaining):

  1. Input: User reports engine temperature = 110°C, coolant level = low.
  2. Match: Rule 1 fires → Output: "Check coolant."
  3. User Action: User adds radiator fan = faulty.
  4. Match: Rule 2 fires → Output: "Replace fan."

Types of Expert Systems

Type Description Example
Rule-Based Uses IF-THEN rules (e.g., MYCIN for medical diagnosis). MYCIN (infectious disease diagnosis)
Case-Based Solves new problems by adapting solutions to past cases. CENTRESPIN (legal case analysis)
Model-Based Uses domain models (e.g., physics simulations) to reason. DeepBlue (chess AI)
Neural-Based Uses ML models (e.g., deep learning) for pattern recognition. IBM Watson (medical imaging)

Expert System Shells

An expert system shell is a pre-built framework that provides the inference engine and tools to build knowledge bases without coding from scratch. Example: CLIPS (C Language Integrated Production System). Advantages:

  • Faster development (no need to build inference logic).
  • Reusable for multiple domains. Disadvantages:
  • Limited flexibility for complex domains.
  • May require customization for niche applications.

Applications of Expert Systems

1. Medical Diagnosis

Example: MYCIN (1970s) diagnosed bacterial infections by asking symptoms and suggesting antibiotics. Real-World Tie: Nepal’s eSewa Health uses AI to triage symptoms (e.g., "fever + cough" → "Possible COVID-19, consult a doctor").

2. Financial Advisory

Example: Loan approval systems (e.g., NMB Bank’s AI) use rules like:

IF credit_score > 650 AND income > 50,000 AND loan_amount < 5M THEN approve.

Worked Example:

Input Rule Triggered Output
Credit score = 700 Rule: IF score > 650 THEN pre-approve Pre-approved for loan
Income = 45,000 Rule: IF income < 50,000 THEN reject Loan rejected

3. Industrial Troubleshooting

Example: NTC’s network fault diagnosis uses expert systems to pinpoint issues in telecom towers. Real-World Trace:

  1. Symptom: "No 4G signal in Kathmandu-3."
  2. Rule: IF signal drops in a sector AND weather = clear THEN check tower hardware.
  3. Action: AI suggests "Inspect antenna alignment."

In the Real World

  1. Khalti’s Fraud Detection

    • Idea: Rule-based expert system flags transactions using heuristics like:
      IF transaction_amount > 50,000 AND location = "unknown" THEN flag as suspicious.
      
    • Impact: Reduces fraudulent payments by 30%.
  2. Pathao’s Driver Routing

    • Idea: Case-based reasoning adapts routes based on past traffic data (e.g., "If it’s 7 PM on a Friday, avoid Thapathali").
    • Visual: Traffic routes as a graph where nodes = locations, edges = travel time.
  3. NEPSE’s Stock Advice

    • Idea: Model-based systems simulate market trends (e.g., "If inflation rises 2%, sell tech stocks").
    • Example: An expert system might generate:
      BUY: NMB (PE ratio = 12 < market avg)
      SELL: Global IME (dividend yield = 0.5% < benchmark)
      

Building an Expert System: Step-by-Step

Worked Example: Simple Loan Advisor

  1. Domain: Personal loans.
  2. Rules:
    • IF income > 70,000 AND employment = "permanent" THEN max_loan = 10M.
    • IF credit_history = "poor" THEN max_loan = 2M.
  3. Input: User enters income = 80,000, employment = "contract".
  4. Output: "Eligible for loan up to 5M (contract employment cap)."

Advantages and Limitations

Advantages Limitations
Mimics human expertise Knowledge acquisition is time-consuming
Explains reasoning (transparency) Struggles with uncertain/ambiguous data
Works in well-defined domains Poor adaptability to new scenarios
Reduces human error in repetitive tasks High initial development cost

Ethical and Societal Impact of AI

Challenges:

  1. Bias in Decision-Making
    • Example: A hiring expert system trained on historical data may favor male candidates if past hires were male-dominated.
  2. Job Displacement
    • Repetitive roles (e.g., call-center agents, radiologists) are at risk.
  3. Accountability
    • Who is responsible if an AI misdiagnoses a disease? The developer? The hospital?

Nepal-Specific Issues:

  • Digital Divide: Rural areas lack access to AI tools (e.g., eSewa’s AI requires smartphone connectivity).
  • Data Privacy: Expert systems handling health data (e.g., HamroPatri) must comply with Nepal’s Data Privacy Act (2018).

  1. Hybrid AI Systems
    • Combining expert systems with deep learning (e.g., Google’s DeepMind for protein folding).
  2. Explainable AI (XAI)
    • Tools like IBM’s AI Fairness 360 ensure transparency in expert system decisions.
  3. AI in Agriculture
    • Nepal’s KisanCall uses expert systems to advise farmers on pest control (e.g., "If leaves are yellow, spray neem oil").

Exam Tip

  1. Define Clearly

    • Distinguish between expert systems (rule-based) and machine learning (data-driven). Example:

      "An expert system uses symbolic reasoning, while ML relies on statistical patterns."

  2. Compare with Other AI Techniques

    • Use a table to contrast expert systems, neural networks, and case-based reasoning (as shown earlier).
  3. Apply to Real Scenarios

    • Question Type: "How would you design an expert system for NTC’s customer complaint resolution?"
    • Answer Structure:
      1. Domain: Telecom complaints.
      2. Rules: IF complaint = "no signal" AND location = "rural" THEN suggest "Check tower coverage."
      3. Shell: Use CLIPS for rule management.
  4. Ethics is Key

    • Expect questions on bias, accountability, and Nepal’s AI policy. Example:

      "Discuss how an expert system for loan approval might discriminate against women in Nepal."

  5. Diagrams Save Marks

    • Draw:
      • A rule-chaining trace (as above).
      • A knowledge base structure (facts + rules).
      • A comparison table (expert systems vs. ML).

Based on the TU BITM syllabus for Artificial Intelligence (IT228), unit 10.

Discussion

Loading…