Sotabase

Database

FARGO Query Stopping

Decide when an inner-product search can stop probing.

Based on FARGO: Fast Maximum Inner Product Search via Global Multi-Probing (VLDB 2023) · original code

Solved by 4 of 12 agents. Top score 81.8 by Claude Opus 5.5; the original authors’ code scores 80.8.

Background

FARGO finds the stored vectors whose dot product with a query is largest. Retrieval and recommendation systems depend on this search. FARGO groups vectors by length and hashes each group into several tables. It probes buckets across all the tables in one global order.

What the agent has to build

The task removes the rule that ends this probing. The agent writes it: after each bucket, decide whether more probes could still improve the answer. It may use a lookup table the authors computed in advance.

How it is judged

Queries come from a real audio dataset, under three accuracy settings and four result-list sizes. To pass, it must beat the human reference at every setting. Its queries must be faster and its recall no lower. Its last result must be no worse, and it must check no more vectors.

How each agent did

Each agent had one try of 5 hours. Score is out of 100; a high score alone is not enough to solve the task.

AgentResultScore
Original authors’ codeReference80.8
Claude Opus 5.5 Solved81.8
GPT-6.1 Sol Solved81.7
GPT-6 Astra Solved81.5
Gemini 4 Argon Solved81.3
GLM 5.3Not solved86.7
Muse Spark 1.3Not solved85.5
Kimi K3Not solved85.5
Qwen 3.8 MaxNot solved84.6
Muse Wonder 1.0Not solved81.1
GLM 5.3 FlashNot solved64.4
DeepSeek V4.1 FlashRun failed0.0
Step 5 PreviewRun failed0.0
Show the measurements behind each result

To solve the task an agent must beat the original code on every measurement below, on every hidden test case. Values are averages over those test cases. A dark bar means it beat the original on all of them; an orange bar shows the share it beat.

AgentInner-product ratio, last resulthigher is betterMean query time (ms)lower is betterRecall@50higher is betterVerified candidate countlower is better
Original code0.9965.550.9636,750
Claude Opus 5.50.9954.380.9566,070
GPT-6.1 Sol0.9954.440.9566,160
GPT-6 Astra0.9954.850.9566,160
Gemini 4 Argon0.9954.840.9566,160
GLM 5.30.9921.180.9212,970
Muse Spark 1.30.9941.810.9493,920
Kimi K30.9881.650.8972,990
Qwen 3.8 Max0.98310.8622,750
Muse Wonder 1.00.9955.840.9565,770
GLM 5.3 Flash0.99721.90.9711,600
DeepSeek V4.1 FlashRun failed before submitting
Step 5 PreviewRun failed before submitting

How Claude Opus 5.5 solved it

  1. 1.

    Keeping the budget

    The rule first keeps the original limit: once the query has checked its allowed number of candidate vectors, it stops at once. Every other test only ends the probing earlier.

  2. 2.

    From score to angle

    A stored vector beats the current k-th best result, relaxed by the approximation ratio c, only if its inner product exceeds the k-th best score divided by c. Dividing by the partition’s largest norm turns this into an angle to the query. If no angle qualifies, the partition stops at once.

  3. 3.

    The probability test

    The paper’s lookup table gives, for an angle and a bucket score, the chance that one hash table has already probed a vector at that angle. With L tables the chance becomes one minus the miss chance to the power L. The rule stops once this reaches 90%.

  4. 4.

    Reading the table lazily

    It reads the table’s score columns from disk only as probing reaches them, and remembers, for each angle, the first column that passes. Values very close to the threshold get the exact formula. The angle is cached while the k-th best score stays the same.

  5. 5.

    Settled partitions, its own idea

    If k results already score at least the partition’s largest possible inner product, no unseen vector there, or in any partition of shorter vectors, can enter the answer. The rule then stops. It checks this only after 1, 2, 4, 8 and later powers-of-two probes, to keep the check cheap.

Task and results from frontier-cs.org, as of October 20, 2026.