Core Concepts of AI and ML

Clarify AI vs ML vs DL, learning types, training vs inference, foundation models, tokens, and embeddings with beginner-friendly analogies.

AI vs ML vs DL — What's the Difference?

Think of Russian nesting dolls (Matryoshka):

Outer doll = AI: Any system that mimics human intelligence Middle doll = ML: A way to implement AI by learning patterns from data Inner doll = DL: A type of ML using layered neural networks inspired by the brain

!AI contains ML contains DL, a nested hierarchy

Core Concepts

AI (Artificial Intelligence)

Any technique enabling computers to mimic human cognitive abilities — reasoning, learning, problem-solving, language understanding.

Narrow AI: Excels at one specific task (chess engine, face recognition) General AI: Human-like versatility — still theoretical today

ML (Machine Learning)

Systems that learn rules from data rather than following explicitly programmed rules.

Traditional: Developer writes rules → Computer follows them ML: Feed lots of data → Computer learns the rules itself

Three learning paradigms:

| Type | Description | Example | |---|---|---| | Supervised | Labeled data | Spam detection, price prediction | | Unsupervised | No labels, find patterns | Customer segmentation, anomaly detection | | Reinforcement | Learn via rewards | Game AI, robotics |

DL (Deep Learning)

ML using multi-layered artificial neural networks. Excels at images, speech, and natural language.

---

 

Training vs Inference

| Aspect | Training | Inference | |---|---|---| | Goal | Learn patterns | Make predictions | | Resources | High (GPU-intensive) | Relatively low | | Speed | Slow | Fast (real-time capable) | | AWS tool | SageMaker Training | SageMaker Endpoint |

---

 

Key ML Terms

Feature: Input variable used in training (e.g., room count, area, location for house price) Label: The correct answer in supervised learning Overfitting: Model memorizes training data but fails on new data Underfitting: Model too simple to learn even the training data Hyperparameter: Settings chosen before training (learning rate, epochs)

Evaluation Metrics

| Metric | Description | Best for | |---|---|---| | Accuracy | Correct predictions / total | Balanced classification | | Precision | True positives / predicted positives | Spam filter | | Recall | True positives / actual positives | Disease diagnosis | | F1 Score | Harmonic mean of precision & recall | Imbalanced data | | RMSE | Regression error magnitude | Numeric prediction |

---

 

Generative AI Concepts

Foundation Model (FM): Large model pre-trained on vast data; fine-tunable for specific tasks; accessed via Amazon Bedrock Token: Unit of text processing in LLMs; more tokens = higher cost Context Window: Maximum tokens a model processes at once Embedding: Numeric vector representation of text; similar meanings cluster together

---

 

Exam Key Takeaways

AI ⊃ ML ⊃ DL (nested relationship) Supervised = has labels / Unsupervised = no labels / Reinforcement = reward-based Training = learning patterns; Inference = applying them Overfitting = great on training data, poor on new data Foundation Model = large pre-trained AI (accessed via Bedrock) Token = text processing unit for LLMs Embedding = text as numeric vectors for semantic search

Back to blog list