Skip to content

Hands-on Microhack created by Microsoft Office of the CTO Americas, focused on RAG AI.

License

Notifications You must be signed in to change notification settings

joliecd/microhack-rag-ai-and-your-data

 
 

Repository files navigation

Alt text

Microhack - RAG AI & Your Data

Presented by Microsoft Americas Office of the CTO

Originally from GPT-RAG

The RAG pattern enables businesses to use the reasoning capabilities of LLMs, using their existing models to process and generate responses based on new data. RAG facilitates periodic data updates without the need for fine-tuning, thereby streamlining the integration of LLMs into businesses.

The Enterprise RAG Solution Accelerator (GPT-RAG) offers a robust architecture tailored for enterprise-grade deployment of the RAG pattern. It ensures grounded responses and is built on Zero-trust security and Responsible AI, ensuring availability, scalability, and auditability. Ideal for organizations transitioning from exploration and PoC stages to full-scale production and MVPs.

Application Components

GPT-RAG follows a modular approach, consisting of three components, each with a specific function.

  • Data Ingestion - Optimizes data chunking and indexing for the RAG retrieval step.

  • Orchestrator - Coordinates the flow to retrieve information and generate a user response using Semantic Kernel functions.

  • App Front-End - Uses the Backend for Front-End pattern to provide a scalable and efficient web interface.

Concepts

If you want to learn more about the RAG Pattern and GPT-RAG architecture.

Setup Guide

  1. Basic Architecture Deployment: for quick demos with no network isolation⚙️

Learn how to quickly set up the basic architecture for scenarios without network isolation. Click the link to proceed.

Getting Started

This guide will walk you through the deployment process of Enterprise RAG. Before beginning the deployment, please ensure you have prepared all the necessary tools and services as outlined in the Pre-requisites section.

Pre-requisites

Basic Architecture Deployment

For quick demonstrations or proof-of-concept projects without network isolation requirements, you can deploy the accelerator using its basic architecture. Basic Architecture

The deployment procedure is quite simple, just install the prerequisites mentioned above and follow these four steps using Azure Developer CLI (azd) in a terminal:

1 Download the Repository:

azd init

1.a Give the environment a unique name. This will be used to create your resources. For example, cowboy-hats would create resource group rg-cowboy-hats.

Enter a new environment name: some-name-here

2 Login to Azure:

2.a Azure Developer CLI:

azd auth login

2.b Azure CLI:

az login

2.c Select your Azure Subscription from list.

3 Start Building the infrastructure and components deployment:

azd up

3.a Select your Azure Subscription from list.

3.b Select Azure region. Recommended: East US (eastus)

4 Add source documents to object storage from /datasources directory.

Upload your documents to the 'documents' folder located in the storage account. The name of this account should start with 'strag'. This is the default storage account, as shown in the sample image below.

storage_sample

Done! Basic deployment is completed.

Recommended: Add app authentication. Watch this quick tutorial for step-by-step guidance.

How to?

Customize Your Deployment

The standard deployment process sets up Azure resources and deploys the accelerator components with a standard configuration. To tailor the deployment to your specific needs, follow the steps in the Custom Deployment section for further customization options.

Integrate with Additional Data Sources

Expand your data retrieval capabilities by integrating new data sources such as Bing Custom Search, SQL Server, and Teradata. For detailed instructions, refer to the AI Integration Hub page.

Multi-Environment Deployment

Once you've successfully deployed the GPT-RAG solution as a proof of concept and you're ready to formalize the deployment using a proper CI/CD process to accelerate your deployment to production, refer to the multi-environment deployment guides for either Azure DevOps or GitHub.

Troubleshoot Deployment Issues

If you encounter any errors during the deployment process, consult the Troubleshooting page for guidance on resolving common issues.

Evaluate Performance

To assess the performance of your deployment, refer to the Performance Testing guide for testing methodologies and best practices.

Query the Conversation History

Learn how to query and analyze conversation data by following the steps outlined in the How to Query and Analyze Conversations document.

Estimate Pricing

Understand the cost implications of your deployment by reviewing the Pricing Model for detailed pricing estimation.

Manage Governance

Ensure proper governance of your deployment by following the guidelines provided in the Governance Model.

Contributing

We appreciate your interest in contributing to this project! Please refer to the CONTRIBUTING.md page for detailed guidelines on how to contribute, including information about the Contributor License Agreement (CLA), code of conduct, and the process for submitting pull requests.

Thank you for your support and contributions!

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

Hands-on Microhack created by Microsoft Office of the CTO Americas, focused on RAG AI.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 39.8%
  • Jupyter Notebook 23.7%
  • Bicep 20.5%
  • TypeScript 10.2%
  • Shell 2.2%
  • PowerShell 2.0%
  • Other 1.6%