{"uid":"cap_D7vpLKT88bkKO-PLPf5gT","slug":"rag-reciprocal-rank-calculate-231b5399","name":"RAG Reciprocal Rank Calculate","description":"Explore 330 pay-per-call x402 API services and 27 agent-native digital products, with Base USDC pricing, secure Polar checkout, and free discovery.","url":"https://signalharness.ai/api/agent/services/rag_reciprocal_rank_calculate/invoke","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"request_json":{"type":"string","maxLength":65536,"minLength":2}}},"responseSchema":{"type":"json","example":{"replay":false,"result":{"warnings":["Verify the caller-supplied data before relying on this result."],"service_id":"rag_reciprocal_rank_calculate","analysis_json":"{\"example\":\"schema-valid caller-supplied data\"}","evidence_scope":"caller_supplied_data"},"status":"succeeded","receipt":{"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","usage":[],"status":"succeeded","network":"eip155:8453","artifacts":[],"endedAtMs":0,"latencyMs":0,"paymentId":"example-payment","receiptId":"example-receipt","requestId":"example-request","serviceId":"rag_reciprocal_rank_calculate","executionId":"example-execution","startedAtMs":0,"amountAtomic":"5000","resultSha256":"4fd4e32878d30e2f62fb9a2d8bf98ee6855f8ed996cfbebdd8338e3bc9e791e4","serviceVersion":"1.0.0","settlementReference":"0x0000000000000000000000000000000000000000000000000000000000000000"},"artifacts":[],"requestId":"example-request","executionId":"example-execution"}},"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_Hj77aLybqrI61w1-kXnWB","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":"Computes reciprocal rank scores for retrieval-augmented generation (RAG) evaluation, measuring the quality of ranked retrieval results.","exampleAgentPrompt":"Calculate the reciprocal rank score for my RAG retrieval results — here's the JSON with my ranked documents and the position of the first relevant result: {\"query\": \"climate change effects\", \"ranked_results\": [{\"doc_id\": \"doc_3\", \"relevant\": false}, {\"doc_id\": \"doc_7\", \"relevant\": true}]}.","exampleUseCases":[{"title":"Benchmarking a RAG pipeline retrieval quality","prompt":"I want to evaluate how well my RAG system is ranking relevant documents — can you compute the reciprocal rank for these ranked retrieval results and tell me how good the ranking quality is?"},{"title":"Comparing two retrieval strategies","prompt":"I'm A/B testing two retrieval methods for my RAG pipeline. Can you calculate the reciprocal rank score for each of these result sets so I can see which one puts relevant documents higher in the ranking?"},{"title":"Monitoring RAG search degradation","prompt":"My RAG system's answer quality seems to have dropped lately. Can you run a reciprocal rank calculation on these retrieval results from last week versus this week so I can see if the ranking got worse?"}],"resultDescription":"Returns a JSON object containing the computed reciprocal rank score, an analysis_json field with the metric result, any warnings about caller-supplied data, and a receipt with payment and execution metadata including service version, latency, and a result SHA256 hash.","failureModes":["Malformed or invalid JSON in request_json field returns a parse error","request_json exceeding 65536 characters is rejected","Missing required ranking data in the JSON payload leads to incomplete computation","Caller-supplied data may contain inaccuracies, flagged via warnings in the result","Payment failure on the x402 protocol returns a 402 status before execution"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, pay-per-call computation of reciprocal rank for RAG or information retrieval evaluation without setting up your own metric infrastructure. Ideal for agents that periodically evaluate retrieval quality as part of a pipeline monitoring or benchmarking workflow. Prefer this over manual computation when you need a verifiable, receipted result with a SHA256 hash for auditability.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T13:01:58.431Z","isFirstParty":false}