The Embedding Test
View the repository GitHub stars

Benchmark report · SWRD v2

Searching the Literature by Meaning: Benchmarking Free and Commercial Word Embedding Models on Social Work Text

Brian E. Perron1, Miao Wang2*, Nanyi Deng3, Eunhye Ahn4

1 School of Social Work, University of Michigan, Ann Arbor, MI, United States

2 Department of Social Work and Social Policy, School of Sociology, Nankai University, Tianjin, China

3 Graduate School of Social Service, Fordham University, New York, NY, USA

4 School of Human Ecology, University of Wisconsin–Madison, Madison, WI, USA

* Corresponding author

Author note · ORCID

Brian E. Perron Miao Wang Nanyi Deng Eunhye Ahn
View the repository GitHub stars
01 The basics

What is an embedding?

An embedding is a list of numbers that stands in for a piece of text. A model reads a passage — a title, an abstract, a question — and returns a fixed-length vector: a single point in a high-dimensional space.

The useful part is where those points land. Two passages about the same idea sit close together, even when they share no words. Two unrelated passages sit far apart. Meaning becomes distance — and distance is something a computer can measure instantly.

A search for kinship care lands next to a paper that only ever wrote relative caregivers — because the two phrases mean the same thing, the model puts them in the same neighborhood.

a map of meaning
kinship care relative caregivers
opioid policy
school funding nearby = similar meaning · far = unrelated
02 Why it matters

Keyword search matches strings. Embeddings match meaning.

Keyword search finds kinship care only where those exact words appear. It misses every paper that wrote relative caregivers, grandparents raising grandchildren, or informal placement — different words for the same subject. An embedding search surfaces all of them from a single query, because it is comparing meaning rather than spelling.

Search by meaning

Retrieve everything on a topic across decades of writing, robust to changing vocabulary and jargon.

Cluster and map

Group documents by theme automatically, and see the shape of a literature without reading every entry.

Feed an AI assistant

Embeddings are how a language model finds the right passages to ground an answer — the retrieval half of retrieval-augmented generation.

Find duplicates and near-matches

Detect records that say the same thing in different words — deduplication that string matching cannot do.

03 The test

Does the expensive option actually win?

Choosing an embedding model is usually done by reputation: reach for the best-known commercial API and move on. We wanted evidence instead.

Fourteen candidate models were benchmarked on the real corpus — 64,956 social work research records — pitting twelve open-weight models you can download and run locally against two commercial embedding services, OpenAI's text-embedding-3 family.

The measure was retrieval quality: given a query, how well does each model surface the genuinely relevant records? The results were consistent — and not what reputation predicts.

14
models benchmarked
64,956
real research records
$0
cost of the model that won
04 What we found

Small and free held its own — and then some

Bar chart comparing free and paid OpenAI embedding models by search quality (nDCG@10). EmbeddingGemma plus reranker (free) leads at 0.846, followed by Qwen3-Embedding-8B (free) at 0.842, then OpenAI text-embedding-3-large (paid) at 0.807, EmbeddingGemma alone (free) at 0.793, OpenAI text-embedding-3-small (paid) at 0.769, and keyword search (BM25) last at 0.604.

Both free configurations shown here outscore both paid OpenAI tiers — and every embedding model tested, free or paid, clears the keyword-search baseline by a wide margin.

finding 01

Embeddings beat keywords, every time

Even the weakest embedding model retrieved more relevant work than keyword matching. For search by meaning, this is table stakes.

finding 02

Open matched or beat commercial

Open-weight models you can run on your own hardware equalled — and in cases exceeded — the paid commercial embedding APIs on this literature.

finding 03

A 300M model won on value

EmbeddingGemma — 300 million parameters, small enough to run on a laptop — offered the strongest quality-to-size ratio of everything tested.

Findings from the SWRD v2 retrieval benchmark. Results are specific to retrieval on research-abstract text; your corpus may differ — which is exactly why testing beats reputation.

Dumbbell chart showing each embedding model's search quality alone versus with its best reranker. Weak free models like MiniLM-L6 and MPNet-base gain the most (open circle to filled circle spans far apart). The strongest free model, Qwen3-Embedding-8B, barely moves. Both paid OpenAI models, marked (paid), also gain substantially from reranking.

A reranker rescues weak models — including OpenAI's own — but adds almost nothing once a model is already strong.

Bar chart showing Success at 1: how often each model found one specific target paper on the first try, given a paraphrased description. All free and paid models cluster tightly between 79% and 92%. Qwen3-Embedding-8B (free) leads at 92.1%, ahead of OpenAI text-embedding-3-large (paid) at 91.9%.

For relocating a specific known paper, nearly every model — free or paid — performs well; the free leader edges out the paid flagship here too.

05 Side by side

Local and open vs. a commercial API

Once retrieval quality is comparable, the decision comes down to everything else — cost, privacy, and control. That is where the two approaches diverge sharply.

Open & local
EmbeddingGemma · 300M · 768-dim
Commercial API
text-embedding-3-large · 3072-dim
Where it runs
On your own laptop or server
A remote server you call over the network
Cost to embed a corpus
Free, at any scale
Billed per token; grows with corpus size
Your text leaves your machine
No — nothing is transmitted
Yes — sent to the provider
Reproducible over time
Yes — the weights are fixed and archivable
Subject to change or deprecation by the vendor
Retrieval quality on this corpus
Matched or better
Strong — the baseline it was measured against

Model specifications are the providers' published figures. Quality claims reflect this corpus benchmark, not a universal ranking.

06 Why it changes the calculus

When quality is even, the free option wins on everything else

Free at any scale

Embed millions of documents for nothing. No per-token meter running.

Private by default

Sensitive text never leaves your control — nothing is sent to a third party.

Reproducible

The weights are fixed. Results won't shift when a vendor updates a model.

Runs on a laptop

A 300M model fits on ordinary hardware — no account, no GPU cluster.

07 The takeaway

Make the paid API earn its place

For most teams searching their own documents, a small open embedding model is the right default: it costs nothing, keeps your text private, and — on the evidence here — retrieves at least as well as the popular commercial service. Reach for a paid API when you have a concrete reason to, not out of habit.

And whatever you choose, test it on your own text. Reputation is a poor substitute for a benchmark on the data you actually have.

This report accompanies the SW-Embedding-Test repository, where the full test collection, evaluation code, and results are openly available.