{"uid":"cap_RH-3qMShRCLiHUR-yHfEu","slug":"agent-tools-text-similarity-bge-m3-cosine-84f344f7","name":"Agent Tools – Text Similarity (BGE-M3 Cosine)","description":"Pay-per-call utilities for AI agents over x402, USDC on Base.","url":"https://agents.crowdspark.me/v1/text/similarity?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string","description":"First text, max 8,000 characters"},"b":{"type":"string","description":"Second text, max 8,000 characters"}}},"responseSchema":{"type":"json","example":{"band":"high","chars":{"a":23,"b":27},"model":"baai/bge-m3","metric":"cosine","dimensions":1024,"similarity":0.8123}},"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_rx-ANfOy_MgBdRmGucNDz","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":"Computes semantic similarity between two texts using BGE-M3 embeddings and returns a cosine score plus a qualitative band (near_duplicate, high, related, weak, unrelated).","exampleAgentPrompt":"How semantically similar are these two texts? First: 'The quick brown fox jumps over the lazy dog.' Second: 'A fast auburn fox leaps above a sleepy hound.' Give me the cosine score and the similarity band.","exampleUseCases":[{"title":"RAG chunk relevance scoring","prompt":"Score how closely this user question matches a retrieved knowledge-base passage so I can decide whether to include it in the context: question is 'What are the refund policies for digital goods?' and the chunk is 'Digital purchases are non-refundable except in cases of technical failure verified by support.'"},{"title":"Product listing deduplication","prompt":"I have two product descriptions and I need to know if they're near-duplicates before merging them into my catalog: first is 'Sony WH-1000XM5 wireless noise-cancelling headphones, 30h battery' and second is 'Sony WH1000XM5 Headphones – ANC, Bluetooth, 30 hours playtime'. Are they the same item?"},{"title":"Resume-to-job-description matching","prompt":"Tell me how well this resume summary matches the job description — give me a cosine similarity score and the band. Resume: 'Experienced Python developer with 5 years in backend APIs and cloud infrastructure.' Job: 'We are looking for a senior backend engineer proficient in Python and cloud platforms.'"}],"resultDescription":"A JSON object containing: the cosine similarity score (float 0–1), a qualitative band ('near_duplicate', 'high', 'related', 'weak', or 'unrelated'), the embedding model used ('baai/bge-m3'), the metric ('cosine'), the number of embedding dimensions (1024), and character counts for both input texts. Texts are not stored.","failureModes":["Input text exceeds 8,000 characters — likely a 400 or payload-too-large error","Missing 'a' or 'b' field in JSON body — validation error returned","Network timeout for very long texts near the character limit","Payment not attached or insufficient USDC — 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need multilingual semantic similarity with a high-quality dense embedding model (BGE-M3, 1024 dimensions) and want a ready-made qualitative band alongside the raw score. Ideal for RAG pipeline chunk ranking, deduplication workflows, and semantic matching tasks where storing texts is undesirable. Prefer it over keyword-based matching when meaning matters more than token overlap, and over heavier LLM-based comparisons when cost and latency are a concern at $0.003 per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:43.371Z","isFirstParty":false,"canonicalSlug":"agent-tools-text-similarity-bge-m3-cosine-84f344f7"}