{"uid":"cap_VJHBIaEkqEzEtFbqdd_Y8","slug":"vektorwerk-similarity-scoring-f4587dde","name":"Vektorwerk Similarity Scoring","description":"Embeds one query and up to 64 candidates locally, then returns cosine scores and stable descending ranks.","url":"https://vektor.netzhandwerker.de/similarity","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"model":{"enum":["nomic","bge_m3"],"type":"string","default":"nomic"},"query":{"type":"string"},"candidates":{"type":"array","items":{"type":"string"},"maxItems":64,"minItems":1}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_pEPl1skDaFN0QHCDHTwOV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Embeds a query and up to 64 candidate texts locally, then returns cosine similarity scores and stable descending ranks for each candidate.","exampleAgentPrompt":"Score these 5 FAQ answers by how well they match the question 'How do I reset my password?' and return them ranked best to worst — use the bge_m3 model.","exampleUseCases":[{"title":"FAQ answer reranking for support bot","prompt":"I have a user question 'What is your return policy?' and 10 candidate FAQ entries — rank all 10 by semantic similarity to the question using the nomic model so I can show the best match first."},{"title":"RAG chunk selection before LLM call","prompt":"Before I send anything to the LLM, score these 64 document chunks against my query 'explain compound interest' and give me the cosine scores so I can pick the top 3 most relevant ones."},{"title":"Semantic deduplication across short phrases","prompt":"I have one reference phrase 'machine learning model training' and 20 candidate phrases — rank them by similarity so I can spot near-duplicates and collapse redundant entries."}],"resultDescription":"Returns a ranked list of candidates ordered by descending cosine similarity score, including the numeric cosine score and stable integer rank for each candidate, computed from locally-run embeddings using the selected model (nomic or bge_m3).","failureModes":["More than 64 candidates submitted — request rejected with validation error","Empty candidates array — rejected due to minItems:1 constraint","Invalid model value outside the enum [nomic, bge_m3] — returns error","Query or candidates too long for the model's context window — truncation or error","Local Ollama runtime unavailable — service returns 500 or timeout","Payment not provided or insufficient — x402 payment required response"],"whenToPreferThis":"Prefer this endpoint when you need fast, local semantic similarity scoring with stable ranks across up to 64 candidates per query — especially useful for RAG reranking, FAQ matching, or deduplication pipelines where you want cosine scores rather than just ordering. Choose this over cloud embedding APIs when latency, privacy, or per-token cost is a concern, and when nomic or bge_m3 embedding quality is sufficient for your use case.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:37:16.007Z","isFirstParty":false}