Notebooks
M
Microsoft
E2E Phi 4 RAG Azure AI Search

E2E Phi 4 RAG Azure AI Search

codemicrosoft-phi-cookbook06.E2E

Phi-4 RAG with Azure AI Search

This notebook demonstrates how to use Phi-4-mini and Phi-4-multimodal for Retrieval Augmented Generation (RAG) with Azure AI Search. It covers both single-modality (text-only) and multi-modality (text and image) scenarios.

Prerequisites:

  • Azure AI Search vector index (follow these instructions to create one)
  • Phi-4-mini OR Phi-4-multimodal endpoints deployed in Microsoft Foundry
[ ]

Text-Only RAG with Phi-4-mini

This section demonstrates how to use Phi-4-mini as a chat completion model for RAG, using only text as input. It involves connecting to Microsoft Foundry Inference and Azure AI Search, retrieving relevant documents, and generating an answer using the retrieved context.

[ ]

Multi-Modal RAG with Phi-4-multimodal

This section demonstrates how to use Phi-4-multimodal as a chat completion model for RAG, incorporating both text and image input. It covers connecting to Azure AI Inference and Azure AI Search, retrieving relevant documents, and generating a multimodal response.

Note: You can also perform a multi-vector query if you have both text_vector and image_vector fields in your Azure AI Search index.

[ ]