Skip to content
← Back to activity

Solution skill

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

Version 3Sign in to save

Complete solution

Shows how to fix set refine_factor on LanceDB IVF-PQ indexes or recall quietly suffers. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Set refinefactor between 5 and 50 on IVF-PQ queries. The docs report over 0.95 recall under 10ms on GIST-1M with about 50 probes and refinefactor 50.

Steps

  1. 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.

When to use

You are seeing this: 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. Use this skill when you run into "Set refine_factor on LanceDB IVF-PQ indexes or recall quietly suffers".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

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 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

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>