AWS Builder Center
AI Fundamentals for the AWS AI Practitioner

AI Fundamentals for the AWS AI Practitioner

In this article, I’ll share the knowledge I consider essential for working with AI on AWS and preparing for the AI Practitioner certification. Before exploring services and use cases, I believe building a strong theoretical foundation is essential, since understanding the concepts first makes the practical side much easier. We’ll start with broad AI concepts and gradually move toward practical model adaptation strategies through a sequence of questions that naturally arise as the topic evolves.

Series: AWS from First Principles (2 articles)

  1. 2
    AI Fundamentals for the AWS AI Practitioner This article
5x AWS Certified | Cloud & MAP Projects | Python | Data & Serverless
The purpose of this article is to answer the following questions:
  • What is AI, after all?
  • What are the subsets of AI?
  • How do models learn patterns from data?
  • What are the main training paradigms?
  • How is data separated during training?
  • What happens if the data is not interpreted correctly?
  • How does new data reach the model?
  • After a model is finalized, how can it be improved?

AI — what is it, exactly?

Artificial Intelligence is the largest "umbrella" in the image above, covering all the other subsets. In simple terms: AI is a field dedicated to solving problems we typically associate with human intelligence, such as perception, reasoning, learning, problem-solving, and decision-making.
To make this work, AI is structured in layers:
  1. Data Layer — where large volumes of data live
  1. ML Framework & Algorithm Layer — where data scientists and engineers define use cases, requirements, and learning frameworks
  1. Model Layer — where the model is implemented and trained, with its structure, parameters, and optimization functions
  1. Application Layer — where the trained model becomes a product and reaches the end user
1. During the training stage, the model learns how to differentiate each geometric shape. Then, we provide a new shape as input and ask the model to classify it based on the knowledge it acquired during training, identifying which shape corresponds to the input (a classic example of a classification algorithm).




What are the subsets of AI?


Within this umbrella, we have more specialized areas. Understanding how they relate to each other is important because you'll see these terms constantly.

Machine Learning (ML)

Machine Learning is the area of AI focused on enabling systems to learn patterns from data, without being explicitly programmed for every rule. Instead of writing all the decisions by hand, the model analyzes examples and learns to make predictions, classifications, or recommendations.
Common use cases: movie recommendations, fraud detection, sales forecasting, spam classification.

Deep Learning (DL)

Deep Learning is a subset of Machine Learning based on deep neural networks, capable of learning extremely complex patterns across large volumes of data. This evolution is what drove modern breakthroughs like voice recognition, computer vision, and generative models.
Use cases: facial recognition, autonomous vehicles, automatic translation, language models (LLMs).

Generative AI (GenAI)

Generative AI is the area focused on creating new content from patterns learned during training. Unlike traditional models that only classify or predict data, generative models can create text, images, audio, video, and code.
Examples you've probably already used: ChatGPT, image generators, coding copilots.



Specialized areas within these subsets

Beyond the main subsets, two areas come up frequently and are worth knowing:
NLP (Natural Language Processing) connects linguistics, ML, and Deep Learning so that machines can understand and generate human language. It's what powers chatbots, automatic translation, sentiment analysis, and virtual assistants.
Computer Vision enables systems to interpret images and videos in a way similar to human vision, identifying objects, people, or behaviors. It appears in facial recognition, autonomous vehicles, document reading, and medical image analysis.



How do models learn patterns from data?

Going back to Machine Learning: models learn by analyzing large volumes of data in search of relationships, correlations, and recurring behaviors. During training, the algorithm continuously adjusts its internal parameters to reduce errors and improve its ability to make predictions.
For example:
  • a model detects fraud patterns by analyzing thousands of bank transactions
  • a recommendation system learns preferences by observing user behavior
  • an image model learns visual features like shapes, colors, and textures
The higher the quality of the data and the training, the better the model tends to generalize to new cases.
For this to work, data is organized into two fundamental elements:
  • Features — the input characteristics the model analyzes (customer age, purchase value, words in a text, pixels in an image). The quality of the features directly impacts model performance.
  • Labels — the expected outputs, which act as the "correct answer" provided to the algorithm ("fraud" or "not fraud", "spam" or "not spam", the price of a house). The model's goal is to learn how to map features to labels in order to correctly predict new cases.



What are the main training paradigms?


The way data is presented to the model defines the training paradigm. Each approach serves a different purpose:
Supervised Learning — the model learns from labeled data. If input X → output Y. It's the most common and straightforward: spam detection, price prediction, image classification.

Unsupervised Learning — the model analyzes unlabeled data to find patterns or groupings on its own. Input X → ? (the model figures it out). Examples: customer segmentation, anomaly detection.

Self-Supervised Learning — the data itself generates part of the context needed for learning, reducing the need for manual labeling. Widely used in training Foundation Models and LLMs. A classic example: predicting the next word in a sentence.

Reinforcement Learning (RL) — the model learns through trial and error, receiving rewards or penalties based on its actions. Think of a maze: the AI tries every possible path, accumulates rewards for each correct step and penalties for mistakes, and over time learns the best route. Widely used in robotics, games, and autonomous systems.

RLHF (Reinforcement Learning from Human Feedback) — an evolution of RL where human feedback helps align the model's responses with real-world expectations. Widely used in generative models like chatbots to improve quality, safety, and behavioral alignment.



How is data split for training?

Having data isn't enough — it needs to be organized correctly. The dataset is typically divided into three parts:
  • Training Data — used to train the model; this is where the algorithm learns patterns, relationships, and behaviors.
  • Validation Data — used during training to evaluate performance and adjust configurations without touching the final test data. Helps identify issues like overfitting and underfitting.
  • Test Data — used only in the final evaluation, to measure how the model behaves with data it has never seen before.
The model goes through the training data in cycles called epochs. Each epoch represents one complete pass through the entire training dataset. More epochs mean more learning opportunity, but too many can cause overfitting.

Parameters vs. Hyperparameters

Two terms you'll see constantly — worth telling apart:
  • Parameters — values learned automatically by the model during training (like the weights in neural networks).
  • Hyperparameters — settings defined before training that influence how the model learns: learning rate, number of epochs, batch size.

Tokens and Embeddings

Two more fundamental concepts, especially when working with language models:
  • Tokens — small units of text processed by LLMs. They can represent words, parts of words, or characters. The model converts text into tokens to understand and generate language.
  • Embeddings — numerical representations of data in vector format. They allow models to understand semantic relationships between words, sentences, images, or documents. Essential for semantic search, RAG, recommendations, and content similarity.



What if the data isn't interpreted correctly?

Before talking about errors, it's important to understand Model Fit: how well a model learns patterns from data and generalizes correctly to new cases. A well-balanced model learns enough without excessively memorizing the training data.

When that balance breaks down, we get two classic problems:
Underfitting — the model learns too little and fails to identify important patterns. Happens when the model is too simple, there's too little training, or relevant data is missing. Result: poor performance both in training and in production, with high bias.

Overfitting — the model excessively memorizes the training data instead of learning generalizable patterns. It performs well on training data but fails on new data. Happens due to too much training, an overly complex model, or low data diversity. Result: great performance on training data, poor performance on unseen data, with high variance.

Speaking of which:
  • Bias represents errors caused by excessive simplifications in the model or problems in the data. A high-bias model learns little, generalizes poorly, and produces overly simplified predictions — it may follow a harmful bias in its decisions (I'll cover this in more depth in the next article, on Responsible AI).
  • Variance represents how sensitive the model becomes to variations in the training data. High variance makes the model treat outliers as if they were the most important patterns, leading to overfitting.
The challenge in Machine Learning is precisely balancing bias and variance to achieve good generalization.



How does new data reach the model?

After training, the model enters the inference phase — when it receives new data and generates predictions or responses based on what it learned. This is where AI actually gets used in real applications. The model is no longer learning; it's only applying the knowledge acquired during training.
Examples: a chatbot generating responses, a fraud detection system, object recognition in images, product recommendations.
There are two main inference approaches:
Batch Inference — data is processed in large batches all at once. Common in reports, periodic forecasting, and large-volume processing. Advantage: lower cost. Disadvantage: higher response time.

Real-Time Inference — the model responds almost instantly after receiving data. Used in chatbots, virtual assistants, recommendation systems, and real-time fraud detection. Advantage: low latency. Disadvantage: higher computational cost.


Cost vs. Latency

In AI, there's a constant trade-off between cost and latency. Larger models produce better responses but cost more. Real-time responses require faster infrastructure. Batch processing reduces cost but increases wait time. This is why AI architectures need to consider performance, speed, scalability, and operational cost together.



Once the model is finished, how can I improve it?

A trained model doesn't need to be replaced to evolve. There are three main strategies for adapting and specializing models, each with its ideal context:

Fine-Tuning


Fine-Tuning is the process of continuing to train an existing model using data specific to a domain or task. The goal is to specialize the model without training it from scratch — it already has general knowledge, and fine-tuning adjusts its parameters to improve responses in a specific context.
Examples: legal chatbot, medical assistant, AI specialized in internal documents, financial analysis.
On AWS, this can be done mainly with:
  • Amazon SageMaker — custom training, ML pipelines, hyperparameter tuning, and model deployment
  • Amazon Bedrock — managed fine-tuning for Foundation Models, with lower operational complexity
Fine-Tuning produces more aligned responses, but it increases cost, requires high-quality data, and can introduce overfitting if not done carefully.



Continued Pre-Training

Continued Pre-Training is a step that happens before fine-tuning, where the model continues learning from large volumes of domain-specific data. While Fine-Tuning teaches specific tasks, Continued Pre-Training expands the model's vocabulary and knowledge within that context.
It's useful when the domain has very specific language, the base model doesn't know that context well, or there's a need to deepen specialized knowledge before shaping specific behaviors.
Domain examples: medical records, legal articles, financial data, technical documentation.
On AWS, this process is typically done with Amazon SageMaker on GPU instances, distributed clusters, and storage in Amazon S3. It's the most expensive and complex of the three strategies.



RAG (Retrieval-Augmented Generation)


RAG is an approach where the model retrieves external information in real time before generating a response. Instead of changing the model itself, we add dynamic context during inference.
Simplified flow:
  1. user asks a question
  1. the system searches for relevant information in an external knowledge base
  1. the retrieved context is sent to the model along with the question
  1. the model generates a response based on that data
Advantages: no retraining required, reduces hallucinations, keeps data always up to date, and has lower operational cost. Ideal for internal knowledge bases and documentation that changes frequently.
On AWS, the main options are:
  • Amazon Bedrock Knowledge Bases — document ingestion, automatic embeddings, and managed integration with vector stores
  • Amazon OpenSearch Service — vector search and similarity search
  • Amazon Titan Embeddings — embedding generation
  • AWS Lambda — RAG flow orchestration



When to use each strategy?

Strategy
Best scenario
Main advantage
Disadvantage
Fine-Tuning
Specializing behavior
More aligned responses
Training cost
Continued Pre-Training
Expanding domain knowledge
Deep knowledge
Extremely expensive
RAG
Dynamic and frequently updated data
Low cost, easy to update
Depends on retrieval quality
In practice, many modern architectures combine Foundation Models, RAG, Prompt Engineering, and lightweight Fine-Tuning — balancing cost, performance, freshness, quality, and scalability.


That wraps up the theoretical foundations article. In the next one, I'll dive into Responsible AI — bias, transparency, security, and what AWS offers in that space.

Series: AWS from First Principles (2 articles)

  1. 2
    AI Fundamentals for the AWS AI Practitioner This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article