{"uid":"cap_2QFUkSEL5PYSwbeQXmT8F","slug":"agent-tools-semantic-reranker-bge-reranker-base-fe6a3e63","name":"Agent Tools – Semantic Reranker (bge-reranker-base)","description":"Pay-per-call utilities for AI agents over x402, USDC on Base.","url":"https://agents.crowdspark.me/v1/text/rerank?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"query":{"type":"string","description":"Search query, max 1,000 characters"},"top_k":{"type":"integer","maximum":50,"minimum":1,"description":"Optional number of results, default all"},"documents":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","required":["text"],"properties":{"id":{"type":"string"},"text":{"type":"string"}}}]},"maxItems":50,"description":"1 to 50 strings or {id, text} objects, each max 2,000 characters"},"return_documents":{"type":"boolean","description":"Optional, default true"}}},"responseSchema":{"type":"json","example":{"model":"baai/bge-reranker-base","results":[{"rank":1,"text":"Photosynthesis turns light, water and carbon dioxide into sugar.","index":0,"score":0.9312},{"rank":2,"text":"Chlorophyll absorbs sunlight in leaves.","index":2,"score":0.4105}],"returned":2,"documents":3}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ppmPf6u24flCJqolwkAuH","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Reranks up to 50 documents or RAG chunks by relevance to a query using a bge-reranker-base cross-encoder, returning results sorted by a 0-1 relevance score.","exampleAgentPrompt":"Take these 20 research paper abstracts and rerank them by how relevant they are to the query 'CRISPR gene editing in somatic cells', then return the top 5 by relevance score.","exampleUseCases":[{"title":"RAG pipeline chunk selection","prompt":"I have 30 text chunks retrieved from our knowledge base and the user asked 'how do I reset my password'. Rerank all 30 chunks by relevance to that question and give me the top 8 so I can send them to the LLM."},{"title":"E-commerce search result reranking","prompt":"I got 25 product descriptions back from our keyword search for 'waterproof hiking boots'. Can you rerank them by semantic relevance to that query and show me the top 10 with their scores?"},{"title":"Legal document relevance filtering","prompt":"I have 40 contract clauses and need to find which ones are most relevant to the question 'what are the indemnification obligations of the supplier'. Rerank all of them and return the top 5 with relevance scores."}],"resultDescription":"Returns a JSON object with the model name ('baai/bge-reranker-base'), total document count, number returned, and a sorted array of results — each containing the rank (1-based), relevance score (0–1 float), original document index, and optionally the document text.","failureModes":["More than 50 documents submitted — request rejected","Individual document text exceeds 2,000 characters — may be truncated or rejected","Query exceeds 1,000 characters — rejected","Empty documents array — returns empty results","Payment not included or insufficient — HTTP 402 returned","top_k value out of range (0 or >50) — validation error"],"whenToPreferThis":"Use this endpoint when you have a set of candidate documents or RAG chunks retrieved by keyword or vector search and need to rerank them by semantic relevance before passing to an LLM or presenting to a user. It is ideal for improving retrieval precision in RAG pipelines, reordering search results, or selecting the most relevant passages from a larger candidate set. Prefer it when you need a lightweight cross-encoder score rather than generating embeddings yourself, and when your batch is ≤50 documents each ≤2,000 chars.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:36:56.880Z","isFirstParty":false,"canonicalSlug":"agent-tools-semantic-reranker-bge-reranker-base-fe6a3e63"}