Posts

ASP.NET Core 9: Using FastEndpoints in ASP.NET Core Applicaitons

Image
In this article, we will understand the use of the FastEndpoints in ASP.NET Core Applicaitons. FastEndpoints is a lightweight REST API development framework built for ASP.NET 8 onwards. It is designed to be a developer-friendly alternative for Minimal APIs as well as MVC Controllers. This helps offering a clean and maintainable structure with minimal boilerplate code.  Importance of FastEndpoints FastEndpoints follows the REPR design pattern, Request, Endpoint, Response that helps to organize code in a clear and modular way. It is especially suitable for vertical slice architecture, where each feature is self-contained that cuts through all layers of the application stack. In the vertical slice, instead of organizing code by technical layers like controllers, services, repositories, the code is organized by features or use cases. Following are important advantages of using FastEndpoints: Minimal Boilerplate : We can define endpoints without controller and its action method wit...

Azure AI: Using Microsoft Azure AI to Query Large JSON files to Retrieve Data

Image
Artificial Intelligence (AI) is very important feature that every software application needs to provide an interactive interaction to the end-users. Nowadays, most of the software applications rely on the AI capabilities to provide conversational features to end-users, where these end-users ask questions to the applications and application generates accurate results based on the questions asked. In such cases, software applications need to have data that is arranged in the form of Tables, Documents, JSON files, etc. If we have data on PDF documents form, then we can use Vector embeddings to query to documents. Similarly, in case of JSON files, the chunking is required to query the JSON documents. I have already published articles on RAG Applications on PDF documents and on SQL Database on following links: Azure AI Building RAG Application Solution: Using Azure Open AI to generate embedding on PDF documents and executing vector quires for RAG Applicaiton Azure AI Building RAG Applicatio...

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...