This section guides you through setting up Vector Search and enabling Retrieval-Augmented Generation (RAG) by processing documents, generating embeddings with Ada-002, and indexing them into Azure AI Search for semantic retrieval.
You can choose between two indexing methods:
- Azure Durable Function: Automatically triggers on file upload to an Azure Storage Account, chunking documents and indexing them. This event-driven approach offers greater flexibility and supports a wide range of document types.
- Azure AI Search Indexer Automate document indexing for your RAG solution using Azure AI Search. The indexer coordinates data ingestion, chunking, enrichment (via skillsets), and vectorization—supporting both one-time indexing and recurring schedules for incremental updates.
Once indexing is complete, you'll be able to "chat over your data" using the Azure AI Foundry Playground, enabling intelligent Q&A over your custom knowledge base.
Ensure your workshop environment is deployed, including AI Foundry, Azure Storage, and Azure AI Search:
➡️ Workshop Setup and Solution Deployment
This project leverages Azure AI Search push APIs as the recommended approach for indexing large documents, enabling fine-grained control over execution and supporting event-driven indexing workflows.
🔗 Indexing Large Data Sets in Azure AI Search
To efficiently handle unstructured content, the project uses document chunking strategies tailored for vector search.
🔗 Chunking Large Documents for Vector Search in Azure AI Search
For a simplified, wizard-based approach that chunks content and automatically calls an embedding model during indexing and queries, refer to:
🔗 Import and Vectorize Data in Azure AI Search
In Azure AI Search, queries run against content loaded into a search index. There are two primary ways to populate an index:
- Push your data programmatically using APIs
- Pull data in using a search indexer
The push model uses APIs to upload documents directly into an existing search index.
Key Benefits
-
Flexible Data Sources
You can index content from any source, as long as it’s formatted as JSON and matches your index schema. -
Unlimited Update Frequency
Push updates as often as needed—ideal for real-time use cases like syncing product inventory or other rapidly changing data. -
Full Control over Connectivity and Security
You define how documents are accessed and secured. Unlike indexers, which rely on built-in Azure AI Search authentication, the push model gives you end-to-end control.
This project includes the Azure Durable Function DocumentProcessingFunction, which listens for new PDF files in blob storage and automatically processes and indexes them into Azure AI Search.
- Authentication is managed via Azure Managed Identities, offering a secure alternative to API keys.
To trigger indexing:
- Upload PDF documents to the
loadcontainer in the Azure Storage Account. Ensure the user has theStorage Blob Data Contributorrole to upload data to the Azure Storage Account. 1.1 The demonstration uses data from the 2024 United States Data Center Energy Usage Report.
📄lbnl-2024-united-states-data-center-energy-usage-report.pdf - The Azure Function will automatically:
- Chunk the documents
- Generate embeddings
- Push the content into your Azure AI Search index
💡 Once the Azure Function has successfully processed, chunked, generated embeddings, and indexed the content into Azure AI Search, the uploaded PDF files will be moved to the
completedcontainer.
The pull model uses indexers that connect to supported data sources and automatically ingest data into your Azure AI Search index. Indexers are available for many Microsoft data sources, with additional support through third-party connectors.
Key Benefits of Using Indexers
-
Automated Data Ingestion
Indexers directly connect to structured sources (e.g., tables, views), transforming rows into JSON and uploading them to your index automatically. -
Simple Field Mapping
Source fields are mapped to index fields with minimal configuration—no need for custom transformation code. -
Built-In Scheduling
Define how frequently your index is refreshed with built-in scheduling support, ensuring data stays current without manual intervention.
Azure AI Search offers a vectorization wizard that lets you quickly set up an indexing and enrichment pipeline—ideal for chunking and embedding content for vector search.
With minimal setup, the wizard:
- Connects to your data source
- Chunks and vectorizes text or image data
- Uses your deployed embedding model to generate vector content
💡 You’ll need an existing embedding model deployment, but the wizard handles the connection, request, and response automatically.
- Sign in to the Azure portal.
- Navigate to your Azure AI Search service.
- From the Overview page, select Import and vectorize data.
Follow this tutorial to learn how to create a fully automated indexing pipeline for a Retrieval-Augmented Generation (RAG) solution using Azure AI Search. The pipeline uses an indexer to handle data ingestion, skillset execution, chunking, and vectorization—supporting both one-time and scheduled incremental updates.
🔗 Tutorial: Build an indexing pipeline for RAG on Azure AI Search
To begin interacting with your vectorized data in Azure AI Search using the Chat Playground, add your Azure AI Search index as a data source.
In the Playground, click on + Add a new data source.
Choose Azure AI Search as the data source.
Select the deployed instance of Azure AI Search associated with this solution, and choose the index named _workshop-index_.
To perform a vector search, specify the text embedding mode.
- Select the mode
_text-embedding_, which is deployed to Azure AI Foundry with this solution.
Keep the default settings and proceed to the Review and Finish step.
With the new data source added, you can now chat with the vector data using the Playground.
For example, if you uploaded the sample file 2024 United States Data Center Energy
Usage Report, you can ask: "What is the impact of bitcoin?"







