Semantic Search
Run a semantic ranking search against your Azure AI Search index. Unlike keyword search, semantic search uses Microsoft's language models to understand the meaning of the query and re-rank the top BM25 results by contextual relevance. It can also return semantic captions — highlighted key passages from matching documents — making it highly effective for RAG retrieval.
default.
Azure AI Search API Key
api-key{{azureAISearch_Key}}| Field | Type | Required | Description |
|---|---|---|---|
| search | String | Required | The natural language query to search for. Write it as a complete question for best semantic results. |
| queryType | String | Required | Must be "semantic" to enable semantic ranking. |
| semanticConfiguration | String | Required | Name of the semantic configuration on your index. Use "default" if you set it up with the default name. |
| select | String | Optional | Comma-separated fields to return. Example: "section,content". |
| top | Integer | Optional | Number of results. Use 3–5 for RAG context retrieval. |
Request Body (from Postman collection)
{
"search" : "How do I configure Azure AI Search with OutSystems?",
"queryType" : "semantic",
"semanticConfiguration": "default",
"select" : "section,content",
"top" : 5
}cURL
curl -X POST \ -H "api-key: <your-azure-search-key>" \ -H "Content-Type: application/json" \ -d '{"search":"How do I configure Azure AI Search?","queryType":"semantic","semanticConfiguration":"default","select":"section,content","top":5}' \ "https://<resource>.search.windows.net/indexes/<index>/docs/search?api-version=2025-05-01-preview"
@search.score (BM25 relevance) and @search.rerankerScore (semantic score, 0–4). Sort by @search.rerankerScore for best semantic ranking order.
Sample Response
{
"value": [
{
"@search.score" : 4.28,
"@search.rerankerScore" : 2.91,
"section" : "Configuring the Search Service",
"content" : "To configure Azure AI Search with OutSystems..."
}
]
}queryType is not "semantic".api-key.