# retkowsky/azure-openai-demos architecture

> Architecture diagram of the GitHub repository retkowsky/azure-openai-demos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-06-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/retkowsky/azure-openai-demos
- Repository: https://github.com/retkowsky/azure-openai-demos

## Overview

##### Project Type and Purpose
– This repository is an open-source demo toolkit (“Azure AI Foundry GenAI demos”) comprised of Jupyter Notebooks illustrating dozens of Azure AI scenarios: OpenAI completions & embeddings, RAG patterns with Azure Cognitive Search, Document Intelligence, Speech Services, Computer Vision, multi-agent orchestration, SORA integrations, etc.
– It is not a monolithic application but a collection of modular demos that each read data (PDFs, audio, video, CSVs), load environment settings (azure.env), call one or more Azure services via REST/SDK, and write results locally.

##### File Structure Analysis
– Top-level: one folder per demo use case (e.g., “AI podcast generation”, “Agentic RAG”, “Autogen”, “sora”, “Neo4j”, etc.).
– Each demo folder contains:
- A Jupyter Notebook (.ipynb) implementing the scenario
- An azure.env file storing connection strings/keys for Azure services
- Example input assets (documents/, audio/, video/, data/)
- Optional output subfolders (outputs/, results/)
– A single README.md at the root provides an index of demos, feature descriptions, links, and new-content announcements.

##### Key Insights from README
– The README emphasizes that these are Azure AI Foundry / OpenAI Studio demos, organized by scenario, and uses services such as:
- Azure OpenAI (GPT-4, GPT-4o, GPT-4 Turbo, o-mini, o1, o3, phi-3 vision)
- Azure Cognitive Search (vector store)
- Azure Document Intelligence (Form Recognizer)
- Azure Speech Services (Speech-to-Text, Text-to-Speech, Whisper)
- Azure Computer Vision
- Azure AI Agent Service, AutoGen, SORA integrations

a. Main Components
- Developer Environment: Jupyter Notebook host (local or online) + VS Code + azure.env files
- GitHub Repository: version control of notebooks, configs, assets
- Azure AI Foundry / OpenAI Studio UI (portal for monitoring & management)
- Azure Services:
– Azure OpenAI Service (completions, chat, embeddings, fine-tuning)
– Azure Cognitive Search (indexing, vector search)
– Azure Document Intelligence Service
– Azure Speech Services (Transcription & Synthesis)
– Azure Computer Vision Service
– Azure AI Agent Service / AutoGen
– SORA integration service
- External Data Assets: PDFs, images, audio, video, CSVs in each demo folder
- Local Output Storage: outputs/, results/, generated media files

b. Relationships and Interactions
- Developer Environment loads azure.env → initializes Azure credentials
- Jupyter Notebook code → calls Azure OpenAI SDK/REST → OpenAI endpoints
- Notebooks optionally call:
– Azure Cognitive Search for retrieval (RAG patterns)
– Document Intelligence for form/document parsing
– Speech Services for transcription/synthesis
– Computer Vision for image analysis
– AI Agent Service or AutoGen orchestration endpoints
– SORA extension APIs for video→video or image→video transforms
- Azure services return JSON/media → Notebook writes to outputs/ local folder

c. Architectural Patterns
- Modular “demo per folder” pattern: each is a self-contained pipeline
- RAG pattern: Document Intelligence or Cognitive Search feed LLM
- Agent orchestration: Azure AI Agent Service / AutoGen multi-agent flows
- SDK/REST-based integration: environment-configured clients invoke Azure endpoints

d. Key Technologies
- Python & Jupyter
- Azure SDKs (azure-ai-openai, azure-search-documents, azure-ai-formrecognizer, azure-ai-speech, azure-ai-vision)
- Environment variable management (azure.env)
- GitHub for source control
- Azure AI Foundry / Studio for service provisioning & monitoring

##### Detail Balance
– Capture every critical integration (each Azure API called) but avoid over-splitting notebooks themselves.
– Represent azure.env as a single “Credentials & Configuration” component supplying secrets to all demo pipelines.
– Optionally, annotate common code patterns (e.g., “load env → init client → call endpoint → parse response”).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Environment
    subgraph "Developer Environment" 
        direction TB
        JN["Jupyter Notebook Host"]:::dev
        REPO["GitHub Repository (README.md)"]:::dev
        ENV["Credentials & Configuration (azure.env)"]:::dev
    end

    %% Data Assets
    subgraph "External Data Assets" 
        direction TB
        DOCS["Documents (PDFs)"]:::data
        AUDIO_IN["Audio Files"]:::data
        VIDEO_IN["Video Files"]:::data
        CSV_IN["CSV / Excel Files"]:::data
    end

    %% Azure Services
    subgraph "Azure Services" 
        direction TB
        AOAI["Azure OpenAI Service"]:::azure
        ACS["Azure Cognitive Search (Vector Store)"]:::azure
        ADI["Azure Document Intelligence"]:::azure
        ASPEECH["Azure Speech Services"]:::azure
        ACV["Azure Computer Vision"]:::azure
        AAGENT["Azure AI Agent Service / AutoGen"]:::azure
        SORA["SORA Integration Service"]:::azure
    end

    %% Outputs
    subgraph "Local Output Storage" 
        direction TB
        OUT_MEDIA["Generated Media Files"]:::out
        OUT_JSON["Results (JSON, Text)"]:::out
    end

    %% Interactions
    JN -->|pull code| REPO
    JN -->|load credentials| ENV
    JN -->|read data| DOCS
    JN -->|read data| AUDIO_IN
    JN -->|read data| VIDEO_IN
    JN -->|read data| CSV_IN

    JN -->|calls| AOAI
    JN -->|calls| ACS
    JN -->|calls| ADI
    JN -->|calls| ASPEECH
    JN -->|calls| ACV
    JN -->|calls| AAGENT
    JN -->|calls| SORA

    AOAI -->|response| JN
    ACS -->|response| JN
    ADI -->|response| JN
    ASPEECH -->|response| JN
    ACV -->|response| JN
    AAGENT -->|response| JN
    SORA -->|response| JN

    JN -->|writes| OUT_MEDIA
    JN -->|writes| OUT_JSON

    %% Click Events
    click REPO "https://github.com/retkowsky/azure-openai-demos/blob/main/README.md"
    click ENV "https://github.com/retkowsky/azure-openai-demos/blob/main/AI podcast generation/azure.env"
    click ENV "https://github.com/retkowsky/azure-openai-demos/blob/main/Autogen/azure.env"
    click ENV "https://github.com/retkowsky/azure-openai-demos/blob/main/Azure Open AI quick demos/azure.env"
    click AOAI "https://github.com/retkowsky/azure-openai-demos/blob/main/Azure Open AI quick demos/Azure Open AI - Demo 1 Prompt Engineering.ipynb"
    click AOAI "https://github.com/retkowsky/azure-openai-demos/blob/main/Azure OpenAI audio generation/Azure OpenAI Gpt4o Audio.ipynb"
    click AOAI "https://github.com/retkowsky/azure-openai-demos/blob/main/GPT4/Azure Open AI GPT4.ipynb"
    click AOAI "https://github.com/retkowsky/azure-openai-demos/blob/main/o1/Azure OpenAI o1 mini examples.ipynb"
    click AOAI "https://github.com/retkowsky/azure-openai-demos/blob/main/phi-3 vision/Phi3-Vision.ipynb"
    click ACS "https://github.com/retkowsky/azure-openai-demos/blob/main/Azure Cognitive Search Vector Search Code Sample with Azure OpenAI/Azure Cognitive Search Vector Search Code Sample with Azure OpenAI.ipynb"
    click ACS "https://github.com/retkowsky/azure-openai-demos/blob/main/Code analysis with Langchain + Azure OpenAI + Azure Cognitive Search (vector store)/Code analysis with Langchain + Azure OpenAI + Azure Cognitive Search (vector store).ipynb"
    click ADI "https://github.com/retkowsky/azure-openai-demos/blob/main/RAG with Azure Document Intelligence and Azure OpenAI/Images analysis with Azure Document Intelligence and Azure OpenAI gpt-4o mini.ipynb"
    click ADI "https://github.com/retkowsky/azure-openai-demos/blob/main/RAG with Azure Document Intelligence and Azure OpenAI/azure.env"
    click ASPEECH "https://github.com/retkowsky/azure-openai-demos/blob/main/Analyse audio meeting notes with Azure Open AI and Azure Speech Services/Perform an analysis of audio meeting notes using Azure Open AI in conjunction with Azure Speech Services.ipynb"
    click ASPEECH "https://github.com/retkowsky/azure-openai-demos/blob/main/Speech to text with Whisper/Speech to Text with Azure Open AI Whisper.ipynb"
    click ASPEECH "https://github.com/retkowsky/azure-openai-demos/blob/main/Azure Open AI quick demos/Azure Open AI - Demo 4 Speech summarizing.ipynb"
    click ACV "https://github.com/retkowsky/azure-openai-demos/blob/main/Image to Image/Image to image with Azure Computer Vision and Azure Open AI.ipynb"
    click ACV "https://github.com/retkowsky/azure-openai-demos/blob/main/Azure Computer Vision and Langchain/Azure Computer Vision and Lainchain.ipynb"
    click ACV "https://github.com/retkowsky/azure-openai-demos/blob/main/Artificial images with Dall-e 2/Image to image with Azure Computer Vision and Azure Open AI for Dall e 2.ipynb"
    click AAGENT "https://github.com/retkowsky/azure-openai-demos/blob/main/Autogen/0 AutoGen - Settings.ipynb"
    click AAGENT "https://github.com/retkowsky/azure-openai-demos/blob/main/Azure Agent Service/1 Azure AI Agent service - Single agent.ipynb"
    click AAGENT "https://github.com/retkowsky/azure-openai-demos/blob/main/Azure Agent Service/azure.env"
    click AAGENT "https://github.com/retkowsky/azure-openai-demos/blob/main/Azure Agent Service/cu/content_understanding_tool.py"
    click SORA "https://github.com/retkowsky/azure-openai-demos/blob/main/sora/Image to Video with gpt4o and SORA.ipynb"
    click SORA "https://github.com/retkowsky/azure-openai-demos/blob/main/sora/Video to Video with gpt4o and SORA.ipynb"
    click SORA "https://github.com/retkowsky/azure-openai-demos/blob/main/sora/azure.env"

    %% Styles
    classDef dev fill:#ccffcc,stroke:#339933,color:#000;
    classDef azure fill:#cce5ff,stroke:#3399ff,color:#000;
    classDef data fill:#ffe5cc,stroke:#ff9933,color:#000;
    classDef out fill:#e0e0e0,stroke:#888888,color:#000;
```
