Code reranking/semantic search
Uses Relace's code reranking model to find the most relevant files for a given query. This is useful as a first pass in agentic exploration to narrow down the search space.
Based on: https://docs.relace.ai/docs/code-reranker/agent
Query Construction: The query can be a short question or a more detailed conversation with the user request included. For a first pass, use the full conversation; for subsequent calls, use more targeted questions.
Token Limit and Score Threshold: For 200k token context models like Claude 4 Sonnet, recommended defaults are scoreThreshold=0.5 and tokenLimit=30000.
The response will be a list of file paths and contents ordered from most relevant to least relevant.
Request
- Base URLhttps://api.blaxel.ai/v0
- Auth
- OAuth 2Authorization code/oauth/authorizeClient credentialsToken URL/oauth/tokenScopesadmin
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Path to search in (relative to workspace)
Query parameters
Natural language query to search for
Minimum relevance score (default: 0.5)
Maximum tokens to return (default: 30000)
Regex pattern to filter files (e.g., .*\.ts$ for TypeScript files)
Response
Relevant files found
Example response
{
"message": "Found 5 relevant files",
"success": true
}Changes
No recorded changes to this operation across all 1 revision of this API.