Sakana AI's QD-Rec Builds Smarter Shortlists by Evolving Competing Hypotheses
Sakana AI's QD-Rec applies Quality-Diversity evolutionary search to LLM-powered recommendations, growing archives of varied, well-justified picks instead of ranked lists.
- Sakana AI released QD-Rec, a Quality-Diversity recommender that evolves item plus reason pairs instead of ranking.
- An LLM proposer mutates and crosses hypotheses from an archive; a judge scores them under local competition.
- A bandit picks candidates, balancing promising ones against unexplored ones, within a tight evaluation budget.
- Tested on M&A targets, customer targeting, and paper recommendation, beating fresh-generation baselines on quality and archive size.
- Low-scoring hypotheses act as stepping stones; ideas transfer across candidates to produce stronger proposals.
- Code is open-source on GitHub under Apache-2.0, runs via uv and OpenRouter.
QD-Rec from Sakana AI generates a portfolio of recommendations, pairing each item with a natural-language hypothesis that explains its potential value. The output gives reviewers distinct options and rationales to compare in high-stakes shortlisting tasks such as acquisition research, customer targeting, and literature review.
Sakana describes the approach as open-ended recommendation: searching the combined space of candidates and hypotheses under a limited evaluation budget. The GitHub repository uses the Apache-2.0 license, and the research paper is available on arXiv.
Scores hide the proposal
A single relevance score cannot capture the different reasons a candidate might be useful. In a mergers-and-acquisitions search, for example, the actionable output is a business scenario connecting an acquisition target to the buyer’s products, customers, or strategy.
The number of possible scenarios grows quickly because one candidate may support several credible hypotheses. Asking a large language model to enumerate those possibilities across thousands of candidates would require too many model calls. QD-Rec searches selectively, preserving strong ideas while continuing to explore new candidates and rationales.
An archive built by local duels
Quality-Diversity algorithms maintain a collection of high-performing solutions across different behavioral niches. QD-Rec applies that model to recommendations, using an LLM to mutate and combine hypotheses while an archive stores the resulting candidate-hypothesis pairs.
Each search cycle has three stages:
- Select a candidate. A multi-armed bandit balances candidates with promising past scores against candidates that have received little or no evaluation.
- Generate a hypothesis. A proposer LLM selects strong archived hypotheses as parents, adapts one to a new candidate, or combines two parents into a new rationale.
- Update the archive. A judge scores the generated hypothesis. A hypothesis that fills a new niche enters the archive; one that overlaps an existing niche competes with its nearest neighbor and replaces it only after receiving a higher score.
Local competition allows several recommendation strategies to coexist. Even a low-scoring hypothesis can remain useful when it contains an idea that later transfers to a better-suited candidate.
What survived 1,000 rounds
Sakana tested the same algorithm across three recommendation domains:
| Domain | Candidate pool | Task |
|---|---|---|
| M&A discovery | About 6,300 US companies as of August 2024, represented by short descriptions and seven financial fields | Find acquisition targets for entertainment and financial-services companies |
| Customer targeting | 10,000 synthetic California personas averaging about 685 words each | Identify potential customers for products including a 3D printer and an online learning service |
| Paper recommendation | About 17,500 accepted papers from recent leading AI conferences | Match papers to a researcher’s interests and criteria |
The Novelty baseline generated a fresh proposal during every iteration and selected no archived parents. The Novelty+Evo ablation evolved archived hypotheses while choosing candidates randomly, removing the bandit from the process. After 1,000 generation-and-evaluation rounds, QD-Rec produced larger archives with higher average quality in most tested settings.
A failed pitch finds a better host
In Sakana’s worked example, a vanilla LLM evaluated Liberty TripAdvisor Holdings as a potential acquisition for JPMorgan. It scored the proposal 1 out of 10 and recommended a partnership because Chase already offered a travel product. Elsewhere in the archive, another 1-out-of-10 proposal suggested that Southwest Airlines could embed financing, payments, and loyalty features into the travel-purchase flow.
QD-Rec’s mutation operator transferred that payments and loyalty concept from the airline proposal to the travel marketplace. The new pairing avoided the regulatory and operational problems identified in the Southwest scenario and scored 5 out of 10. The example shows how a weak archived proposal can supply useful material for a later generation.
Run it from the repository
The Apache-licensed repository is a Python project managed with uv. Model requests pass through OpenRouter, using OPENROUTER_API_KEY for the proposer, judge, and embeddings. The default configuration names openai/gpt-6-luna for generation and judging and text-embedding-3-small for embeddings.
A minimal customer-targeting run uses the included SkillForge profile:
uv sync
cp .env.example .env
uv run python -m apps.customers.download_personas
uv run python -m apps.customers.create_embeddings
uv run python -m apps.customers.seed --profile SkillForge
uv run python -m apps.customers.qd_rec --profile SkillForge --iterations 100Paper recommendation requires a Me entry in apps/papers/profiles.py describing the researcher’s questions and criteria for a useful paper. The corresponding paper workflow uses that profile name. Runs produce JSON archives that can be inspected in a browser with shared.view_archive.
Keep people in the scoring loop
- Candidate context is limited. The current proposer receives short text snippets for each candidate. Richer source data, retrieval pipelines, or a research agent could provide more evidence before generation.
- LLM judges have blind spots. Generated proposals may exploit weaknesses in an automated evaluator. Sakana recommends adding human scores for subjective decisions and domains where evaluation errors carry material consequences.
Analyst-led workflows can use QD-Rec as an idea-generation and shortlisting layer, with people validating the evidence, assumptions, and final recommendations.