# RAG Reciprocal Rank Calculate

> RAG Reciprocal Rank Calculate is a paid API for AI agents from signalharness.ai, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Computes reciprocal rank scores for retrieval-augmented generation (RAG) evaluation, measuring the quality of ranked retrieval results.

## Facts

- Endpoint: POST https://signalharness.ai/api/agent/services/rag_reciprocal_rank_calculate/invoke
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rag-reciprocal-rank-calculate-231b5399
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D7vpLKT88bkKO-PLPf5gT

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability rag-reciprocal-rank-calculate-231b5399 -d '<json body>'
```

Example prompt: 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}]}.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Explore 330 pay-per-call x402 API services and 27 agent-native digital products, with Base USDC pricing, secure Polar checkout, and free discovery.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "request_json": {
   "type": "string",
   "maxLength": 65536,
   "minLength": 2
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rag-reciprocal-rank-calculate-231b5399/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from signalharness.ai](https://www.zero.xyz/host/signalharness.ai/llms.txt)
