{"uid":"cap_CmWmFKU4yn92sNJs-UVuW","slug":"rag-retrieval-precision-k-evaluation-8ca92db5","name":"RAG Retrieval Precision@K Evaluation","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_retrieval_precision_at_k/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_retrieval_precision_at_k","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_retrieval_precision_at_k","executionId":"example-execution","startedAtMs":0,"amountAtomic":"10000","resultSha256":"ef726ce1c7b4ce45873673f7a6f2573c5e19be21ad46410ec3c4f870b421d600","serviceVersion":"1.0.0","settlementReference":"0x0000000000000000000000000000000000000000000000000000000000000000"},"artifacts":[],"requestId":"example-request","executionId":"example-execution"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Sah4NhP_KpuR3a19_A8wD","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes Precision@K metric for a RAG retrieval system, measuring how many of the top-K retrieved documents are actually relevant.","exampleAgentPrompt":"Evaluate my RAG retrieval system's Precision@5 — I retrieved these 5 documents and the relevant ones are documents 1, 3, and 5; tell me my precision score and any warnings.","exampleUseCases":[{"title":"Benchmarking RAG pipeline retrieval quality","prompt":"I just ran my RAG pipeline on 10 test queries and got back the top-5 retrieved documents for each. Can you compute Precision@5 for me so I know what fraction of those retrieved docs are actually relevant?"},{"title":"Comparing vector search configurations","prompt":"I'm testing two different embedding models for my document search. Can you calculate Precision@10 for both result sets so I can see which retrieval configuration surfaces more relevant documents in the top 10?"},{"title":"Validating retrieval before RAG deployment","prompt":"Before I ship my new RAG chatbot to production, can you evaluate the Precision@3 on my held-out test set to make sure the retrieval component is performing well enough?"}],"resultDescription":"Returns a JSON analysis containing the Precision@K score, a service ID, a scope note indicating the result is based on caller-supplied data, and warnings to verify the data before relying on results. Also includes a receipt with payment details, execution metadata, and a SHA256 hash of the result for auditability.","failureModes":["Malformed or empty request_json input returns an error or invalid result","K value larger than the retrieved set size may produce undefined or trivially low scores","Caller-supplied relevance labels that are inconsistent or incorrect lead to unreliable precision scores","Missing required fields in request_json may cause computation failure"],"whenToPreferThis":"Choose this endpoint when you need a quick, pay-per-call Precision@K computation for RAG or information retrieval evaluation without standing up your own evaluation infrastructure. Ideal for one-off benchmarks, CI/CD quality gates, or comparing retrieval configurations in an agent-native workflow using Base USDC micropayments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T07:02:37.137Z","isFirstParty":false}