Study guide
3.3 Fine-Tuning & Continued Pre-Training Data Pipeline Engineering
AWS Certified Generative AI Developer - Professional AIP-C01
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Exam Overview & Foundation Model Fundamentals
1.1 AIP-C01 Exam Structure, Logistics & Passing Strategy 1.2 AIP-C01 Scoring & Professional Decision Strategy 1.3 Foundation Model Landscape & Model Selection on Amazon Bedrock 1.4 Model Abstraction, Controlled Switching & Resilience 1.5 Customization Spectrum: Prompting vs RAG vs Fine-Tuning vs Continued Pre-training 1.6 Custom Model Deployment & Lifecycle Management
2 Chapter 2: Bedrock Knowledge Bases & RAG Architectures
2.1 Managed RAG Architecture with Bedrock Knowledge Bases 2.2 Knowledge Source Integration, Synchronization & Freshness 2.3 Data Ingestion, Parsing & Chunking Strategies 2.4 Embedding Models & Vector Representations 2.5 Vector Index Scale, Migration & Retrieval Evaluation 2.6 Vector Database Selection: OpenSearch Serverless vs Aurora pgvector vs Managed Stores 2.7 Vector Store Security, Multi-Tenancy & Connectivity
3 Chapter 3: Advanced Vector Search, Indexing & Data Compliance
3.1 Hybrid Search, Metadata Filtering & Semantic Reranking 3.2 Metadata Filtering, Reranking & Query Transformation 3.3 Fine-Tuning & Continued Pre-Training Data Pipeline Engineering 3.4 Data Validation, Multimodal Processing & Model Formatting 3.5 Data Privacy, Data Residency & Compliance Governance 3.6 Privacy Preservation, Source Lineage & Audit Evidence
4 Chapter 4: Prompt Engineering & Bedrock Runtime APIs
4.1 Advanced Prompt Engineering Techniques & Inference Parameters 4.2 Inference Parameters, Prompt Governance & Regression 4.3 Converse API vs InvokeModel API & Message Formatting 4.4 Tool Calling, FM API Resilience & Model Routing 4.5 Streaming Architectures & Asynchronous Event Processing 4.6 Resilient Streaming, Deployment & Asynchronous Processing
5 Chapter 5: Amazon Bedrock Agents & Tool Integration
5.1 Agentic Architecture, ReAct Reasoning Loops & Orchestration 5.2 Agent Frameworks, MCP & Lifecycle Management 5.3 Action Groups, OpenAPI Schemas & AWS Lambda Integration 5.4 Agent Memory, Session State & Multi-Agent Collaboration Patterns 5.5 Persistent State & Multi-Agent Coordination 5.6 Advanced Agent Prompt Templates & Flow Customization 5.7 Agent Safeguards, Tool Reliability & Cost Control
6 Chapter 6: Workflow Orchestration & Application Integration
6.1 Amazon Bedrock Prompt Flows & Visual Orchestration 6.2 Step Functions Orchestration & Human-in-the-Loop Workflows 6.3 Enterprise Integration: API Gateway, AppSync, and EventBridge 6.4 Hybrid Integration, GenAI Gateways & CI/CD Tooling
7 Chapter 7: AI Safety & Guardrails for Amazon Bedrock
7.1 Guardrails Architecture, Denied Topics & Content Filters 7.2 Content Safety, Defense in Depth & Threat Detection 7.3 Sensitive Information Filters & PII Redaction/Masking 7.4 Contextual Grounding Checks & Hallucination Prevention
8 Chapter 8: Security, Access Control & Network Architecture
8.1 IAM Least Privilege & Resource Policies for Bedrock 8.2 PrivateLink VPC Endpoints & Network Isolation 8.3 Encryption with AWS KMS & Cross-Account Access Patterns
9 Chapter 9: Governance, Auditing & Operational Logging
9.1 SageMaker Model Cards & AI Governance Frameworks 9.2 Lineage, Fairness, Transparency & Continuous Governance 9.3 Invocation Logging, CloudTrail Auditing & Observability 9.4 Responsible AI, Bias Mitigation & Red Teaming Methodologies
10 Chapter 10: Performance, Throughput & Cost Optimization
10.1 On-Demand vs Provisioned Throughput & Capacity Planning 10.2 Capacity Measurement, Scaling Patterns & Resilience 10.3 Batch Inference & Bedrock Intelligent Prompt Routing 10.4 Intelligent Prompt Routing & Application Eligibility 10.5 Prompt Caching, Token Optimization & Latency Reduction
11 Chapter 11: Testing, Evaluation & Troubleshooting GenAI Solutions
11.1 Amazon Bedrock Model Evaluation (Automatic & Human Workflows) 11.2 Human, RAG & Continuous Evaluation 11.3 Evaluation Metrics & RAG Quality Benchmarking (Ragas, ROUGE, BLEU) 11.4 RAG and Agent Performance Evaluation 11.5 CloudWatch Metrics, Throttling & Operational Observability 11.6 Quota Diagnosis, Retry Control & Operational Troubleshooting 11.7 Troubleshooting Common GenAI Failure Modes & Agent Traces 11.8 Prompt Maintenance, Content Handling & Deployment Validation
3.3 Fine-Tuning & Continued Pre-Training Data Pipeline Engineering
Key Takeaways Explain This Topic AI
Model customization on Amazon Bedrock consists of Fine-Tuning for supervised task specialization and formatting, and Continued Pre-Training for instilling deep, unlabeled domain knowledge.
Fine-tuning requires JSON Lines (JSONL) datasets containing prompt-completion pairs or conversational message arrays, whereas continued pre-training requires raw, unlabeled text chunks formatted in single-key input JSONL records.
Data pipeline engineering requires rigorous deduplication (MinHash/LSH), unicode character normalization, and token-length truncation aligned with the target base model's context window limit.
Customization jobs are executed via the Bedrock CreateModelCustomizationJob API or AWS Management Console, requiring S3 storage, IAM assume-role policies, and hyperparameter tuning for epochs, batch size, and learning rate multiplier.
In-flight training and validation loss curves in Amazon CloudWatch diagnose underfitting, overfitting, and catastrophic forgetting; customized models on Bedrock require Provisioned Throughput for inference hosting.
Last updated: September 2026
3.3 Fine-Tuning & Continued Pre-Training Data Pipeline Engineering
While prompt engineering and Retrieval-Augmented Generation (RAG) address the vast majority of enterprise generative AI use cases, certain production requirements necessitate modifying the underlying neural weights of a foundation model (FM). Amazon Bedrock provides managed model customization capabilities, supporting both Fine-Tuning and Continued Pre-Training . Achieving high-performance model customization depends overwhelmingly on the engineering rigor of the upstream data pipeline: formatting, tokenization boundaries, deduplication, and hyperparameter calibration.
Customization Strategies: Fine-Tuning vs. Continued Pre-Training
Understanding when to apply fine-tuning versus continued pre-training is a fundamental competency for AWS generative AI developers: ┌─────────────────────────────────────────────────────────────────────────────┐
- │ THE MODEL CUSTOMIZATION SPECTRUM │
- ├───────────────────────────────┬─────────────────────────────────────────────┤
- │ CONTINUED PRE-TRAINING │ FINE-TUNING (Instruction / Supervised) │
- ├───────────────────────────────┼─────────────────────────────────────────────┤
- │ • Unsupervised learning │ • Supervised learning │
- │ • Unlabeled proprietary text │ • Labeled prompt-completion pairs │
- │ • Teaches domain vocabulary & │ • Teaches task behavior, tone, style, │
- │ foundational knowledge │ and strict output formatting (JSON/XML) │
- │ • Examples: 50,000 internal │ • Examples: 2,000 prompt-response pairs │
- │ clinical trial reports, │ extracting medical records into a │
- │ oil exploration logs │ strict JSON schema without chat filler │
- └───────────────────────────────┴─────────────────────────────────────────────┘
Continued Pre-Training : Applied when a base model lacks exposure to a specialized domain vocabulary (such as internal semiconductor physics, obscure legal statutes, or proprietary programming languages). It processes vast volumes of unstructured, raw text using next-token prediction, shifting the base model's probability distribution to encompass the new domain.
Fine-Tuning (Instruction Tuning / Task Adaptation) : Applied when a model already understands the language of the domain but must consistently follow specialized instructions, match an exact organizational persona, or reliably generate structured syntax (such as valid JSON, YAML, or Cypher graph queries) without conversational preambles.
Dataset Schemas and Formatting Requirements
Amazon Bedrock requires all training and validation datasets to be staged in Amazon S3 as JSON Lines ( .jsonl ) files. In a JSONL file, each line must represent a complete, valid JSON object terminated by a newline character ( \n ). Multi-line JSON objects or trailing commas across lines will cause immediate validation failure.
1. Fine-Tuning Format: Prompt-Completion Pairs
For text generation and instruction-following models (e.g., Amazon Titan Text Lite/Express, Cohere Command Light), training data is organized as input-output pairs: {"prompt": "Extract patient diagnosis and prescribed medication:\n'Patient presents with persistent acute sinusitis. Prescribing amoxicillin-clavulanate 875mg twice daily for 10 days.'", "completion": "{\"diagnosis\": \"acute sinusitis\", \"medication\": \"amoxicillin-clavulanate\", \"dosage\": \"875mg\", \"frequency\": \"BID\", \"duration_days\": 10}"}
{"prompt": "Extract patient diagnosis and prescribed medication:\n'Follow-up visit confirms mild hypertension. Initiating lisinopril 10mg once daily.'", "completion": "{\"diagnosis\": \"hypertension\", \"medication\": \"lisinopril\", \"dosage\": \"10mg\", \"frequency\": \"QD\", \"duration_days\": null}"}
2. Fine-Tuning Format: Conversational Message Turns
For chat-optimized models (such as Meta Llama 3 or fine-tunable conversational variants), Bedrock supports multi-turn message arrays adhering to the role-based conversational structure: {"messages": [{"role": "system", "content": "You are an enterprise compliance auditor. Output findings strictly in YAML format."}, {"role": "user", "content": "Audit access request: Engineer Bob granted root access to Prod-DB on 2026-09-01 without ticket ID."}, {"role": "assistant", "content": "status: NON_COMPLIANT\nseverity: CRITICAL\nreason: Missing change management ticket for privileged access\nremediation: Revoke root access immediately and file retrospective audit ticket."}]}
3. Continued Pre-Training Format: Raw Text Ingestion
Continued pre-training does not use prompt-completion pairs. Instead, it expects unstructured documents packaged into single-key JSON records with the key "input" : {"input": "The turbofan bypass ratio (BPR) of the GE9X engine is approximately 10:1. The composite fan blades utilize carbon-fiber reinforcement with titanium leading-edge protective sheaths. During transonic cruise conditions, boundary layer ingestion (BLI) dynamics dictate that inlet pressure recovery must remain above 0.985 to avoid compressor stall..."}
{"input": "Subsea umbilical termination assemblies (SUTAs) provide hydraulic and electrical power conduits to subsea trees. High-pressure fluid conduits must withstand hydrostatic pressures exceeding 450 bar at depths greater than 3,000 meters..."}
Feasibility gate before training
Run a small data audit before allocating training compute. Sample records from every source, measure duplicates and missing labels, inspect rights and consent, and compare label agreement among reviewers. Establish a prompt or RAG baseline on the held-out set. If the baseline already meets the acceptance threshold, customization adds cost and lifecycle risk without demonstrated value.
Release evidence and reproducibility
Treat the dataset manifest as part of the model release. Record source snapshot identifiers, consent and license status, transformation code version, schema, accepted and quarantined counts, deduplication rule, split method, model customization configuration, and KMS or role dependencies. Re-running a job against a mutable S3 prefix does not reproduce the original model. Use immutable release prefixes or versioned object manifests and retain hashes for approved files.
Before submitting the full job, validate a small sample through the exact serializer and selected model schema. After training, evaluate an untouched holdout plus safety, privacy, and general-capability regressions. A lower training loss is not a release decision. Promotion requires the predefined task, safety, latency, cost, and operational thresholds, with rollback to the prior complete configuration.