Lesson 3 of 5 Choosing Modeling Approaches

Choosing the Right Level of ML Abstraction

This lesson explains the levels of ML abstraction AWS offers, from AI services to custom models, and how to weigh time to market, accuracy, cost, data privacy and skills when choosing one.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish AI services, foundation models, pre-trained models and custom models.
  • Weigh the trade-offs between levels.
  • Start at the highest level and move down when measurement requires it.

The levels of abstraction

AWS AI services (Textract, Rekognition, Comprehend, Transcribe, Translate, Polly, Lex, Personalize) solve defined tasks through APIs, often with options to customise with your data, such as Comprehend custom classifiers or Rekognition Custom Labels. Foundation models on Amazon Bedrock perform a broad range of language and image tasks through prompts and can be grounded with RAG or customised. Pre-trained models in SageMaker JumpStart can be deployed or fine-tuned on SageMaker AI. AutoML with SageMaker Canvas or Autopilot builds tabular, time-series and text models with little expertise. Custom models trained with built-in algorithms or your own code give full control.

The following diagram arranges the options from the highest level to the lowest.

The levels of abstraction, from AWS AI services at the top to custom models at the bottom. Higher levels are faster to adopt with less skill and operations; lower levels give more control and can reach the best accuracy on unique data, at the cost of data, expertise and maintenance. Start high and move down only when measurement shows the level falls short.
Levels can be combined within one application.
Put in order

From least to most effort

Exam skills 2.1.4

Arrange the approaches from the least to the most build and operations effort.

Log in to try this activity Interactive activities are free with an account.

Trade-offs

Higher levels are faster to adopt and require less ML skill and operations, but offer less control over model behaviour and may cost more per prediction at very high volume. Lower levels can reach the best accuracy on unique proprietary data but need labelled data, expertise, training infrastructure and ongoing maintenance. Data privacy is protected at every level on AWS, but some organisations must keep models and data inside their own VPC, which favours self-hosted models.

The following table summarises the trade-offs.

OptionEffort and skillsControlBest when
AWS AI serviceLowestLowTask matches the service
FM on Bedrock (prompting, RAG)LowMediumGenerative or flexible language tasks
Fine-tuned FMMediumMedium-highPrompting cannot reach quality or format
JumpStart pre-trained modelMediumHighOpen model hosted in your account
Canvas / AutopilotLow-mediumMediumTabular prediction without deep ML skills
Custom model on SageMaker AIHighestHighestUnique data and requirements
Sort into groups

Choose the level

Exam skills 2.1.4

Choose the level of abstraction that fits each request.

Log in to try this activity Interactive activities are free with an account.

Starting high and moving down when needed

A practical approach is to start at the highest level that could meet the requirement and move to a lower level only when measurement shows it falls short. For a document task, the team first tries the AI service, such as Textract, on a representative sample. If accuracy is sufficient, the work is done with no training and no infrastructure. If a specific field is consistently misread, a lower level, such as an adapter or a custom model for that field, is justified by evidence rather than assumed.

The levels can also be combined. A claims workflow might use Textract to extract text, Comprehend Medical to find medical entities, a custom fraud model for scoring and a Bedrock FM to draft a summary for the adjuster, with each component at the level that suits its task. Choosing one level for an entire application often leads either to unnecessary custom work or to forcing a general service onto a task it does not fit.

Cost comparisons should include the total cost of ownership, not only the price per prediction. A custom model may be cheaper per request at very high volume, but it adds the cost of labelling, training, hosting, monitoring, retraining and the people who maintain it. An AI service or Bedrock model charges more per request but carries none of those costs. The lower level is worth it when unique data, accuracy, explainability or control requirements cannot be met otherwise, or when volume is high and steady enough that the operational investment pays for itself.

Worked example

Four requests in one company

An insurer receives four AI requests; the right level differs for each.

RequestChoiceReason
Read fields from claim formsAmazon Textract (AnalyzeDocument with QUERIES)Common task, no training
Draft replies to customer emailsFM on Bedrock with RAG on policy documentsGenerative, needs current policy facts
Predict claim fraud from 10 years of claims dataCustom XGBoost model on SageMaker AIProprietary data, high accuracy, explainability
Underwriters want to test pricing ideas without codeSageMaker CanvasBusiness users, tabular data

Building a custom OCR model for the forms or a custom language model for the emails would cost far more with no benefit.

Check yourself

When should a custom model on SageMaker AI be chosen?

Show answer

When the company has unique tabular data and needs high accuracy that no AI service or foundation model provides.

Exam Tips

Remember for the exam

  • Task matches an AI service: use the AI service.
  • Generative tasks: Bedrock FMs, with RAG for private knowledge.
  • Unique tabular data and high accuracy: custom model on SageMaker AI.
  • Business analysts without code: SageMaker Canvas.
  • Open models hosted in your own account: SageMaker JumpStart.