-
Notifications
You must be signed in to change notification settings - Fork 5k
Add comprehensive Mermaid architecture diagrams for application documentation #2653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: pamelafox <[email protected]>
docs/README.md
Outdated
Consult the main [README](../README.md) for general information about the project. | ||
These are advanced topics that are not necessary for a basic deployment. | ||
|
||
- **[Architecture Overview](architecture.md)** - Detailed diagrams and component descriptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the link to the list below, above "HTTP Protocol"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the Architecture Overview link to the list above HTTP Protocol as requested (commit 481c539).
Co-authored-by: pamelafox <[email protected]>
README.md
Outdated
|
||
 | ||
|
||
📋 **[View detailed architecture documentation with interactive Mermaid diagrams](docs/architecture.md)** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the link to the documentation list later in the README
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the architecture documentation link to the documentation list later in the README as requested (commit 0ebaa1f).
|
||
The following diagram illustrates the complete architecture including user interaction flow, application components, and Azure services: | ||
|
||
```mermaid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error:
Parse error on line 25:
...ddings
- GPT-4V (optional)]
-----------------------^
Expecting 'SQE', 'DOUBLECIRCLEEND', 'PE', '-)', 'STADIUMEND', 'SUBROUTINEEND', 'PIPE', 'CYLINDEREND', 'DIAMOND_STOP', 'TAGEND', 'TRAPEND', 'INVTRAPEND', 'UNICODE_TEXT', 'TEXT', 'TAGSTART', got 'PS'
For more information, see https://docs.github.com/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-mermaid-diagrams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the Mermaid diagram parse error by removing the problematic vision approaches syntax. The diagram should now render correctly (commit 0ebaa1f).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still says--
Unable to render rich display
Parse error on line 24:
...ddings
- GPT-4V (optional)]
-----------------------^
Expecting 'SQE', 'DOUBLECIRCLEEND', 'PE', '-)', 'STADIUMEND', 'SUBROUTINEEND', 'PIPE', 'CYLINDEREND', 'DIAMOND_STOP', 'TAGEND', 'TRAPEND', 'INVTRAPEND', 'UNICODE_TEXT', 'TEXT', 'TAGSTART', got 'PS'
For more information, see https://docs.github.com/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-mermaid-diagrams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the Mermaid parse error by removing parentheses from the GPT-4V text. Changed "GPT-4V (optional)" to "GPT-4 Vision" to resolve the syntax issue (commit a7bd26d).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still error'ing
Parse error on line 27:
...Azure AI Vision
(optional)]
-----------------------^
Expecting 'SQE', 'DOUBLECIRCLEEND', 'PE', '-)', 'STADIUMEND', 'SUBROUTINEEND', 'PIPE', 'CYLINDEREND', 'DIAMOND_STOP', 'TAGEND', 'TRAPEND', 'INVTRAPEND', 'UNICODE_TEXT', 'TEXT', 'TAGSTART', got 'PS'
For more information, see https://docs.github.com/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-mermaid-diagrams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Fix mermaid parse error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the Mermaid parse error by removing parentheses from the optional service labels. Changed "(optional)" to "optional" for Azure AI Vision, Azure Speech Services, and Azure Cosmos DB (commit 7e033d7).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the Mermaid parse error by removing dashes from node labels throughout the diagram. The issue was caused by the dash characters (-
) within the node text, which Mermaid was interpreting as syntax elements rather than display text (commit 7e9761e).
docs/architecture.md
Outdated
@@ -0,0 +1,200 @@ | |||
# Application Architecture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Application Architecture | |
# RAG Chat: Application Architecture |
All documents use "RAG Chat" as prefix in title, I believe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the title to "RAG Chat: Application Architecture" to match the pattern used in other documents (commit 0ebaa1f).
docs/architecture.md
Outdated
|
||
This document provides a detailed architectural overview of the Azure Search OpenAI demo application using Mermaid diagrams. | ||
|
||
## Overview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine Overview with intro sentence, remove mention of Mermaid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link back to README as well, for people who find this that want to get started with the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combined the Overview with the intro sentence, removed mention of Mermaid, and added a link back to README as requested (commit 0ebaa1f).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link back to README for people who find this document and want to get started with the repo (commit 0ebaa1f).
docs/architecture.md
Outdated
OpenAI[🤖 Azure OpenAI<br/>- GPT-4 Mini<br/>- Text Embeddings<br/>- GPT-4V (optional)] | ||
Search[🔍 Azure AI Search<br/>- Vector Search<br/>- Semantic Ranking<br/>- Full-text Search] | ||
DocIntel[📄 Azure Document<br/>Intelligence<br/>- Text Extraction<br/>- Layout Analysis] | ||
Vision2[👁️ Azure Computer Vision<br/>(optional)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename "Azure Computer Vision" to "Azure AI Vision"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed "Azure Computer Vision" to "Azure AI Vision" in the diagram (commit 0ebaa1f).
docs/architecture.md
Outdated
- **Approach Patterns**: Different strategies for processing queries | ||
- `ChatReadRetrieveRead`: Multi-turn conversation with retrieval | ||
- `RetrieveThenRead`: Single-turn Q&A with retrieval | ||
- `Vision Approaches`: Support for image-based documents |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove "Vision Approaches" as they're going away soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed "Vision Approaches" from both the diagram and documentation as they're going away soon (commit 0ebaa1f).
docs/architecture.md
Outdated
|
||
### Backend (Python) | ||
|
||
- **API Layer**: RESTful endpoints for chat, search, and configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to HTTP protocol doc here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link to the HTTP protocol documentation in the Backend section (commit 0ebaa1f).
docs/architecture.md
Outdated
- **Azure OpenAI**: Powers the conversational AI capabilities | ||
- **Azure AI Search**: Provides semantic and vector search over documents | ||
- **Azure Blob Storage**: Stores original documents and processed content | ||
- **Azure Container Apps**: Hosts the application with automatic scaling |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove Container Apps from this list since its below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed Container Apps from the Azure Services Integration list since it's mentioned separately in the Deployment Options section (commit 0ebaa1f).
docs/architecture.md
Outdated
|
||
## Optional Features | ||
|
||
The architecture supports several optional features that can be enabled: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the guide about optional features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link to the optional features guide in the Optional Features section (commit 0ebaa1f).
docs/architecture.md
Outdated
The application can be deployed using: | ||
|
||
- **Azure Container Apps** (default): Serverless container hosting | ||
- **Azure App Service**: Traditional PaaS hosting option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to doc about app service hosting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added link to the App Service hosting guide in the Deployment Options section (commit 0ebaa1f).
Co-authored-by: pamelafox <[email protected]>
README.md
Outdated
- [Sharing deployment environments](docs/sharing_environments.md) | ||
- [Local development](docs/localdev.md) | ||
- [Customizing the app](docs/customization.md) | ||
- **[Architecture documentation with interactive diagrams](docs/architecture.md)** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't bold it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed bold formatting from the architecture link in the documentation list (commit a7bd26d).
docs/architecture.md
Outdated
@@ -0,0 +1,190 @@ | |||
# RAG Chat: Application Architecture | |||
|
|||
This document provides a detailed architectural overview of the Azure Search OpenAI demo application. The Azure Search OpenAI demo is a Retrieval Augmented Generation (RAG) application that creates a ChatGPT-like experience over your own documents. It combines Azure OpenAI Service for AI capabilities with Azure AI Search for document indexing and retrieval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This document provides a detailed architectural overview of the Azure Search OpenAI demo application. The Azure Search OpenAI demo is a Retrieval Augmented Generation (RAG) application that creates a ChatGPT-like experience over your own documents. It combines Azure OpenAI Service for AI capabilities with Azure AI Search for document indexing and retrieval. | |
This document provides a detailed architectural overview of this application, a Retrieval Augmented Generation (RAG) application that creates a ChatGPT-like experience over your own documents. It combines Azure OpenAI Service for AI capabilities with Azure AI Search for document indexing and retrieval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the intro text to be more concise and focused on "this application" (commit a7bd26d).
|
||
The following diagram illustrates the complete architecture including user interaction flow, application components, and Azure services: | ||
|
||
```mermaid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still says--
Unable to render rich display
Parse error on line 24:
...ddings
- GPT-4V (optional)]
-----------------------^
Expecting 'SQE', 'DOUBLECIRCLEEND', 'PE', '-)', 'STADIUMEND', 'SUBROUTINEEND', 'PIPE', 'CYLINDEREND', 'DIAMOND_STOP', 'TAGEND', 'TRAPEND', 'INVTRAPEND', 'UNICODE_TEXT', 'TEXT', 'TAGSTART', got 'PS'
For more information, see https://docs.github.com/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-mermaid-diagrams
Co-authored-by: pamelafox <[email protected]>
… labels Co-authored-by: pamelafox <[email protected]>
Co-authored-by: pamelafox <[email protected]>
…entation (Azure-Samples#2653) * Initial plan * Add comprehensive Mermaid architecture diagrams and documentation Co-authored-by: pamelafox <[email protected]> * Move Architecture Overview link to list above HTTP Protocol Co-authored-by: pamelafox <[email protected]> * Address PR feedback: fix Mermaid syntax, update architecture docs Co-authored-by: pamelafox <[email protected]> * Fix formatting and Mermaid syntax issues per PR feedback Co-authored-by: pamelafox <[email protected]> * Update README.md * Update docs/README.md * Fix Mermaid parse error by removing parentheses from optional service labels Co-authored-by: pamelafox <[email protected]> * Fix Mermaid parse error by removing dashes from node labels Co-authored-by: pamelafox <[email protected]> --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: pamelafox <[email protected]> Co-authored-by: Pamela Fox <[email protected]>
This PR adds detailed Mermaid diagrams to visualize the architecture of the Azure Search OpenAI demo application, providing a maintainable and version-controlled alternative to static PNG diagrams.
Changes Made
New Architecture Documentation (
docs/architecture.md
)Created comprehensive documentation with three detailed Mermaid diagrams:
Main Architecture Diagram - Shows the complete system architecture including:
Chat Query Flow - Sequence diagram illustrating:
Document Ingestion Flow - Sequence diagram showing:
Updated Documentation Links
Diagram Syntax Fixes
Benefits
The diagrams complement the existing PNG architecture image by providing detailed, interactive visualizations that can evolve with the codebase.
Fixes #2598.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.