Posts

Azure AI Building RAG Application Solution: Using Azure Open AI to generate embedding on PDF documents and executing vector quires for RAG Applicaiton

Image
In the previous article , we have seen how to create Azure AI Search Service, Azure Open AI, and Azure Blob Storage using Azure Portal. Furthermore, we have uploaded PDF documents in the Azure Blob storage. We have seen how to create Azure AI Search Data Source, Index, and Indexer using Code. In this article, we will see the implementation of the RAG solution. As shown in Figure 1, the Step 1 is already completed in. Figure 1: RAG Application The project creation is already explained in previous article . In this article we need to modify the AzureAISearchServiceManager class. Since, we will be using the PDF documents for embedding, we need to make sure that the PDF contents from PDF documents are split and they are embedded. Step 1:   Modify the  AzureAISearchServiceManager  class by adding method as shown in List 1.  public static List<string> SplitTextContentsChunks(string text, int maxCharsPerChunk = 7000) { var chunks = new List<string>(); ...

Azure AI Building RAG Application Solution: Using Azure AI Search Service and Creating Data Source, Index, and Indexer

Image
Implementation of AI Capabilities for the existing software applications is one of the most demanded as well as expected features. When the application is deployed on Microsoft Azure, it can easily use the Azure AI Capabilities e.g. Azure AI Search, Azure Open AI for building Retrieval-Augmented Generation (RAG) application. For example, if you are having online Loan or Insurance applications, as an application owner you want to provide Q&A based application for end-users so that end-user can retrieve Loan or insurance related information e.g. eligibility, rates of interest, Insurance rules, etc. In this case, rules for Loan or Insurance may be continuously changing and hence you are storing such information in Word, PDF, etc. file formats. Thes file types are stored in Azure BLOB Storage. In such applications, you must have a RAG solution build using Azure Open AI, Azure AI Search Service and Azure BLOB Storage. In this case, the files are stored in Azure BLOB storage, the Index b...

ASP.NET Core 9: How to implement the Request Compression in .NET 9

Image
 In this article, we will implement a request compression in ASP.NET Core from the client application. In ASP.NET Core the built-in support for the response compression is available but there is not support available for the request compression. We can perform the request compression by implementing the custom middleware. Why is the Request Compression required? In the modern application development, there exist the frequency of uploading large file or large JSON bodies to the server from the client applications. When the client wants to upload such large files or JSON data then there is possibility that the out-of-memory exception is raised or the client application or even sometimes the server-side application may be crashed or hanged. Naturally, in such case, we need to plan for reducing the data to be transferred from the client application to server application, but this is not always possible. E.g. if the client wants to upload a large file or JSON for AI related work to serv...