Skip to main content

Tool Ranking Algorithm

After semantic search returns candidates, the ranking algorithm determines the final order.

The Formula

final_score = (
  similarity * 0.40 +
  popularity * 0.25 +
  user_history * 0.20 +
  performance * 0.15
)
See Dynamic Retrieval for complete details and worked examples.

Quick Reference

FactorWeightPurpose
Semantic Similarity40%How well does the tool match your query?
Popularity25%How often is the tool used?
User History20%Have YOU used this tool successfully?
Performance15%Is the tool fast and reliable?

Example

Query: “Deploy to AWS” Tool Scores:
  • deploy-aws-ecs: 0.92 (high across all factors)
  • deploy-aws-lambda: 0.88 (good but less popular)
  • deploy-terraform: 0.76 (less semantic match)

Next Steps

Full Dynamic Retrieval Guide

Deep dive with examples.

API Reference

Technical details.

For detailed examples and the complete algorithm, see Dynamic Tool Retrieval. 🚀