BIT252 Artificial Intelligence

Artificial IntelligenceUnit 1011 min read

Short Notes & Practical AI Applications (Agile, Feasibility, Agents, Tools)

Unit 10 of Artificial Intelligence covers rapid application development (RAD), agile methodologies, rational agents, economic feasibility, and practical AI tools—explaining how these concepts bridge theory to real-world systems like eSewa’s fraud detection or Pathao’s route optimization.

TAKEAWAYS:

  • Agile vs. RAD: Agile is iterative (sprints, feedback loops), while RAD focuses on rapid prototyping and user feedback cycles.
  • Rational agents make optimal decisions under uncertainty (e.g., WhatsApp’s spam filter balancing false positives/negatives).
  • Economic feasibility compares costs (development, maintenance) vs. benefits (revenue, efficiency) using metrics like ROI or NPV.
  • AI tools (e.g., TensorFlow, NLP libraries) enable practical applications like Ncell’s chatbots or Daraz’s recommendation systems.
  • Short notes require concise definitions + one real-world example per concept (e.g., "Agile: Used by Google for Android updates via 2-week sprints").
  • Exam focus: Match definitions to applications (e.g., "Rational agent → AI in Kathmandu traffic lights optimizing green/red times").

1. Rapid Application Development (RAD)

Definition: RAD is a software development methodology that emphasizes rapid prototyping, iterative user feedback, and reusable components to accelerate delivery. Unlike waterfall, it avoids lengthy documentation and focuses on working models early.

How RAD Works (Mermaid Flowchart)

flowchart LR
    A["User Requirements"] --> B["Prototype\n(2-4 weeks)"]
    B --> C["User Feedback"]
    C -->|"Yes"| D["Refine Prototype"]
    C -->|"No"| E["Final System"]
    D --> B

Key Features:

  • Modular design: Pre-built components (e.g., UI templates, APIs) reduce coding time.
  • User involvement: Continuous testing with end-users (e.g., eSewa’s beta tests for new payment features).
  • Short cycles: Prototypes ready in weeks, not months.

Example: eSewa’s Mobile App

  • Problem: Slow onboarding due to complex forms.
  • RAD Solution:
    1. Built a prototype with mock forms in 3 weeks.
    2. Tested with 500 users → identified friction points (e.g., OTP delays).
    3. Iterated: Added auto-fill and biometric login.
  • Result: 40% faster sign-ups post-RAD.

Advantages: ✅ Faster time-to-market (critical for startups like Pathao). ✅ Early error detection (reduces costly fixes later). ✅ High user satisfaction (feedback-driven).

Disadvantages: ❌ Risk of scope creep (too many features added late). ❌ Requires high user availability for testing. ❌ Less documentation → harder maintenance.


2. Agile Development

Definition: Agile is an iterative, incremental approach where work is divided into sprints (2–4 weeks). Teams prioritize flexibility, collaboration, and customer feedback over rigid planning.

Agile vs. RAD: Comparison Table

Feature Agile RAD
Focus Iterative development Rapid prototyping
Feedback Loop Continuous (daily standups) After each prototype
Documentation Minimal (just enough) Very minimal
Best For Complex, evolving projects Simple, user-facing apps
Example Google’s Android updates eSewa’s payment gateway

Agile in Action: WhatsApp’s Updates

  • Process:
    1. Sprint Planning: Team picks features (e.g., "end-to-end encryption for voice calls").
    2. Daily Standups: 15-minute syncs to track progress.
    3. Sprint Review: Users test beta → feedback on bugs (e.g., "video call lag on iOS").
    4. Retrospective: Team discusses what worked (e.g., "pair programming reduced bugs by 30%").
  • Outcome: WhatsApp releases monthly updates with fixes based on real user pain points.

Agile Principles (Manifesto):

  1. Individuals > Processes: Trust teams over rigid rules.
  2. Working software > Documentation: Deliver usable features first.
  3. Customer collaboration > Contract negotiation: Prioritize user needs.
  4. Responding to change > Following a plan: Adapt to new info.

3. Rational Agent

Definition: A rational agent is an AI system that acts optimally given its perceptions, knowledge, and goals, even under uncertainty. It balances costs/benefits to make decisions.

How Rational Agents Work

  1. Perceive the environment (e.g., sensors, user input).
  2. Reason using logic/rules (e.g., "If traffic is heavy, take alternative route").
  3. Act to achieve goals (e.g., "Send Pathao rider via Ring Road").

Example: Pathao’s Route Optimization

  • Agent: Pathao’s algorithm.
  • Perception: Live traffic data (from NTC, rider location, destination).
  • Reasoning:
    • Cost: Time delay, fuel, rider fatigue.
    • Benefit: Faster delivery → happier customer.
  • Action: Chooses route with lowest expected time (e.g., avoids Thapathali traffic jam).

Mathematical Model: A rational agent maximizes expected utility: Example Calculation:

Route Time (mins) Cost (Rs) Utility (Benefit = 100 - Time)
Ring Road 15 50 100 - 15 = 85
Mahendra Rd 20 30 100 - 20 = 80
Decision: Choose Ring Road (higher utility).

4. Economic Feasibility

Definition: Economic feasibility assesses whether an AI project is cost-effective by comparing development/maintenance costs vs. financial benefits (e.g., revenue, efficiency gains).

Key Metrics

  1. Return on Investment (ROI): Example: Ncell’s AI chatbot costs $50,000/year but saves $100,000/year in customer support.

  2. Net Present Value (NPV): Accounts for time value of money (future benefits are worth less today). Example: Daraz’s recommendation engine costs $200,000 but generates $80,000/year for 3 years at 10% discount rate.

  3. Break-Even Analysis: The point where total revenue = total cost. Example: NEPSE’s trading bot costs $10,000 but earns $2,000/month. Break-even in 5 months.

Feasibility Study Steps

flowchart TD
    A["Define Project Scope"] --> B["Estimate Costs\n(Dev, Hardware, Training)"]
    B --> C["Estimate Benefits\n(Revenue, Time Saved)"]
    C --> D["Calculate ROI/NPV"]
    D --> E["Risk Assessment\n(What if traffic data fails?)"]
    E --> F["Recommendation\n(Proceed/Abort)"]

Real-World Example: NTC’s Traffic Light Optimization

  • Cost: $150,000 for sensors + AI software.
  • Benefit: Reduces congestion by 20% → saves $500,000/year in fuel/wasted time.
  • NPV Calculation:

5. Practical AI Applications (Short Notes)

A. AI in eSewa (Fraud Detection)

  • Tool: Machine Learning (Random Forest classifier).
  • How it works:
    1. Trains on historical fraud data (e.g., fake transactions).
    2. Flags suspicious transactions in real-time (e.g., sudden large payment to unknown merchant).
    3. False positive rate: 5% (balances security vs. user convenience).
  • Impact: Reduced fraud by 35% in 2023.

B. AI in Daraz (Recommendation System)

  • Tool: Collaborative filtering (user-item interactions).
  • Example:
    • User A buys laptops and chargers.
    • System recommends laptops to users who bought chargers (even if they didn’t buy laptops).
  • Business Impact: 15% increase in cross-sell revenue.

C. AI in Pathao (Dynamic Pricing)

  • Tool: Reinforcement Learning.
  • How it works:
    • Adjusts fares based on demand/supply (e.g., +30% during Dashain).
    • Rational agent goal: Maximize rider satisfaction and driver earnings.
  • Result: 20% higher bookings during peak hours.

D. AI in Ncell (Customer Service Chatbot)

  • Tool: NLP (Dialogflow + Python).
  • Example Conversation:
    User: "My bill is Rs. 5000 but I used only 2GB."
    Bot: "Let me check... Your bill includes 100 SMS and 5GB data. Here’s the breakdown: [shows table]."
    
  • Benefit: Handles 60% of queries without human agent.

6. Exam Tip: How to Score Full Marks

  1. Short Notes Format:

    • Definition (1 line) + Example (1 real-world case) + One advantage/disadvantage.
    • Example Answer:

      Rapid Application Development (RAD): A methodology using prototypes and user feedback to speed up software delivery. Example: eSewa built a payment prototype in 3 weeks, reducing onboarding time by 40%. Advantage: Early error detection; Disadvantage: Scope creep risk.

  2. Agile vs. RAD:

    • Compare 2–3 key differences (use the table above).
    • Exam Tip: Always link to a real company (e.g., "Google uses Agile for Android updates").
  3. Rational Agent:

    • Must include:
      • Definition (optimal decision-making).
      • One real example (Pathao, NTC traffic lights).
      • Utility calculation (even with simple numbers).
  4. Economic Feasibility:

    • Always calculate ROI or NPV (even with hypothetical numbers).
    • Example:

      "A bank’s AI loan approval system costs $50,000 but saves $20,000/year in manual reviews. ROI = 40% per year."

  5. Practical Applications:

    • Name the company + tool + impact.
    • Example:

      "Daraz uses collaborative filtering to recommend products, increasing cross-sell revenue by 15%."


## In the Real World

  1. eSewa’s Fraud Detection

    • Tool: Machine Learning (Random Forest).
    • How it uses Unit 10 ideas:
      • RAD: Built fraud-detection prototype in 4 weeks, tested with 1,000 users.
      • Rational Agent: Balances false positives (user frustration) vs. fraud caught (security).
      • Economic Feasibility: Saved $2M/year in fraud losses (ROI: 250%).
  2. Pathao’s Route Optimization

    • Tool: Reinforcement Learning.
    • How it uses Unit 10 ideas:
      • Agile: Teams update the algorithm in 2-week sprints based on rider feedback.
      • Rational Agent: Chooses routes to maximize utility (speed × rider satisfaction).
      • Short Note Link: "Pathao’s AI is a rational agent that reduces trip time by 15% using dynamic pricing."
  3. Ncell’s Chatbot

    • Tool: NLP (Dialogflow).
    • How it uses Unit 10 ideas:
      • RAD: Developed in 8 weeks with user testing for common queries.
      • Economic Feasibility: Cuts customer service costs by $100K/year (NPV: $200K over 3 years).

## Visual Summary

mindmap
  root((Unit 10: Short Notes & Practical AI))
    RAD
      "Prototypes + User Feedback"
      "Example: eSewa’s Payment App"
      "✅ Fast ❌ Scope Creep"
    Agile
      "Sprints + Daily Standups"
      "Example: WhatsApp Updates"
      "Principles: Flexibility > Plans"
    Rational Agent
      "Maximizes Utility = Benefit - Cost"
      "Example: Pathao’s Route Chooser"
      "Formula: U = B - C"
    Economic Feasibility
      "ROI = (Benefit - Cost)/Cost"
      "NPV: Discounted Future Cash Flows"
      "Example: NTC Traffic Lights"
    Practical Apps
      "eSewa: Fraud Detection"
      "Daraz: Recommendations"
      "Ncell: Chatbot"

Based on the TU BIT syllabus for Artificial Intelligence (BIT252), unit 10.

Discussion

Loading…