Index of every page on this site: llms.txt
All skills
github avatar

/scaling-query-volume

@f10fdb8 official
by githubgithub/awesome-copilot42k stars
5,426
Run it yourself

Guides Qdrant query volume scaling. Use when someone asks 'query returns too many results', 'scroll performance', 'large limit values', 'paginating search results', 'fetching many vectors', or 'high cardinality results'.

  • 1 file
  • 1.4 KB
  • Updated 7 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/github/awesome-copilot/scaling-query-volume

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈61 tokens for metadata: the name and description. ≈282 when used: this file.

Description uses 3.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈250 characters, or 3.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Scaling for Query Volume

Problem: When a query has a large limit (e.g. 1000) and there are multiple shards (e.g. 10), naively each shard must return the full 1000 results — totaling 10,000 scored points transferred and merged. This is wasteful since data is randomly distributed across auto-shards.

Core idea

Instead of asking every shard for the full limit, ask each shard for a smaller limit computed via Poisson distribution statistics, then merge. This is safe because auto-sharding guarantees random, independent data distribution.

When it activates

  • More than 1 shard
  • Auto-sharding is in use (all queried shards share the same shard key)
  • The request's limit + offset >= SHARD_QUERY_SUBSAMPLING_LIMIT (128)
  • The query is not exact

Key tradeoff

The strategy trades a small probability of slightly incomplete results for a large reduction in inter-shard data transfer, especially for high-limit queries across many shards. The 1.2x safety factor and the 99.9% Poisson threshold keep the error rate very low — comparable to inaccuracies already introduced by approximate vector indices like HNSW.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 7 months ago
  • Performance
  • qdrant
  • vector-search
  • scaling
  • query-optimization
  • pagination
  • sharding
  • approximate-search

README badge

README badge for github/awesome-copilot/scaling-query-volume

Reduces inter-shard data transfer for large-limit vector queries in Qdrant by computing per-shard limits via Poisson distribution instead of requesting the full limit from every shard. Applies automatically when using auto-sharding with limit+offset >= 128 and accepts a small probability of incomplete results to gain efficiency.

Generated from the current SKILL.md.

What problem does this skill solve?
When querying Qdrant with large limits across multiple shards, each shard naively returns the full result set, causing massive data transfer overhead. This skill reduces that by computing per-shard limits using Poisson distribution statistics instead.
When does the optimization activate?
The skill activates when you have more than one shard using auto-sharding, the request limit + offset is at least 128, and the query is not exact (approximate searches only).
Does this guarantee complete results?
No. The skill trades a small probability of incomplete results for significant reduction in inter-shard data transfer. The 1.2x safety factor and 99.9% Poisson threshold keep error rates low and comparable to HNSW index inaccuracies.
Does this work with exact searches?
No. The skill only applies to approximate queries. Exact searches bypass this optimization.

Generated from the current SKILL.md. These answers refresh after source changes.