We look at the simple idea of classification based on embedding vectors (here “Embed + Classify”) as a much cheaper alternative to Decision Models, and investigate when it is advantageous. This is not a new idea; just one that is not as popular right now. We try to do a fair comparison between the two. Experiments code here.

Prelude

Decision Models (DM), such as Jev, were welcomed by the AI community&friends with a lot of excitement. They gave the impression that we can finally harness “LLM power for pennies”; cue to Amazon’s projected savings of millions by replacing Sonnet with a DM 1. A more sombre and accurate reading is that DMs’ popularity helped people realise that not every application needs “LLM power”. This is a good reckoning.

I was somewhat excited when Jev popped out, but for a slightly different reason: in a way, it reminded me of familiar settings from good ol’ Machine Learning, which for a few years had been shaded by LLMs. The premise of DMs is simple: you input a question and a set of choices, and the model assigns some confidence scores to these choices 2. This is much faster (and cheaper) than running an LLM in full generative mode.

In this post we look at a very simple alternative to DMs: applying a linear classifier (e.g., logistic regression) to the output of (LLM) embedding vectors; for lack of a better term, we refer to this as Embed + Classify (E+C), although you may find it described elsewhere as “linear probing” 3.

Decision Model vs. Embed + Classify: overview (Left) Jev-like decision model: it takes in a question and a set of choices, and it scores each option. (Right) E+C: we apply a cheap LLM embedder to the input text, and feed it into a traditional ML classifier that has been pre-trained on the question we care about.

While this is not a new idea 3, it turns out to be very advantageous, and I wonder if it should be at least as popular as DMs. In fact, E+C can be both so much cheaper than Jev-like DMs and potentially better performing in terms of response quality. Here’s some headline numbers based on our experiments on a dataset, described below. Achieving 88.3% accuracy via OpenAI’s DM costs $317/1M queries (prompt-tuned), whereas E+C achieves 93.5% accuracy at a cost of $0.27/1M queries. DMs can make use of few-shots learning, but at a great cost: the best accuracy we attained (91.8%) would cost $3,839/1M queries.

The reason is simple: input tokens cost money. After training, E+C only needs a minimal number of input tokens (i.e., just the text to classify), whereas Jev-like DMs need the entire context, question, list of classification options (labels), and possibly few-shot examples; these inputs are needed for every query that we send to the DM!

Before we begin, there’s two main settings that E+C does not solve, and which DMs solve natively:

  • (a) if you have no training data, DMs are the better tool. (Although you should ask yourself: can you really not collect or produce some training data for the task you care about?)
  • (b) as a self-standing corollary of (a): if you’re interested in dynamic decision queries (e.g., an LLM or some probabilistic process defines your questions and options at runtime), DMs are the right tool, and E+C won’t work out of the box.

In this post, we describe E+C, and we make cost-performance comparisons with DMs. Finally, we also try to understand “why” these two techniques are so similar (spoiler: architecturally, they behave very similarly). If the next time you’re about to reach for DMs you ask yourself “should I evaluate E+C for this problem?”, this post will have achieved its purpose.

LLM embeddings

Image source: OpenAI.

An embedding model produces a fixed-length vector representation of an input query (typically text or images) such that “similar” inputs are mapped to vectors that are close to each other. Typically, they are based on a pre-trained transformer architecture, whose generative head is replaced by a pooling neural network that outputs a fixed-length vector (the embedding vector). This network is trained so that its output vectors are close (e.g., in terms of the cosine similarity) for similar inputs.

Gotcha: LLM embeddings are not to be confused with token embeddings, which are vector representation of individual tokens before entering the attention layer of a transformer. Also, not to be confused with traditional embedding models such as bag of words: similar idea, but transformer-based embeddings have much better performance on text and image tasks.

LLM embeddings are very effective at capturing similarities between queries, and they tend to be the backbone of RAG systems, where a query (user question) is matched to a set of texts in a knowledge base to find relevant portions of text for answering a question.

However, there’s nothing preventing us from using embedding for other learning tasks, such as the feature vectors for classification.

Embed+classify

E+C requires you to have some labelled examples. E.g., if you’re trying to classify whether a review on your website is positive or negative, you will need some examples of positive and negative reviews. After that, it’s plain sailing.

You:

  • create an embedding vector for each of your training examples
  • train an ML classifier (e.g., logistic regressor) on said vectors
  • when a new data point comes, you compute its vector embedding and then run the classifier on top.

Nothing new. Plain old ML (aside from the modern LLM-based feature vector generation). There’s multiple advantages in this process:

  • Computing embeddings takes very little time (and cost). If you have lots of training data, you can even use batch APIs to further bring down your costs (e.g., 50% for some providers); any costs mentioned in this post do not make this optimisation.
  • Training your classifier takes very little time; additionally, if you ever need to add any training data, you can apply neat tricks to avoid full training.
  • Once you have trained the classifier and computed an embedding vector for a test point, running classification takes microseconds and it can easily be done in CPU.
  • If you’re interested in explainability (i.e., understanding why the model predicted something), you can replace logistic regression with more interpretable models.
  • Underappreciated advantage: you fully own and control what’s happening inside your classification pipeline. You may still need to rely on external providers for LLM embeddings, but there’s self-hosting options that have tiny requirements.

Show me the numbers

I run some experiments based on the PolyAI/banking77 dataset, which contains a list of banking queries (e.g., “Can I track the card that was just sent to me?”) and their corresponding intent (e.g., card_arrival).

We use all 9,997 training examples (the official training split, minus 6 duplicate test questions) and a test set of 20 examples per label (1,540 in total, half of the official test split), and compare two DMs (Jev and OpenAI’s decision model which is based on GPT-6-luna) against E+C.

The numbers speak for themselves: for this dataset, 8 training examples per label are enough for E+C to have better performance than Jev and OpenAI’s Luna DM (zero-shot). Using all the training data pushes its performance to 93.5% (vs resp. 79.9% and 78.0%). Costs are also extremely extremely low for E+C: 1M queries cost $0.27 for E+C, against $74 (Jev) and $100 (OpenAI’s DM).4 Importantly, the (one-off) training cost for E+C is minimal; the same $0.27/1M queries cost applies, and we have fewer than 10k training examples.

I took no steps to improve the logistic regression model for E+C; this is scikit-learn’s basic LogisticRegression model with default parameters. In other words, results for E+C might have been even better if I had bothered to do some tuning. Similarly, I did not tune the prompt for DM, but we’ll do this in the next section.

You’re cheating

In the previous experiments, E+C had access to more data than DMs; namely, its training data. This may have given an unfair advantage to E+C against DM, which had no training data.

To level the playing field, we now augment the DM with training data. We use two strategies:

  • Few-shots. We provide the examples as part of the DM’s prompt. This is the simplest approach, although it comes with high costs, because it increases the number of input tokens you send to the LLM. We report examples per label; e.g., “16-shot” means that we provide 16 examples per label.
  • Prompt-tuning. We ask an LLM, who has access to our training data, to improve the prompt for the DM. This is a one-off procedure.

Note: A better way of doing prompt-tuning is to “hill-climb” the prompt multiple times: the LLM is repeatedly asked to improve upon the prompt, and the prompt is tested against an evaluation set. This works surprisingly well. I didn’t try this for this blog post due to its costs, but it could improve upon prompt-tuning’s performance.

Both few-shots learning and prompt-tuning improve the accuracy of OpenAI’s DM, albeit with a caveat: the costs increase too. Each DM few-shots query has to include all the desired training examples, which means higher input tokens. Prompt-tuning manages to keep costs lower (with a small performance hit), but not in the E+C’s ballpark ($0.27/1M queries).

I only run the above with OpenAI’s DM, so as to compare it with the respective OpenAI embedder. However, cost-wise, the same broad costs would apply to Jev. The reason is that, even if their input token costs4 are at most one order of magnitude apart, the number of tokens required to operate DMs are many more:

Tokens per query E+C DM (Jev example)
Zero-shot ~13 (just the customer message) ~1,770 (prompt + question + all 77 choices)
32 examples per label ~13 ~39,900
All examples ~13 ~157,000

The difference may be less pronounced where the number of labels is smaller, but the costs will still be higher. The above assumes no prompt caching. As of November 2026, TypeSafe does not offer discounts for caching, and OpenAI only caches part of the prefix input (not the question or its options); this would reduce the bill, but not enough to be competitive with E+C cost-wise.

Overall, when training data is available, E+C can be so much more convenient. After a negligible one-off training cost (left out in this plot), we have an extremely well-performing and economical classifier. Of course, the above experiments are based on just a single dataset, so YMMV depending on the application.

I did not test E+C on the most important task of all, which is to play Doom of course. That would be a fun experiment, whose outcome I’d be curious to see.

Ok, why does this work so well?

From an architectural perspective, DMs and E+C are not too far apart. To make this argument, we will make some informal assumptions, since there’s lack of public information on how DMs and modern LLM embedders are built.

Typically, DMs and LLM-based embedders are based on a (decoder-only) transformer architecture. This means the input tokens are converted into token embeddings, which then go through layers of self-attention and feed-forward neural networks (FFNN).

Then, a way to implement them is as follows:

  • Embedders stop after producing the final hidden states (corresponding to the input sentence’s [EOS]); these states are then used as vector embeddings, optionally after some post-processing. Importantly, and differently from DMs, LLM embedders’ transformers are fine-tuned to ensure that the cosine similarity between the output embedding vectors is high for “similar” input sequences.
  • DMs apply the final prediction layer (softmax) to the hidden states, as one would normally do for generation. But how can DMs enable one to dynamically select a set of options for a given question? Generally, they pre-allocate a set of output tokens as placeholders for the choices, and they read out the softmax probabilities that the transformer assigns to them.

So we can think of DMs as running a classification layer to the hidden states. Well, in E+C we take the LLM embeddings (~hidden states with some modifications) and apply a classification layer (logistic regression, which is essentially a softmax procedure).

Decision Model vs. Embed + Classify: architecture Figure: One possible implementation for DMs (left) and E+C (right). DMs and embedders vary across providers, so this figure gives an intuition rather than an actual implementation design.

So, with a bit of imagination, DM and the E+C pipeline are architecturally similar. Very informally:

  • a DM is a decoder with a classifier head (softmax, that assigns “probabilities” to each of the answer choices);
  • E+C also uses a decoder (embedder) whose output (hidden states) we plug into a classifier head (the logistic regressor, which is a softmax classifier).

It is therefore unsurprising that they can solve similar problems – albeit with very different cost-performance results.

TL;DR

If you have some training data and a clear set of questions, give E+C a go. It’s (much) cheaper than DM, it can perform better, and arguably it gives you a better control over the task. DMs are more flexible – they allow you to pick your question and options at runtime, but the cost you have to pay for this flexibility can be massive.

References

  1. https://strandsagents.com/blog/amazon-saves-millions-replacing-sonnet-with-strands-decider/. ↩

  2. it would be inappropriate to call these “calibrated probabilities”; they’re probability estimates at best. ↩

  3. e.g., it was discussed as linear probing in “Text and Code Embeddings by Contrastive Pre-Training” by Neelakantan, Xu, et al. A recent blog post reiterated the idea, e.g. https://www.drborchers.com/en/blog/do-you-need-a-decision-model/. ↩ ↩2

  4. Jev 1.14, OpenAI Decisions, text-embedding-3-small

    I used OpenRouter. Pricing is as follows (as of November 2026).

    Model Used for Price per 1M input tokens
    Jev 1.14 (typesafe/jev-1.14) DM $0.042 (output free)
    OpenAI Decisions (openai/gpt-6-luna-decisions) DM $0.10 (output free)
    openai/text-embedding-3-small E+C: embedder $0.02

    ↩ ↩2