Instruction 01

Understanding Vector Search

Vectorization transforms data into vector representations — these representations have key properties, primarily distance. Data points are arranged closer or farther apart based on their conceptual meanings. A vector search retrieves data stored in vector spaces based on a query.

Vector search excels with unstructured data, so you don’t need to tag, label, or identify specific portions of your data — simply index the data and the appropriate embedding model will ensure accurate retrieval results. Your queries don’t need to exactly match the indexed data; they only need to be similar in meaning to yield relevant results. This is the essence of semantic search, where retrieval is based on semantically similar documents. The embedding models used define and enforce these semantics — these models are pre-trained on specific data and designed for specific purposes.

Vector search is a powerful tool, surpassing traditional search in many ways and can be used for recommendations, multi-modal search (searching across different data types and models), multilingual search, vector storage (databases that store data in vector spaces), or RAGs.

While various search types exist, from basic text search to full-text search and fuzzy search, vector search can accomplish most of these with high accuracy across multiple data types, making it a search game-changer!

Exploring Vector Search with Azure AI Search

Azure AI Search supports vector search, handling all the intermediary steps and processes required. In conjunction with OpenAI, it offers further advanced vector search capabilities, producing highly accurate results over large datasets quickly, securely, and scalably.

When you use vector search in Azure AI Search, it automatically handles processes such as data retrieval from a wide range of sources, text splitting, data chunking, embedding, indexing, reranking, query embedding, and data retrieval. Azure AI Search delegates some of these functions to Azure OpenAI.

Vector search is one of the key strengths of Azure AI Search — it combines vector search with other search types to provide a comprehensive search engine capable of finding virtually anything you index. With terabytes of data generated daily across the globe, Azure AI Search enables efficient and fast information retrieval, regardless of the data volume. This is another key advantage of Azure AI Search: a capability that would require more effort and resources with other solutions.

Accessing Vector Search with Azure AI Search

In Azure AI Search, vector search is available for all tiers and regions. You can perform vector search through the Azure portal, REST APIs, or SDKs.

While Azure AI Search can vectorize indexes independently, to leverage the full suite of vector search capabilities — including advanced embedding models and optimized performance — you’ll need to use it with Azure OpenAI Service. This service provides embedding models, data chunking, and vectorization for Azure AI Search as needed. Remember to check the quota for your vector indexes in your Azure OpenAI Studio to help manage your resources effectively.

Reviewing Embedding Models on Azure AI portal

Embedding models are available for various data types, including words, paragraphs, documents, emoji, images, and audio. Currently, you can create models based on:

  • GPT (a chat model).
  • DALL-E (a text-to-image model).
  • Whisper (a speech recognition model).
  • TTS (a text-to-speech model).
  • Text-embedding (a text embedding model).

You can also import your own model, or fine-tune existing general-purpose models.

When you use Azure OpenAI with Azure AI Search, Azure OpenAI utilizes a default embedding model, which you can change if needed. When changing the model, you might need to handle splitting, chunking, and overlap manually.

Azure AI Search requires indexed documents to have one or more vector fields with embeddings to enable search. Always choose specific fields that will aid your semantic search instead of vectorizing all fields — this can save costs and speed up search processing. If you use your own model instead of the default, then you must also use the same model for indexing and queries.

In the next segment, you’ll create more resources on the Azure AI portal to help you build your app!

See forum comments
Download course materials from Github
Previous: Introduction Next: Demo 01