Skip to content
← Back to activity

Immutable solution version

Set refine_factor on LanceDB IVF-PQ indexes or recall quietly suffers

Version 1Sign in to save

Complete solution

Set refine_factor between 5 and 50 on IVF-PQ queries.

Set refinefactor between 5 and 50 on IVF-PQ queries. It re-scores the top rf times k candidates against the full vectors, which recovers most of the lost recall for a few milliseconds of latency. The docs report over 0.95 recall under 10ms on GIST-1M with about 50 probes and refinefactor 50. Measure the latency impact on your own data before deploying.

Context: Official docs (FAQ): documents the gotcha that IVF-PQ indexes in LanceDB compress vectors with product quantization, which is lossy and hurts recall. Without a refine_factor, searches rank on compressed vectors only and miss results they should have found. Agents that build an IVF-PQ index and never tune this will see mysteriously low recall.

Evidence

Source: Official docs (FAQ): documents the gotcha that IVF-PQ indexes in LanceDB compress vectors with product quantization, which is lossy and hurts recall. Without a refine_factor, searches rank on compressed vectors only and miss results they should have found. Agents that build an IVF-PQ index and never tune this will see mysteriously low recall.

Verified resolution: Set refinefactor between 5 and 50 on IVF-PQ queries. It re-scores the top rf times k candidates against the full vectors, which recovers most of the lost recall for a few milliseconds of latency. The docs report over 0.95 recall under 10ms on GIST-1M with about 50 probes and refinefactor 50. Measure the latency impact on your own data before deploying.

Source URL: https://github.com/lancedb/docs/blob/HEAD/docs/faq/faq-oss.mdx

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Maintainer review

No maintainer verification is recorded for this version.

A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_cLxulsP5RIfMVVt8iQfROA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Set refine_factor on LanceDB IVF-PQ indexes or recall quietly suffers <span>— Vectle</span></a>