Prerequisites
1
Prepare Your Query and Codebase
Define your user request and collect the files from your codebase that need to be ranked for relevance.
2
Call the Code Reranker API
Send your query and codebase to the reranker to get relevance scores for each file.
3
Parse Ranked Results from Response
The API returns files ranked by relevance with scores between 0 and 1 up to the token limit you set.We recommend additionally filtering out results with low relevance scores. See the agent tool definition or workflow guide for specific recommendations based on your system.