Overview#
I tried building a RAG-based chat using Azure OpenAI, LlamaIndex, and Gradio, so here are my notes.
Azure OpenAI#
Create an Azure OpenAI resource.

Then, click “Endpoint: Click here to view endpoint” to note down the endpoint and key.

Then, navigate to the Azure OpenAI Service.

Go to “Model catalog” and deploy “gpt-4o” and “text-embedding-3-small”.

The result is displayed as follows.

Downloading the Text#
This time, we target “The Tale of Genji” published on Aozora Bunko (a free digital library of Japanese literature).
https://www.aozora.gr.jp/index_pages/person52.html
Download the texts in bulk using the following script.
Creating the Index#
Prepare environment variables.
Then, create the index using the following script.
Gradio#
Finally, create an app using Gradio.
The chatbot was successfully created as shown below.

Summary#
There may be some misunderstandings on my part, but I hope this serves as a helpful reference.