Sub topic 1
Four kinds of AI feature you will meet in business platforms
Prerequisites
This chapter assumes you have used an email marketing tool, a CRM, or an analytics dashboard. You should know what a contact record, a campaign, and a dashboard are. You should also have a basic idea of what machine learning and large language models (LLMs) are. You do not need to write code, but the Python examples are short and you can run them if you have numpy and scikit-learn installed.
Why classify AI features at all
Vendors label many different features "AI". A lead score, a drafted email, a spam filter, and a chat box over your dashboard all carry that label. They differ in what they take in, what they return, how they fail, and how you check them.
This chapter gives you four categories. They are predictive, generative, classification, and retrieval. Once you can place a feature in one of them, you can guess what data it needs, what its typical errors look like, and where a person should review its output. Later chapters use these categories again for email, CRM, and analytics.
The categories are working tools, not strict boundaries. Many real features combine two or more of them. A feature that answers questions about your data might use retrieval to fetch rows and a generative model to write the answer. The goal is to see which part does which job.
The four kinds at a glance
| Kind | Input | Output | Typical example | Typical failure |
|---|---|---|---|---|
| Predictive | Past records with known outcomes | A number or probability about the future | Lead score, send-time prediction, forecast | Learns from biased or stale history |
| Generative | A prompt plus context | New text, or other new content | Email draft, subject lines, call summary | Fluent text that is wrong |
| Classification | One item, such as a message or contact | One label from a fixed set | Spam filter, inbox category, sentiment | Wrong label near category boundaries |
| Retrieval | A query | Existing items or facts found in your data | Search, natural-language data questions, reply suggestions based on past mail | Finds the wrong item, or misses the right one |
Predictive features
A predictive feature estimates something that has not happened yet, or something you cannot observe directly. It learns from historical records where the outcome is already known. The model finds patterns that link the inputs to the outcome, then applies them to new records.
The output is usually a number: a probability, a score, or a forecast value. Examples in business platforms include:
- Lead scoring in a CRM, which estimates how likely a lead is to become a customer.
- Send-time optimization in an email tool, which estimates when a contact is most likely to open.
- Revenue forecasts, which estimate future totals from the current pipeline.
- Churn risk, which estimates how likely a customer is to leave.
The underlying techniques are often ordinary supervised learning, such as logistic regression or gradient-boosted trees. They are not new or exotic. The example below is a minimal lead-scoring model. It learns from past leads whose outcome is known and returns a probability for a new lead.
import numpy as np
from sklearn.linear_model import LogisticRegression
# Columns: requested_demo, free_email_domain, pricing_page_views
X = np.array([
[1, 0, 3],
[0, 1, 0],
[1, 1, 5],
[0, 0, 1],
[1, 0, 4],
[0, 1, 0],
])
# 1 = lead became a customer, 0 = it did not
y = np.array([1, 0, 1, 0, 1, 0])
model = LogisticRegression().fit(X, y)
new_lead = np.array([[1, 0, 2]])
score = model.predict_proba(new_lead)[0, 1]
print(f"Conversion probability: {score:.2f}")Three details matter here:
- The label column
ycomes from real outcomes. Without recorded outcomes, there is nothing to learn from. A CRM where deals are never marked won or lost cannot support a good lead score. - The model sees only the columns you give it. If a signal is not captured, it cannot be used.
- Six rows is far too few for a real model. Platforms need hundreds or thousands of outcomes, and many hide their scoring feature until you have enough.
Predictive features are judged by how well their numbers match what later happens. That means they can be measured, which later chapters cover.
Common predictive errors
- Stale history. The model learned from last year's buyers, but your product or market changed.
- Leakage. An input secretly encodes the outcome. For example, a "contract sent" field predicts a win only because it is filled in late in the deal.
- Feedback loops. Reps work only the high-scoring leads, so low-scoring leads rarely convert, which seems to confirm the score.
- Treating a score as a fact. A 0.70 score means roughly seven in ten similar leads converted, not that this lead will convert.
Generative features
A generative feature produces new content. In business platforms this is almost always text from a large language model: an email draft, a rewritten paragraph, five subject-line options, a summary of a call, or a plain-language description of a chart.
The model does not look up the right answer. It produces text that is likely given the prompt and any context the platform adds, such as the contact's name, the product, or the call transcript. Good output depends heavily on that context. Poor context gives generic text.
The main risk is that output reads well whether or not it is true. A draft might state a discount you do not offer, or a call summary might assign an action item to the wrong person. This is often called hallucination. You cannot detect it by checking whether the text sounds right.
Because the output is free text, you cannot score it against a single correct answer. You usually judge it by human review, by edit rates (how much users change drafts), or by downstream results such as reply rates.
Classification features
A classification feature assigns an item to one of a fixed set of labels. The set of labels is decided in advance. The model picks the best fit.
Examples:
- Spam or not spam.
- Inbox category, such as primary, promotions, or updates.
- Sentiment of a reply: positive, neutral, or negative.
- Intent of a message, such as "pricing question" or "cancellation request".
- Contact type, such as person or role-based address.
Classification and prediction look similar, because both are often built with supervised learning. The difference is in the output. A classifier returns a category now, based on what the item is. A predictive model returns an estimate about what will happen later. Many classifiers also expose a confidence value, which is useful for deciding what to review.
Newer platforms often use an LLM as the classifier. You give it the message and the list of labels, and it returns one. This is flexible, because you can change the labels without retraining. It is also less predictable than a trained classifier, so you should test it on labeled examples.
Classification errors cluster near the edges. A message that is half complaint and half question can fit two labels. Decide in advance which mistakes cost more. Sending a real customer message to spam is usually worse than letting a spam message into the inbox.
Retrieval features
A retrieval feature finds existing information instead of creating new content or predicting a number. It takes a query and returns items from a store: documents, past emails, contact records, or rows and metrics from a database.
Retrieval ranges from plain keyword search to semantic search, where text is converted into numeric vectors (embeddings) so that similar meanings land near each other. In analytics, a natural-language question can be turned into a database query that returns exact numbers.
Retrieval is often paired with generation. The platform retrieves relevant records, then asks a language model to write an answer using only those records. This is why a suggested reply can quote your real return policy. The answer is grounded in text the system found, instead of text the model invented.
Retrieval fails in two ways. It can find the wrong thing, such as the wrong customer's record. It can also miss the right thing, so the generated answer rests on incomplete evidence. Retrieval also respects, or fails to respect, access rules. If a search returns records a user is not allowed to see, that is a privacy problem, which the risks chapter returns to.
Telling the kinds apart in practice
A quick test is to ask what the feature returns.
- A number about the future: predictive.
- New text that did not exist before: generative.
- One label from a fixed list: classification.
- Something that already existed in your data: retrieval.
Now apply it to a feature that mixes kinds. An anomaly alert is a good case. The check below compares the newest metric value with the mean and spread of earlier values.
from statistics import mean, stdev
daily_signups = [102, 98, 105, 99, 101, 103, 97, 160]
baseline = daily_signups[:-1]
latest = daily_signups[-1]
z = (latest - mean(baseline)) / stdev(baseline)
print(f"z-score: {z:.1f}")
if abs(z) > 3:
print("Alert: latest value is unusual compared with the baseline")The z-score is a statistical estimate of how far the value sits from normal. The final decision labels the day "unusual" or "normal", which is classification. If the platform then writes "Signups rose 58% because of a campaign", that sentence is generative. If it pulls the campaign list to explain the rise, that step is retrieval. One feature, three kinds, each with its own failure mode. The generated explanation can be wrong even when the alert is correct.
Why the category affects your decisions
The category tells you what to check before you trust a feature.
| Kind | What to check first |
|---|---|
| Predictive | Are outcomes recorded, and is there enough history? Compare scores against what actually happened. |
| Generative | Who reviews the output before it reaches a customer? Is the context accurate? |
| Classification | Which mistake is costlier, and what happens to low-confidence items? |
| Retrieval | Did it find the right source, and is the user allowed to see it? |
A simple review rule makes this concrete. Generated external content and low-confidence outputs go to a person. This function sends a draft automatically only when it is internal and the confidence is high.
def route_draft(confidence: float, is_external: bool, threshold: float = 0.9) -> str:
"""Decide whether an AI-generated email draft is sent or reviewed."""
if is_external:
return "human_review"
return "auto_send" if confidence >= threshold else "human_review"
print(route_draft(0.95, is_external=False))
print(route_draft(0.95, is_external=True))
print(route_draft(0.70, is_external=False))The output is auto_send, human_review, and human_review. Note that the first two calls have the same confidence. Who receives the message changes the decision, not only the model's confidence. Later chapters on human review develop this idea.
Common mistakes when evaluating vendor claims
- Assuming "AI" means a language model. Many features, such as spam filters and lead scores, are older statistical models and work well.
- Judging all features the same way. A forecast can be checked against outcomes. A draft cannot.
- Ignoring the data requirement. Each feature depends on data your platform may not hold, which the next chapter covers.
- Treating confidence as accuracy. A model can be confidently wrong, especially on cases unlike its training data.
Exercise
A CRM shows a "Next likely action" box. It searches the contact's past emails for the latest pricing question, assigns the contact a "high intent" label, and writes a two-sentence suggested reply that quotes the price list. Name the kind of AI feature behind each of the three steps.
Show answer
Searching past emails for the latest pricing question is retrieval, because it finds existing items. Assigning the "high intent" label is classification, because it chooses one label from a fixed set. Writing the suggested reply is generation, because it produces new text. The generated reply should be checked against the price list before it is sent, because fluent text can still contain wrong figures.
Exercise
A team wants to rank new leads so reps call the most promising first. Which kind of feature fits, and what data must the CRM have for it to work? Give one risk to watch for.
Show answer
A predictive feature fits, because it estimates a future outcome as a score. The CRM needs past leads with recorded outcomes (won or lost) and the signals about each lead, such as demo requests and page views. One risk is a feedback loop: if reps only call high-scoring leads, low-scoring leads rarely convert, which makes the score look better than it is. Stale history and leaked inputs are other valid risks.