Design AI System for Customer Sentiments Analysis with Agentic Bot

Rosalina5 221 Reputation points
2025-07-09T16:12:26.1833333+00:00

Hello,

Please help me designing Enterprise level Production Grade real time Sentiments Analytics system with Bot Capabilities.

May someone please share how to architect such system in Azure.

  1. Infrastructure on Azure
  2. Data Pipeline
  3. Model Training
  4. Model Testing
  5. Choosing Best Model
  6. Model Deployment
  7. Model Consumtion

Source : Clickstream, Amazon, Facebook and Twitter

Please share your expertise on how to design from Data to AI to Model Deployment.

Do we also need Vector DB.

Please help.

Thanks a lot

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

0 comments No comments

Answer accepted by question author
Amira Bedhiafi 41,346 Reputation points MVP Volunteer Moderator
2025-07-10T17:42:43.06+00:00

Hello Rosalina !

Thank you for posting on Microsoft Learn.

A production-grade Azure-based sentiment analysis system with bot integration typically includes 6 major steps :

  • Data Ingestion Layer: Azure Event Hubs, Azure IoT Hub, or Azure Data Factory for real-time/stream data from Clickstream, Facebook, Amazon, and Twitter.

Processing Layer: Azure Stream Analytics or Azure Databricks to clean, enrich, and transform data.

Storage Layer: Azure Data Lake or Azure Blob Storage to store raw and processed data.

Model Training & Testing: Azure Machine Learning for building, tracking, and comparing models.

Model Serving: Azure Kubernetes Service (AKS) or Azure Container Apps for scalable model inference.

Bot Layer: Azure Bot Service integrated with Azure OpenAI for real-time response generation.

Monitoring: Azure Monitor, Application Insights, and Log Analytics for observability.

For streaming data from Twitter, Facebook, Amazon, and Clickstream, you can use Azure Event Hubs for ingestion and for APIs (like Facebook/Twitter), you can use Azure Functions or Logic Apps.

Azure Stream Analytics or Apache Spark in Databricks will help you filter, transform, and enrich data in real-time and you can use Azure Data Lake Gen2 to store it or a Cosmos DB if you're aiming for near-instant consumption.

How to train and evaluate the best sentiment analysis model?

You can start with Azure Machine Learning to manage training workflows, experiment tracking, and hyperparameter tuning.

You can work with pretrained sentiment models (like Azure OpenAI GPT or HuggingFace BERT) and fine-tune them on your domain-specific data.

Use MLflow (integrated in AML) to compare runs, metrics, and select the best-performing model where you can split your data: 70% training, 15% validation, 15% testing.

How to deploy and serve the model?

You can use AML endpoints (real-time or batch) or package the model in a Docker container and deploy to:

  • Azure Kubernetes Service (AKS) for high-scale, high-availability inference
  • Azure Container Apps for simpler managed deployment
  • Implement CI/CD pipelines via GitHub Actions or Azure DevOps to automate deployment from model registry to production

How will the bot interact with the sentiment model?

You can build a bot using Azure Bot Framework, hosted in Azure Bot Service.

The bot invokes your sentiment analysis model endpoint with the user input.

Based on the model’s output (positive/negative/neutral), the bot responds with appropriate pre-scripted or generative responses (possibly using Azure OpenAI GPT-4).

Is a vector database needed? You may need a Vector DB such as Azure AI Search with vector indexing, Pinecone, or Weaviate if:

  • You want to store and retrieve semantically similar messages or conversation history using embeddings.
  • You use embedding models (e.g., from Azure OpenAI) for semantic search, summarization, or RAG (Retrieval-Augmented Generation) to improve bot responses.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.