Meta's ad system is now a stack of AI models with names like Andromeda, Lattice and GEM. You don't need to be an engineer to understand them, and knowing what each does explains why some ad strategies work better than others. Here's the plain-English version.
When people talk about "the Facebook algorithm" for ads, they're really talking about a pipeline of models working together in milliseconds. Over 2023 to 2025 Meta rebuilt large parts of it, and three names come up again and again: Andromeda, Lattice and GEM. This guide explains each in plain words, what Meta has said about them, and what it means for how you run ads.
The ad delivery pipeline in four steps

- Eligibility. Out of all live ads, those whose targeting, budget and rules allow them to be shown to this person right now. This can be tens of millions.
- Retrieval (Andromeda). A fast model narrows that pool to a few thousand candidates likely to be relevant.
- Ranking (Lattice-style models, informed by GEM). Larger models predict how likely the person is to click, buy or enquire for each candidate, and how good the experience will be.
- Auction. Your bid, the predicted result and ad quality combine into a total value. The highest value wins the slot.
Andromeda: the retrieval engine
Meta described Andromeda in a December 2024 engineering post as its next-generation personalized ads retrieval engine. Its job is to search a huge pool of ads quickly and return the ones worth ranking. Key points from Meta:
- It runs on NVIDIA Grace Hopper hardware and was co-designed with Meta's own MTIA chips in mind.
- It enabled a 10,000x increase in the complexity of the models used for retrieval.
- It organises ads in a hierarchical index trained together with the model, so it can focus on the most relevant groups of ads.
- After deployment, Meta reported a 6% improvement in retrieval recall and an 8% improvement in ads quality on selected segments.
- It was built because Advantage+ and generative AI tools were sharply increasing the number of ads to choose from.
The practical lesson: because retrieval now understands each ad in much more depth, varied creative gives it more ways to match you with different people. See creative diversification.
Lattice: consolidating the ranking models
Meta introduced Lattice in May 2023 as a new model architecture for its ads system. Before, Meta ran many separate ranking models for different goals (clicks, purchases, leads) and different surfaces (Feed, Stories, Reels). Lattice consolidates them into fewer, larger models that learn across objectives and placements, so knowledge from one area helps another.
In December 2025 Meta researchers published a paper describing how Lattice handles many data types and predicts many objectives within one unified model. Meta executives have described the multi-year effort as consolidating many ranking models into far fewer.
What it means for you: the system now learns from your results across placements and objectives at once. Splitting campaigns by placement or narrow goal gives it less to learn from, which is another reason simple structures work well.
GEM: the teacher model
In November 2025 Meta's engineering team introduced GEM, the Generative Ads Recommendation Model. Meta calls it the largest foundation model for recommendation systems in the industry. It's trained on large amounts of ad and organic engagement data, and it doesn't serve ads directly. Instead it acts as a teacher, transferring what it learns to the many models that do.
- Meta reported that GEM's launch on Facebook and Instagram brought a 5% increase in ad conversions on Instagram and a 3% increase on Facebook Feed.
- Meta said GEM's architecture is four times more efficient at turning data and compute into ad performance gains than its original ranking models.
- Its knowledge transfer method is, Meta says, twice as effective as standard knowledge distillation.
What it means for you: the models deciding your delivery keep getting better at predicting who will act. They predict whatever you tell them to optimise for, so the quality of your conversion tracking matters more than ever.
How the pieces fit together
- GEM learns broad patterns from huge amounts of data and teaches the serving models.
- Andromeda uses deep models to find the right candidates fast.
- Ranking models, consolidated under Lattice, score those candidates for the result you asked for.
- Advantage+ tools sit on top, giving the system more freedom over audiences, placements, budgets and creative variations.
Quick quiz · 4 questions
Meta's AI ad stack: quick check
1. Which model builds the shortlist of candidate ads?
2. What does Lattice mainly do?
3. How does GEM improve ads?
4. Which advertiser habit helps all three systems most?
0 of 4 answered
What this means for your ad strategy
- Feed it accurate results. Pixel plus Conversions API, each event firing once, values included. See the ad tracking guide.
- Give it options. Several genuinely different creatives per ad set.
- Give it room. Broad targeting, consolidated ad sets, Advantage+ placements. See targeting after Andromeda.
- Give it time. Avoid daily edits that reset the learning phase.
- Optimise for what matters. Purchases or qualified leads, not clicks or engagement. See campaign objective.
An analogy: the library and the librarian
Imagine a library with tens of millions of books and a reader who wants something to read in the next second. Andromeda is the fast assistant who pulls a few thousand likely books from the shelves using everything known about the reader and every book. The ranking models are the expert librarian who reads the shortlist closely and recommends the best few. GEM is the senior mentor who has studied millions of readers and trains both of them. The auction decides which recommendation actually goes on the table, taking into account how much each publisher will pay.
In this picture, your ad is a book. A clear, distinctive cover and description (diverse, specific creative) helps the assistant pull it for the right readers. Accurate feedback on what readers enjoyed (conversion data) helps the mentor and librarian learn.
How the auction value is worked out
Meta explains that its auction picks the ad with the highest total value, which combines three things:
- Your bid: what you're willing to pay, set by you or by Meta's automatic bidding.
- Estimated action rate: how likely this person is to take the action you want. This is where the ranking models, taught by GEM, do their work.
- Ad quality: feedback from people seeing or hiding the ad, and assessments of low-quality features such as clickbait or withheld information.
That's why a cheaper bid can beat a bigger one: a more relevant, better-quality ad scores higher on the other two parts.
What data the models learn from
- Your conversion events: purchases, leads, registrations and their values.
- How people engage with ads and organic content across Facebook and Instagram.
- The content of each ad: images, video, text.
- Context: placement, device, time.
You control the first and third directly. That's where your effort pays off most. See the ad tracking guide and creative diversification.
Why this keeps getting more automated
Each of these systems scales with more data and more compute. Meta's GEM post describes a training stack with a 23x increase in effective training compute, and its Andromeda post anticipates further gains on future hardware. As the models improve, the gap between what they can do and what manual targeting can do keeps widening. Expect Meta to keep pushing advertisers towards automated campaigns, and expect creative and data quality to remain the advertiser's main levers.
What to do differently this month
- Audit your conversion events and fix any duplicates or missing values.
- Add at least three new concepts that differ in angle, person and format.
- Merge overlapping ad sets into one broad ad set per goal.
- Stop daily edits; plan changes weekly.
- Judge results on business outcomes over weeks.
Next in the series: Advantage+ in the Andromeda era. Back to the main Andromeda guide.
Frequently asked questions
No. GEM works behind the scenes, improving the models that deliver every ad. There's nothing to switch on.
No. Despite the word "generative" in its name, Meta describes GEM as a recommendation model. Meta's AI creative tools inside Advantage+ are separate.
They favour advertisers with clean data and good creative. Small businesses can do well by consolidating budgets and making varied ads, rather than spreading thin.
Meta's Engineering blog published posts on Andromeda (December 2024) and GEM (November 2025), and Meta AI described Lattice in May 2023. Meta for Business has posts on creative diversification from 2025.
