1.1.3. π‘ First Principle: Core Terminology (Model, Algorithm, Inferencing, Bias, Fairness)
First Principle: A shared, precise vocabulary is essential for effective communication and understanding in AI/ML. Key terms like model, algorithm, inference, bias, and fairness represent fundamental building blocks of any AI system.
Mastering these core terms is crucial for discussing AI/ML concepts accurately.
- Algorithm: The procedure or set of rules that a machine learning system uses to learn from data. It's the "how-to" guide for creating a model.
- Example: The decision tree algorithm is a set of rules for splitting data based on its features.
- Model: The output of the training process. The algorithm is run on a dataset, and the artifact it producesβwhich contains the learned patternsβis the model. The model is what you use to make predictions.
- Example: A specific decision tree that has been trained on your customer data to predict churn.
- Inferencing (or Prediction): The process of using a trained model to make a prediction on new, unseen data.
- Example: Giving the model a new customer's data and getting back a prediction of "churn" or "no churn."
- Bias: A systematic error in an AI system that results in unfair outcomes, often stemming from flawed or unrepresentative data.
- Example: A hiring model that was trained on historical data reflecting past biases might unfairly favor one gender over another.
- Fairness: The ethical goal of ensuring that an AI model's predictions do not create discriminatory or unjust outcomes for different demographic groups.
- Example: An insurance pricing model is fair if it provides similar rates to individuals with similar risk profiles, regardless of their race or gender.
Types of inferencing: How a model is served depends on whether someone is waiting and how large or slow each request is.
| Type | How it works | Best for |
|---|---|---|
| Real-time | A persistent endpoint answers each request immediately | Interactive, low-latency needs (checkout fraud scoring, personalization) |
| Serverless | Compute is provisioned on demand and scales to zero when idle; possible cold start after quiet periods | Intermittent traffic with idle gaps that can tolerate cold starts |
| Asynchronous | Requests are queued, processed in the background, and results written to Amazon S3 | Large payloads and long processing times where results can arrive later |
| Batch | A job processes a whole dataset at once, with no persistent endpoint | Large offline jobs where no one is waiting (monthly scoring, bulk generation) |
On Amazon SageMaker AI, these map to real-time endpoints, Serverless Inference, Asynchronous Inference (payloads up to 1 GB, processing up to one hour, can scale to zero) and batch transform. On Amazon Bedrock, on-demand calls serve interactive requests, and batch inference processes many prompts from files in Amazon S3 asynchronously.
Scenario: A project manager says, "We need to run the XGBoost model on our data." You need to gently correct their terminology to ensure clarity for the team.
Reflection Question: How would you clarify that the team will be using the "XGBoost algorithm" to train a "model" on the data, and then use that model for inferencing? Why is this precision important?
π‘ Tip: Remember the sequence: You use an Algorithm to train a Model on data. You then use that Model for Inferencing. You must evaluate the model for Bias to ensure Fairness.