Keyword search over documents you supply, no index needed
agents.204-168-199-108.sslip.io/v1/util/bm25-rank
Keyword search over documents you supply, no index needed: give a query and up to 2,000 documents (strings or {id,title,text}) and get them ranked by Okapi BM25 with score, relative relevance, matched terms, query coverage and a best-matching snippet. Use for RAG retrieval, reranking search results or picking the right FAQ/chunk before calling an LLM. Tunable k1/b, top_k.
GET
https://agents.204-168-199-108.sslip.io/v1/util/bm25-rankUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.204-168-199-108.sslip.io/v1/util/bm25-rank?documents=%5B%7B%22id%22%3A%22faq-1%22%2C%22text%22%3A%22Shipping+takes+3-5+business+days+in+the+EU.%22%7D%2C%7B%22id%22%3A%22faq-2%22%2C%22text%22%3A%22You+can+ask+for+a+refund+within+30+days+of+delivery.%22%7D%2C%7B%22id%22%3A%22faq-3%22%2C%22text%22%3A%22Refunds+are+paid+to+the+original+card.%22%7D%5D&query=refund+within+30+days");
console.log(await res.json());Example input
{
"documents": "[{\"id\":\"faq-1\",\"text\":\"Shipping takes 3-5 business days in the EU.\"},{\"id\":\"faq-2\",\"text\":\"You can ask for a refund within 30 days of delivery.\"},{\"id\":\"faq-3\",\"text\":\"Refunds are paid to the original card.\"}]",
"query": "refund within 30 days"
}