mohnkhan / GPT-RAG

Sharing the learning along the way we been gathering to enable Azure OpenAI at scale in a secure manner. GPT-RAG core is a Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.

Home Page:https://azure.microsoft.com/en-us/products/cognitive-services/openai-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Components

1 Data ingestion

2 Orchestrator

3 App Front-End

Video GPT-RAG+Prompt Engineering+Finetuning+Train (Spanish)

Alt text

What is a RAG pattern?

Retrieval-Augmented Generation (RAG) pattern

Reference implementation of the Retrieval-Augmented Generation (RAG) pattern.

Why to start with RAG pattern?

Why RAG?

GPT-RAG / Simple Architecture (NoSecure) Architecture Overview

Architecture Overview

GPT-RAG / Zero Trust Architecture Overview

Architecture Overview

Connectivity Components:

  • Azure Virtual Network (vnet) to Secure Data Flow (Isolated, Internal inbound & outbound connections).
  • Azure Front Door (LB L7) + Web Application Firewall (WAF) to Secure Internet Facing Components.
  • Bastion (RDP/SSH over TLS), secure remote desktop access solution for VMs in the virtual network.
  • Jumpbox, a secure jump host to access VMs in private subnets.

AI Workloads:

  • Azure Open AI, a managed AI service for running advanced language models like GPT-4.
  • Private DNS Zones for name resolution within the virtual network and between VNets.
  • Cosmos DB, a globally distributed, multi-model database service to support AI applications with Analytical Storage enabled for future usage.
  • Web applications in Azure Web App.
  • Azure AI services for building intelligent applications.
  • High Availability & Disaster Recovery Ready Solution.
  • Audit Logs, Monitoring & Observability (App Insight)
  • Continuous Operational Improvement

Architecture Deep Dive

Architecture Deep Dive

1 Data ingestion Optimizes data preparation for Azure OpenAI

2 Orchestrator The system's dynamic backbone ensuring scalability and a consistent user experience

3 App Front-End Built with Azure App Services and the Backend for Front-End pattern, offers a smooth and scalable user interface

How to Deploy GPT-RAG

To deploy this solution you just need to execute the next steps:

1) Provision required Azure services

You can do it by clicking on the following button

Deploy to Azure

or by using Azure Developer CLI (azd) executing the following lines in terminal

azd auth login
azd init -t azure/gpt-rag
azd up

Important: when selecting the target location check here the regions that currently support the Azure OpenAI models you want to use.

2) Ingestion Component

Use Data ingestion repo template to create your data ingestion git repo and execute the steps in its Deploy section.

3) Orchestrator Component

Use Orchestrator repo template to create your orchestrator git repo and execute the steps in its Deploy section.

4) Front-end Component

Use App Front-end repo template to create your own frontend git repo and execute the steps in its Deploy section.

Project-Addons

Pricing Estimation

Governance

Technical References

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

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.

About

Sharing the learning along the way we been gathering to enable Azure OpenAI at scale in a secure manner. GPT-RAG core is a Retrieval-Augmented Generation pattern running in Azure, using Azure Cognitive Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.

https://azure.microsoft.com/en-us/products/cognitive-services/openai-service

License:MIT License


Languages

Language:Bicep 100.0%