ranking

Rank retrieved documents by similarity_score or distance with thresholds and top-k selection.

1|Updated Dec 21, 2025
One-click install
npx skills add https://github.com/edangx100/adaptive_rag_vercel --skill ranking
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ranking
Source: https://github.com/edangx100/adaptive_rag_vercel/tree/main/.claude/skills/ranking
Command: npx skills add https://github.com/edangx100/adaptive_rag_vercel --skill ranking

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the manual sorting of search results by automatically ranking documents based on similarity metrics.

Core Features & Use Cases

  • Relevance Ranking: Sort documents by similarity scores to prioritize the most relevant content.

Quick Start

Use the ranking skill to sort the 15 retrieved documents about gaming laptops by their relevance scores.

Frequently Asked Questions about ranking

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sort search results by relevance automatically?

Relevance sorting ranks retrieved documents by their similarity scores in descending order, prioritizing the most relevant content first. This eliminates manual review and saves time by surfacing top matches immediately.

What similarity metrics can I use to rank documents?

Ranking operates on precomputed similarity metrics from retrieval—specifically similarity_score and distance values. You can sort by similarity_score descending for relevance or distance ascending for proximity.

Can I filter ranked results by a similarity threshold?

Yes, ranking applies a similarity threshold to filter documents, then selects top-k results across collections. This ensures only sufficiently relevant documents pass to downstream grading or generation tasks.

Does ranking require new database queries?

No, ranking operates strictly on precomputed metrics without triggering new data-store queries. It processes metrics already attached to retrieved documents for deterministic, collection-aware output.

What happens after I rank documents by relevance?

Ranked results flow to downstream grading or generation tasks. The ordered list preserves relevance context for review prioritization or content synthesis workflows.