Semantic ranking
Ranks by meaning, not just keyword overlap. A query about 'resetting credentials' matches 'change your password' even with no shared words.
Send a query and a list of documents, and get them back ranked by semantic
Learn more about Semantic SearchResults show up here
The sample input is ready — just hit Run.
Send a query and a list of documents, and get them back ranked by semantic similarity to the query. Each result includes its rank, the original document text, a similarity score, and its index in your input list. The response also echoes the query and the total number of documents ranked. Because matching is by meaning, a query about "resetting credentials" still matches "change your password". Responses are synchronous — one request, one ranked list.
Ranks by meaning, not just keyword overlap. A query about 'resetting credentials' matches 'change your password' even with no shared words.
Each result includes its 1-based rank, the document text, a similarity score, and the document's original index in your input list.
The response repeats the query and total document count — handy for logging.
Query and documents can be in different languages — they're mapped into the same meaning space.
Document retrieval
Retrieve the most relevant chunks from a document set for a user query.
FAQ matching
Match a user question to the closest FAQ entry by meaning.
Recommendation
Find similar articles, products, or entries from a query or item description.
input
A query string and a documents array of strings.
output
Ranked results (rank, text, score, index), the echoed query, and the total document count.
rank, the document text, a similarity score, and the index it had in your input list.results in your own code.queryrequiredstringThe search query.
documentsrequiredarray<string>The list of candidate documents to rank against the query.
results[].rankinteger1-based rank position.
results[].textstringThe original document text.
results[].scorenumberSimilarity to the query, from 0 to 1.
results[].indexintegerThe document's original 0-based index in your documents array.
querystringThe query you sent, echoed back.
total_documentsintegerNumber of documents that were ranked.
Billed per request.
| Service | Unit | Price |
|---|---|---|
| Semantic Search | item | $0.004/request |
Price is per request, regardless of how many documents you rank.