The original release held 60 records: 30 reaction candidates and 30 caption templates. The picker deliberately used the 30 reactions as a small all-candidate control so every model choice could be inspected.
HOW IT WORKS
How Meme Lab finds the right reaction.
Meme Lab started as a controlled question: can a system understand a complete social situation well enough to choose the meme a person would actually send? This is the full journey—from the first dataset and failed approaches to the current retrieval, perspective, evaluation, and speed work.
Try the current versionTHE JOURNEY
Each scale jump solved a different problem.
The catalogue did not jump straight to 3,000. Each stage stayed live, exposed a limitation, and supplied the evidence for the next stage.
Two hundred and forty reviewed external records expanded the vocabulary. Vector retrieval replaced direct comparison, the collection became searchable, and the first public feedback loop went live.
Seven hundred long-tail records forced dual-view retrieval, a fresh 60-case shadow set, a serious-content gate, and the first classifier bake-off. This is where Jev beat embedding-only ranking.
The first attempt hit the number by treating 1,189 public-domain artworks as reactions. The audit rejected that shortcut and replaced every artwork with a usage-backed reaction GIF.
Complete sentence examples revealed that one situation can support the narrator’s reaction, the other person’s side, and the event itself. The UI now returns one primary choice and four visible backups across those angles.
Jev’s old competitive score looked like a probability but was not one. A blind hard-case evaluation selected independent ordinal ratings, so the product now says weak, plausible, strong, or exact.
WHAT REAL USE CHANGED
The product became simpler while the ranking became deeper.
The interface is intentionally one action: paste a complete comment and get a meme. The technical complexity stays behind that action.
Full sentences, not keywords
Examples describe the whole situation so actor roles, quoted speech, negation, relationship, and emotional tone survive retrieval.
One best choice plus four backups
The best result remains visually dominant. Four lower-ranked options stay visible because humour is subjective and several reactions can be valid.
My reaction, their side, the situation
Multi-person comments deliberately search all three angles instead of assuming every meme must speak only for the person who typed the comment.
Weak is shown honestly
A weak but usable option is labelled weak. The system abstains only when humour would be insensitive or every candidate would misrepresent the situation.
No generated explanation step
The user asked for a meme, not a paragraph. Removing live reasoning reduced latency and stopped plausible-sounding prose from disguising a mediocre match.
A small yes or no loop
One-tap feedback is retained for 30 days for evaluation. It does not silently retrain or overwrite the catalogue.
THE LIVE 3,000
Retrieve. Compare. Return.
Every reference has a name, meaning, relational pattern, full-sentence example, near-miss, tags, provenance, media state, meme-strength score, and image-quality score. Runtime work stays bounded even as the catalogue grows.
- 01Validate and guard
Trim and bound the comment, treat it as untrusted text, and catch clear factual or serious help requests before joking.
- 02Retrieve 30
Embed the full comment, search meaning and usage-example vectors separately, then fuse both ranked lists.
- 03Compare by fit
Jev independently rates all 30 candidates. Multi-person comments also preserve explicit narrator, other-person, and situation lenses.
- 04Return five
Show one primary result and four backups labelled weak, plausible, strong, or exact. Persist only the bounded evaluation record.
THE RETRIEVAL SYSTEM
3,000 records never enter one prompt.
Vector search exists to find the plausible neighbourhood; the classifier decides which candidate is socially sendable. Meme strength and image quality remain separate so popularity never masquerades as contextual relevance.
One comment embedding
The same complete sentence queries two separately indexed views so abstract meaning and concrete usage can retrieve different useful candidates.
6,000 stored vectors
Three thousand references each contribute one meaning vector and one example vector. Reciprocal-rank fusion produces a unique shortlist of 30.
Known-good coverage survives
Twenty shortlist slots search the full catalogue; ten reserve candidates from the original 1,000 so noisy expansion records cannot erase the stronger base.
Social fit beats keyword overlap
One structured TypeSafe request independently scores all 30 candidates. Full metadata lets Jev judge actors, target, tone, viewpoint, example, and near-miss instead of choosing the most familiar shared word.
Three lenses in one batch
One request selects distinct candidates for my reaction, their side, and the situation. A second request rates the selected five on the same ordinal scale before the UI orders them.
No expensive fallback
If Jev is rate-limited, the product shows five semantic-retrieval matches as low-confidence weak fits. It never turns a traffic spike into unplanned 70B inference spend.
HOW 3,000 WAS BUILT
The first 3,000 was wrong. The rebuild fixed the count.
A reusable image is not automatically a meme. The corrected catalogue keeps 1,805 named meme templates, removes empty editing canvases, and includes 1,195 reaction GIFs backed by observed conversational use.
- 01Require usage evidence
The GIF Reply research dataset contains 1.56 million real text-to-GIF reply pairs. Popularity comes from observed reactions, not visual guesswork.
- 02Keep stable provenance
Every GIF keeps its research hash, GIPHY ID, source page, direct media URL, preview URL, and observed-use count.
- 03Block unsafe and duplicate media
Source IDs, media URLs, normalized names, content tags, and duplicate checks prevent repeated or unsuitable records from padding the count.
- 04Track canonical gaps
A checked-in must-have list makes missing cultural staples visible. “My Name Is Jeff” is now a real GIF record, not an invisible omission.
- 05Keep strength separate from fit
Observed popularity influences meme strength. It never decides whether the reaction fits the sentence submitted right now.
- 06Write specific metadata locally
Local Qwen writes full meaning, social-dynamic, example, near-miss, and tag sentences. They remain assistant-authored pending owner feedback.
THE MODEL BAKE-OFF
We tried fast models, local models, and smarter models.
No single model does everything. Embeddings discover candidates; Jev judges sendability; deterministic rules protect obvious serious cases; local models handled catalogue construction.
| Approach | Observed result | Speed | Decision |
|---|---|---|---|
| Jev fast + full metadata | 19/20 top-one in the enriched shortlist trial; strongest direct fit signal. | ~1.27s p95 on retrieved top 30 | LIVE |
| Rich ordinal Jev | 9/12 exact first and 10/12 best-returned-first on the corrected hard set. | 1.60s p95 classifier stage | QUALITY WINNER |
| Compact ordinal Jev | Same 9/12 exact first, but the best returned candidate ranked first on 9/12 instead of 10/12. | 1.20s p95 | SPEED FALLBACK |
| Llama 3.3 70B | 80% top-three on 20 expansion cases; useful structure but unnecessary prose, slower responses, and unacceptable spike cost. | 3.85s p95 | REMOVED |
| BGE reranker | 20% top-one and 45% top-three. It recognized topic similarity better than social sendability. | 1.83s p95 | NOT FINAL JUDGE |
| GLiNER 2.5 | 8/12 on meme-versus-none routing. Useful at extracting grief, emergency, authority, and tone features. | 52ms mean | FEATURE CANDIDATE |
| Laya | 8/12 overall but 0/4 on meme cases. It routed too aggressively away from humour. | ~60ms median | RESEARCH ONLY |
| Qwen 3 4B local | 66.7% routing accuracy and only 50% humour recall. Too conservative without tuning. | 2.45s p95 | NOT PROMOTED |
| Qwen 2.5 3B local | 53.3% routing accuracy and 30% humour recall. Faster, but the quality loss was material. | 1.53s p95 | NOT PROMOTED |
| Jev smart | No quality win over the fast ordinal approach. | 10.2–14.0s | TOO SLOW |
Pairwise tournaments, calibration anchors, specificity-heavy prompts, a second-stage rerank of the first five, names-only metadata, and single-view retrieval.
Gemini structured output was not called because the repository has no bounded experiment credential. No result is claimed for it.
More reasoning was not automatically better. Rich, specific candidate data plus an independently judged ordinal task was the strongest quality/cost combination.
THE EVALUATION LADDER
One hundred broad cases plus twelve hard ranking cases.
The 100-case suite measures retrieval, ranking, and serious-content behavior across 75 humour and 25 no-meme situations. A separate 12-case hard set isolates the fit-score problem across 101 unique comment-and-candidate pairs.
- RetrievalDid an acceptable reference enter the top 30?
- Top one / top threeDid ranking put a sendable choice near the front?
- AbstentionDid serious requests avoid an inappropriate joke?
- CalibrationDo weak, plausible, strong, and exact mean something consistent?
Pre-ordinal 100-case snapshot: retrieval reached 72% at 30, 67% top-one relevance, 71% top-three relevance, and 96% correct serious-content abstention. All labels remain pending owner review.
THE LATEST QUALITY DECISION
Independent labels beat competitive probability.
The original Jev number was a probability inside a 30-way competition, not “the chance this meme is good.” We corrected a contradictory refrigerator fixture, rebuilt every arm, formed a 101-pair union, and had a fresh model rate the pairs blind to arm identity and scorer output.
Exact first choice
7 / 12Best returned candidate ranked first
NDCG@5 0.895 · 1.27s p95Exact first choice
10 / 12Best returned candidate ranked first
NDCG@5 0.950 · 1.60s p95Evidence boundary: the blind rater was independent of the scoring outputs, but it was still a model—not human ground truth. These results justify the current engineering choice; owner feedback is still required before calling the labels calibrated.
SPEED RIGHT NOW
Normal comments are near one to two seconds. Perspectives cost more.
Quality came first. These timings are observed remote-development requests from 21 September 2026, not a production SLA or a large benchmark.
“The tests finally passed after I changed nothing.”
“I looked for my phone while using its flashlight.”
“My sibling ate the leftovers, then asked why I was upset.”
Multi-person mode needs one batched perspective selection and one final ordinal rescore. Remote embedding, Vectorize, Jev networking, and D1 persistence add the remaining fixed costs.
First lock owner-reviewed quality. Then measure production p50/p95, trim metadata only when the same cases still pass, and avoid trading the recovered viewpoints away for a synthetic speed win.
STORAGE, MEDIA, AND COST
The catalogue is stored. The media stays with its source.
The build pipeline is mostly local, but the live runtime is not completely local or free: it uses Cloudflare Workers AI, Vectorize, D1, and the direct TypeSafe Jev API.
Versioned JSON and generated modules
Names, meanings, examples, near-misses, provenance, quality signals, and source URLs live with the project and generate the public collection.
6,000 vectors in Vectorize
Meaning and usage vectors are stored remotely so every request searches a bounded index instead of loading all 3,000 records.
Provider-hosted images and GIFs
Imgflip, Memegen, and GIPHY assets load from recorded source URLs. Results animate GIFs; collection cards use lighter previews.
Usage evidence is not a licence
Research-backed popularity proves that a GIF is used as a reaction. It does not establish redistribution rights, so every external asset remains a labelled source preview.
Bounded D1 records
The comment, returned candidate IDs, decision, labels, and yes/no feedback support evaluation and receive a 30-day expiry.
CLIP and Qwen built the collection
Uniqueness signals and long-form metadata were generated locally. The fastest local routing models tested so far were not accurate enough for the live decision.
WHAT WE STOPPED DOING
The discarded ideas matter too.
This history prevents the project from repeating attractive experiments that already failed the quality, speed, or honesty bar.
- Embeddings alone: good for neighbourhoods, weak at deciding whether a reaction is socially sendable.
- Generated reasoning on every result: slower and unnecessary; fluent prose could make a poor selection sound convincing.
- Raw Jev probability in the UI: useful for competition ordering, misleading as user-facing confidence.
- One perspective for every sentence: lost valid reactions from the other participant or the situation itself.
- Static meme strength as relevance: a famous or high-quality image can still be the wrong response.
- Jev smart and serial ensembles: 5–14 second paths were too slow without a matching quality gain.
- Current small local routers: cheap and private, but too eager to abstain from genuine humour.
- Claiming model labels as truth: every metric remains visibly marked pending owner review.
- Counting arbitrary artwork as memes: the audit removed 1,189 public-domain images that had no evidence of meme use.
THE EXPANSION PLAN
30 → 300 → 1,000 → 3,000 → 30,000
3,000 references are live. Quality work now closes retrieval and perspective gaps before movie dialogue becomes a separate routed corpus.
- 30Seed controlLIVE
Inspectable all-candidate comparison and the first structured local experiment.
- 300Common reactionsLIVE
Semantic retrieval, searchable collection, public feedback, and multi-option output.
- 1KBroader vocabularyLIVE
Dual-view retrieval, classifier ranking, serious-content safety, and a fresh shadow evaluation.
- 3KI love you 3,000LIVE
Uniqueness-gated acquisition, two vectors per record, five ordinal options, and explicit viewpoint coverage.
- 30KMemes plus movie dialogueNEXT CORPUS
Route the input to meme, dialogue, or none before corpus-specific retrieval. Keep evaluation and rights boundaries separate for each corpus.
THE RULE THAT SURVIVED EVERY STAGE
Bigger is useful only if the results stay honest.
Three thousand is live, not “finished.” The corrected set contains meme templates and usage-backed reaction GIFs only. Metadata and evaluation labels still need owner review, source previews do not imply media rights, and a weak match stays visibly weak.