A Guide to Azure AI Search Retrieval Methods
In our previous published article, we have covered how to create an index in Azure AI search. We demonstrated the use of inbuilt skill sets to create the index. This is the second publication in the series where we delve into the retrieval aspect of Azure AI Search.
Performing Searches
Once your data is stored in a search index, you can utilize the query capabilities of Azure AI Search to retrieve content. The Azure AI Search service enables various search methods such as text search, vector search, hybrid search, and hybrid with semantic ranking. Let's explore each of these methods in detail:
Text Search
Text search, also known as keyword search, matches query terms directly with the text in your data. This method is effective for specific search queries where relevant documents contain exact terms. Query strings undergo lexical analysis to enhance search efficiency. Matching terms are retrieved, ranked by relevance, and presented as search results.

In the search_field parameter, you can specify different fields for the search. This constrains the search to the specified fields within the search index. Omitting this parameter will result in searching all searchable fields, potentially leading to performance issues.
Vector Search

Vector search involves converting text into high-dimensional vectors for searches in vector space. This method is valuable for semantic search, capturing contextual word meanings to return relevant results even with non-exact terms.
Hybrid Search
Hybrid search combines text and vector search methods, utilizing keyword matching for specificity and vector space matching for semantic content. This approach balances precision and recall, offering versatility in various applications.

The hybrid search query includes the text query in the search_text parameter and a vectorized query in the vector_queries parameter.
Hybrid Search + Semantic Reranking
In Azure AI Search, semantic ranking enhances search relevance by leveraging Microsoft's language understanding models to reorder search results. This feature improves the quality of text-based query results through semantic analysis.
Pre-filter & Post-filter
Filters in search queries act as conditions similar to SQL "Where" clauses for precise value matching. Filters are particularly useful for numeric fields and can optimize search efficiency by reducing the search space.

Filters can enhance data security, restrict access based on user attributes, and refine search based on specific criteria such as product names. Experimenting with pre and post-filter options can lead to cost-effective and relevant retrieval methods.
Scoring Profile
Scoring profiles in Azure AI Search allow you to boost search results based on predefined criteria. By creating scoring profiles, you can assign different weights to fields in search queries, influencing result relevance based on field importance.
Utilize scoring profiles to optimize search outcomes and prioritize specific fields to improve search result quality.