How ravikiran10jan/dealsense-ai works
Project type and purpose
• This is a full-stack, cloud-native AI application (“DealSense AI – Sales Assist Agent”) built to ingest meeting notes, process them through a Retrieval-Augmented Generation (RAG) pipeline, and present insights to sales reps via a web UI/Teams tab.
• The README’s “Architecture Overview” table maps each pipeline step to Azure services, confirming a serverless + containerized design on Azure, with a React-based front end.
File structure
• Top level:
• backend/ ← Python code for ingestion, vector store, LLM orchestration, HTTP API
• ui/seller_panel/← React/Vite UI served as Static Web App or Teams tab
• infra/terraform/← IaC definitions (Azure resources)
• docs/ ← Architecture and run instructions
• requirements.txt ← Python dependencies
• backend/ subdirectories:
• ingestion/ ← PPTX/text loaders, chunker, vector store client
• llm/ ← LLM client, answer logic
• orchestration/ ← Hybrid RAG answer orchestration
• retrieval/ ← Semantic & web search modules
• vector_store/ ← Local FAISS store (for mock/testing)
• data/ ← Sample docs, transcripts
• api.py, main.py ← Entrypoints for Azure Function/API Web App
• ui/seller_panel/: React components arranged by feature (BeforeCall, DuringCall, AfterCall, ChatPanel), with a Node-based dev server (server.js) and static build (index.html).
Verify README insights
• Explicit Azure service mapping:
• SharePoint input → MS Graph API
• Timer-triggered ingestion → Azure Function
• Raw storage → Azure Blob
• Sanitization & chunking → Azure Container App in VNet
• Embeddings + Vector DB → Azure OpenAI + Azure Cognitive Search (vector index)
• RAG retrieval → Azure Function or API App
• Reasoning → Azure OpenAI GPT-4.x
• UI → Static Web App or Teams tab
• Write-back → Graph API → SharePoint
• Confirms a decoupled, serverless event-driven pipeline with isolated processing stages.
Components and their relationships
a. Main components:
1. Client/UI (React Static Web App / Teams Tab)
2. API Layer (Azure Function / API App – “backend/api.py”)
3. Ingestion Pipeline:
• SharePoint connector (Graph API call)
• Blob Storage (raw docs)
• Sanitization container (PII removal)
• Chunking & vector store loader
4. Vector Store (Azure Cognitive Search vector index)
5. RAG Orchestrator (Azure Function / orchestration/hybrid_answer.py)
6. LLM Service (Azure OpenAI GPT & Embeddings)
7. Post-call services (MoM generator + SharePoint writer)
8. Terraform Infra (defines all Azure resources)
b. Interactions & data flow:
• UI ↔ API Layer: user requests, chat messages, configuration
• API → Ingestion trigger (on schedule or manual): fetch docs, push to Blob
• Blob → Container App (sanitization & chunking) → calls Embedding API → stores vectors
• API / RAG Orchestrator → queries Vector Store → invokes Azure OpenAI → aggregates responses
• MoM Gen → writes back via Graph API
c. Architectural patterns:
• Serverless functions for stateless logic (Ingestion, Retrieval)
• Containerized micro-service for heavy processing (PII redaction, chunking)
• Event-driven pipelines: Blob triggers or timer triggers
• RAG pattern: vector search + LLM prompt chaining
• Clear separation of concerns between ingestion, storage, retrieval, reasoning, and UI.
d. Key technologies:
• Python Azure Functions & Container Apps
• Azure Blob Storage, Azure Cognitive Search (vector)
• Azure OpenAI (Embeddings + GPT-4.x)
• React + Vite for UI
• Terraform for IaC
• FAISS (local test store)
Detailed breakdown
2. Ingestion Function → “Raw Blob Storage”
5. Post-call MoM: API Function → “MoM Generator” → “Graph API → SharePoint”
6. At bottom: “Terraform” block managing all Azure resources