What Is CLIP?
What CLIP is, how it learns pictures and captions together, how it labels new photos, and where it falls short, explained for your AI interview.
In short
CLIP is an OpenAI model that learns to match pictures with the text written about them. It can label a new picture by comparing it with written labels, with no extra training for each task.
11 min readIntermediateCommon · estimateFacts checked 27 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
CLIP is a model from OpenAI that learns pictures and words together. It is trained to match each photo with the caption that came with it, across a huge set of web pairs. To label a new photo, I write the labels as sentences and pick the closest one, with no retraining. It is strong on common things. It struggles with counting, and wording changes can move its answers, so I test it on our own photos first.
CLIP stands for Contrastive Language-Image Pre-training. OpenAI released it in January 2021. It learns what things look like from the text written about them, so it is not limited to one fixed list of labels. Older image models could only name the labels they were trained on, and that was the real change.
Training is a matching game. The model sees a photo and a set of captions, and it has to find the caption that came with that photo. OpenAI describes it as predicting which of 32,768 sampled text snippets was paired with the image. The pairs were collected from the internet, 400 million of them, so no one wrote labels for them.
After training, the model can be used with new labels and no new training. I write each possible answer as a sentence, compare the photo with each sentence, and take the closest one. That is zero-shot use. The catch is that CLIP is weaker at counting and fine detail, and its answers can move when the wording changes. So I test it on our own photos first, and I send unsure cases to a person. Each label is a short sentence, and I try several wordings of it before I trust the result.
What is CLIP, in plain words?
CLIP is a neural network, a model built from layers of numbers, that learns to connect pictures with words. OpenAI published it in January 2021, and the paper was submitted to arXiv that February.
Older image models learned from a fixed list of labels. A model trained on the 1000 ImageNet categories can name those 1000 things, and little else. CLIP learns from captions instead, so the things it can name are not fixed in advance.
Picture a claims clerk who has read years of car damage files, each photo with the adjuster's note beside it. Shown a new photo and a few possible notes, the clerk can point to the one that fits best, even for damage they never sorted before. CLIP learned from 400 million image and caption pairs, far more than any clerk could read. A claims team could use it to sort new photos without first building a labelled set.
Key words
- Encoder
- The part of a model that turns a photo or a sentence into a list of numbers.
- Zero-shot
- Doing a task the model was never trained on, with no new examples and no retraining.
- Caption
- The words written beside a picture, like a note on a claim photo.
How does CLIP learn to match pictures and words?
Training is a matching game. The model sees a photo and a set of captions, and it has to find the caption that came with that photo. OpenAI puts it this way: given an image, the model predicts which of 32,768 sampled text snippets was actually paired with it. Every wrong snippet teaches it what does not belong.
“given an image, predict which out of a set of 32,768 randomly sampled text snippets, was actually paired with it in our dataset.”
OpenAI
“the simple pre-training task of predicting which caption goes with which image is an efficient and scalable way to learn SOTA image representations from scratch”
CLIP paper, arXiv abstract
How CLIP learns from pairs
Pairs from the web
A photo
One image found online
Its caption
Text already written beside it
Two encoders
Image encoder
Turns the photo into numbers
Text encoder
Turns the caption into numbers
Score every pair
Each photo against each caption
Matches pulled together
Right pairs sit close together
Mismatches pushed apart
Wrong pairs sit far apart
- 1A photo goes into the image encoder.
- 2Its caption goes into the text encoder.
- 3The photo's numbers go to the scoring step.
- 4The caption's numbers go to the same step.
- 5Matching pairs get pulled closer together.
- 6Pairs that do not match get pushed apart.
The web already holds those pairs, so no one wrote labels for them. OpenAI also says the data is unfiltered and highly noisy, so the model learns from messy pairs. OpenAI first explored an image-to-text approach. It reports that, in small to medium experiments, the contrastive objective (the matching game) was 4x to 10x more efficient than the image-to-text approach at zero-shot ImageNet classification.
- 1
Encode both sides
Each photo and each caption becomes a list of numbers, so both can be compared in one shared space.
- 2
Score every pair
Compare each photo's numbers with each caption's numbers. The matching pairs should score highest.
- 3
Adjust the encoders
Nudge both encoders so right pairs move closer and wrong pairs move apart. Repeat over the whole dataset.
How do you use CLIP to label a new picture?
This is the part that matters at work. You don't train CLIP again for each new task. OpenAI says it can be applied to any visual classification benchmark by simply providing the names of the visual categories. You write the possible answers as sentences, encode them, encode the photo, and pick the closest sentence.
The paper reports that this approach matched the ImageNet accuracy of the original ResNet-50 without using any of its 1.28 million training examples.
How CLIP picks a label
Your input
New claim photo
Arrives with no label
Labels as sentences
One sentence per possible answer
Already trained
Image encoder
No new training for this task
Text encoder
Reads each label sentence
Compare the scores
Photo against every label
Best-fit label
Check it before it is used
- 1The new photo goes into the image encoder.
- 2Each label sentence goes into the text encoder.
- 3The photo's numbers go to the comparison step.
- 4Each label's numbers go to the same step.
- 5The label with the highest score moves on.
Here is the comparison with made-up numbers. The labels are sentences, the photo is compared with each one, and the closest match wins.
import math
# Made-up 3-number vectors standing in for CLIP's much longer lists of numbers.
photo = [0.9, 0.2, 0.1] # a new claim photo, after the image encoder
labels = {
"a photo of a dented rear bumper": [0.8, 0.3, 0.1],
"a photo of a cracked windscreen": [0.2, 0.9, 0.2],
"a photo of a flooded footwell": [0.1, 0.2, 0.9],
}
def cosine(a, b):
dot = sum(x * y for x, y in zip(a, b))
size = math.sqrt(sum(x * x for x in a)) * math.sqrt(sum(y * y for y in b))
return dot / size
scores = {text: cosine(photo, vec) for text, vec in labels.items()}
for text, score in sorted(scores.items(), key=lambda kv: -kv[1]):
print(f"{score:.3f} {text}")
best = max(scores, key=scores.get)
print("Closest label:", best)Output
0.990 a photo of a dented rear bumper 0.434 a photo of a cracked windscreen 0.256 a photo of a flooded footwell Closest label: a photo of a dented rear bumper
The answer is always the closest of the labels you gave. If none of them fit, CLIP still picks one, so set a minimum score or a minimum gap between the top two labels, tune it on checked photos from your own work, and send anything below it to a person.
Where does CLIP fall short?
CLIP is strong on common objects and weak on some tasks. OpenAI lists its own limits, and these are the ones to know. One OpenAI test, on handwritten digits (MNIST), had zero-shot CLIP at 88%, against 99.75% for humans.
“CLIP's zero-shot classifiers can be sensitive to wording or phrasing”
OpenAI
“when evaluated on handwritten digits from the MNIST dataset, zero-shot CLIP only achieves 88% accuracy, well below the 99.75% of humans on the dataset”
OpenAI, handwritten digits
Counting and distance
OpenAI says CLIP struggles to count objects and to judge how near the nearest car is. On those two tests it is only slightly better than random guessing.
Fine detail
It trails models built for one task on car models, aircraft variants and flower species.
Images unlike its training data
OpenAI says CLIP still generalises poorly to images not covered by its pre-training data.
Wording
Its answers can change with how a label is phrased, so the label list needs testing.
Label design and bias
How the classes are designed can shift both performance and bias, as OpenAI warns.
In claims or inspection work, a count or a model number can be the whole answer, so those are the first tests to run.
Tip
Asked about limits, name counting, fine detail and wording, and say you test on your own data before trusting the result.
How would you use CLIP to sort claims photos?
A claims team wants to sort new car damage photos into five damage types, and it adds a new type every quarter.
- Plan A
Labels as sentences, tested
Write each damage type as a sentence, test on past photos the team has already checked, and send unsure cases to an adjuster.
- Plan B
Trust the top label
Send the top label straight to payment. Counting and fine detail will slip through, and a wording change can flip the answer.
What does the interviewer want to hear?
A strong answer covers
- A plain definition: a model that learns pictures and words together from captions.
- How it learns: match each photo to its caption, pull right pairs together, push wrong pairs apart.
- Zero-shot use: label with sentences you write, with no retraining for each task.
- Its limits: counting, fine detail, wording changes and bias from label design.
- How you would test it on your own photos before anyone relies on it.
- Its age: a 2021 model, so check newer options before you choose.
Common traps
Trap"CLIP writes captions for pictures."
BetterNo. It scores how well a caption fits a picture. Writing text is a different kind of model.
Trap"You need labelled data for every new class."
BetterNot for zero-shot use. You write the labels as sentences, though you still need some checked photos to test with.
Trap"The top score is the true label."
BetterIt is the closest of the labels you gave. Set a minimum score and send weak matches to a person.
Can you spot the problem?
Spot the problem
A claims team sends CLIP these label sets. Which one asks it for something it is weak at?
Quick check
The team's results change when they add 'a photo of' in front of each label. What should they do?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
Learn it in depth
Last updated on 27 November 2026
Building search or sorting over photos or scans?
I design and build AI products and agents, the screens and the system behind them. Book a short call and tell me what your photos are for and how costly a wrong answer would be.