What is Artificial Intelligence?

EASY3 min readby AdminJune 20, 2026History
0.0|0 ratingsLog in to rate

Artificial Intelligence (AI) is the subfield of computer science dedicated to building systems capable of performing tasks that typically require human cognitiv...

#ai-engineering#course#what

Definition

Artificial Intelligence (AI) is the subfield of computer science dedicated to building systems capable of performing tasks that typically require human cognitive capabilities, such as reasoning, decision-making, pattern recognition, and natural language understanding.

Why It Exists

Traditional software engineering relies on explicit deterministic programming: Data+RulesAnswers\text{Data} + \text{Rules} \rightarrow \text{Answers} This model fails for complex tasks like visual recognition or semantic comprehension, where the rules are too intricate to write manually. AI exists to shift the paradigm to: Data+AnswersRules\text{Data} + \text{Answers} \rightarrow \text{Rules} Allowing computer systems to dynamically determine the rules from inputs.

How It Works

AI systems range from simple heuristic/symbolic rule engines to highly complex neural architectures:

text
1
2
3
[Input Data] ──> [Feature Extraction/Representation] ──> [Inference Engine/Model] ──> [Output Decision]
                        ▲                                         │
                        └───────── [Feedback / Learning Loop] ────┘
  1. Input Encoding: Raw data (text, pixels, tabular) is converted into numerical formats.
  2. Inference / Reasoning: The model processes the numerical input using mathematical representations of logical trees, statistical distributions, or multi-dimensional vector math.
  3. Action Execution: The model outputs a prediction or decision (e.g., class label, token sequence).

Real-World Example

Example

In GitHub Copilot, the AI system analyzes your current code editor context (surrounding files, comments) and generates the most probable completion. It does not search a database of pre-written templates; it synthesizes code based on learned semantic patterns.

Python Example

Example

Here is a comparison between a hardcoded rule-based agent and a simple learning agent simulating decision-making:

python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import random
from typing import Dict, List

class RuleBasedAgent:
    """Uses deterministic rules for customer support routing."""
    def route_ticket(self, text: str) -> str:
        text = text.lower()
        if "billing" in text or "invoice" in text or "charge" in text:
            return "BILLING_DEPT"
        if "login" in text or "password" in text or "reset" in text:
            return "IT_SUPPORT"
        return "GENERAL_SUPPORT"

class SimpleLearningAgent:
    """Uses empirical feedback to route support tickets dynamically."""
    def __init__(self):
        # Maps ticket keywords to historical successful resolutions
        self.weights: Dict[str, Dict[str, float]] = {
            "billing": {"BILLING_DEPT": 1.0, "IT_SUPPORT": 0.0},
            "login": {"BILLING_DEPT": 0.0, "IT_SUPPORT": 1.0},
            "slow": {"BILLING_DEPT": 0.1, "IT_SUPPORT": 0.9}
        }

    def route_ticket(self, text: str) -> str:
        scores = {"BILLING_DEPT": 0.0, "IT_SUPPORT": 0.0}
        words = text.lower().split()
        
        for word in words:
            if word in self.weights:
                for dept, weight in self.weights[word].items():
                    scores[dept] += weight
        
        # Fallback to rules if no weights found
        if all(score == 0.0 for score in scores.values()):
            return "GENERAL_SUPPORT"
            
        return max(scores, key=scores.get)

# Quick demonstration
if __name__ == "__main__":
    agent = SimpleLearningAgent()
    ticket = "I have a slow connection and cannot login"
    print(f"Learning Agent routed ticket to: {agent.route_ticket(ticket)}")

Interview Questions

  • Beginner: Explain the difference between traditional programming and Artificial Intelligence.
  • Intermediate: What is the difference between heuristic-based systems and statistical learning systems?
  • Advanced: How do modern software design patterns adapt to handle the non-deterministic output of AI agents?

Interview Answers

  • Beginner: Traditional programming uses fixed, developer-defined instructions (rules) to transform data into outputs. AI systems reverse this process; they ingest raw data along with expected outcomes (in supervised learning) to learn patterns and construct dynamic rules.
  • Intermediate: Heuristic systems rely on manually coded domain-expert rules (e.g., nested if-else structures). They are highly explainable but fragile. Statistical learning systems infer internal patterns directly from mathematical data representations, making them robust to noise but harder to audit.
  • Advanced: Traditional patterns like strict assertions or unit testing fail because AI outputs are non-deterministic. Instead, production architectures use validation gates (e.g., Pydantic schema validation, LLM-based judges), fallback APIs, and decoupled worker queues with retries to handle unstable outputs gracefully.

Common Mistakes

  • Treating AI as a magic box: Candidates often assume AI should solve everything. In interviews, don't recommend a deep learning model when a simple database lookup or regular expression suffices.
  • Ignoring determinism: Beginners fail to write fallbacks or guardrails for when an AI engine produces unexpected formats.

Assignment

Write a Python script that evaluates the output of an AI text categorizer. If the model's prediction is not in a predefined whitelist of categories (["billing", "tech", "sales"]), fall back to a deterministic regex parser.


Discussion

Join the discussion! Sign in to leave comments and ask questions.

Loading discussion...