
Live sample: https://vercelazurerag.azurewebsites.net/
A Next.js application, powered by the Vercel AI SDK, that uses retrieval-augmented generation (RAG) to reason and respond with information outside of the model's training data.
streamText functionuseChat hookTo get the project up and running, follow these steps:
Install dependencies:
Copy the example environment file:
Create prerequisite resources in Azure AI:
Note: create a vector search index via REST API or within Azure Portal)
Note: see available Azure OpenAI models here and deploy them using this guide
Add your Azure OpenAI and Azure AI Search variables to the .env file:
Start the development server:
Your project should now be running on http://localhost:3000.
This template includes code from Vercel's AI SDK RAG Template, which is licensed under the MIT license.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.


