{"uid":"cap_uKuqtNS-agqFyN69wz7vB","slug":"pagos-andreax-dev-semantic-search-rag-ranking-a7fb4968","name":"pagos.andreax.dev Semantic Search / RAG Ranking","description":"Rankea una lista de documentos por su cercanía de SIGNIFICADO a una consulta (similitud coseno sobre embeddings). RAG listo para usar, sin que el agente monte su propia base vectorial. input='consulta || documento 1 || documento 2 || ...' (separados por ||).","url":"https://pagos.andreax.dev/api/taller/peaje/busqueda-semantica","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"'consulta || doc1 || doc2 || ...'"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_qik5k1AF5W3O3Vmkecl5v","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Ranks a list of documents by semantic similarity to a query using cosine similarity over embeddings, enabling ready-to-use RAG without maintaining a vector database.","exampleAgentPrompt":"From these four support articles, rank them by how relevant they are to the question 'how do I reset my password?': 'Account security overview', 'Password reset steps', 'Two-factor authentication guide', 'Billing and payments FAQ'.","exampleUseCases":[{"title":"FAQ retrieval for customer support","prompt":"I have a user question — 'What is your refund policy?' — and these five knowledge base articles. Rank them by how closely they match the question: 'Shipping times', 'Returns and refunds', 'Payment methods', 'Account deletion', 'Contact support'."},{"title":"RAG context selection for LLM pipeline","prompt":"Before sending a prompt to the LLM, rank these six document chunks by their relevance to 'how does photosynthesis work?' so I can pass only the top two as context: 'Cell respiration overview', 'Chlorophyll and light absorption', 'Plant cell structure', 'Photosynthesis process explained', 'Nutrient uptake in roots', 'Water cycle in ecosystems'."},{"title":"Legal clause matching by meaning","prompt":"Given the search query 'liability exclusion for software defects', rank these contract clauses by semantic similarity: 'Indemnification clause', 'Software warranty disclaimer', 'Force majeure provisions', 'Data privacy obligations', 'Limitation of liability for bugs'."}],"resultDescription":"A ranked list of the input documents ordered from most to least semantically similar to the query, based on cosine similarity computed over their embeddings. Likely includes similarity scores or ranking positions for each document.","failureModes":["Missing or malformed 'input' query parameter returns an error","Documents not properly separated by '||' delimiter causes incorrect parsing","Very short or empty query string may produce unreliable rankings","Extremely long documents may be truncated or cause latency spikes","Sending only a query with no documents returns an empty or error response"],"whenToPreferThis":"Choose this endpoint when you need lightweight, on-demand semantic ranking of a small-to-medium set of documents against a query, without the overhead of maintaining your own vector database or embedding infrastructure. Ideal for RAG pipelines where document sets are provided at call time rather than pre-indexed. Best for agents that need to select the most relevant context chunks before calling an LLM.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:30:57.370Z","isFirstParty":false}