For pharmaceutical giants like Sun Pharma, fast and accurate data insights are key to driving sales performance. But with fragmented systems, relational databases, and manual reporting processes, extracting real-time intelligence was tedious and complex. Sun Pharma partnered with GoML to build an AI sales analytics assistant using OpenAI and Autogen for their sales and business teams.
The problem: manual queries and delayed decisions for sales analytics
Sun Pharma’s teams relied heavily on manual processes to retrieve data from relational databases. Extracting insights on sales performance, stock levels, and field agent effectiveness required SQL expertise and time-consuming workflows.
Business users couldn’t intuitively ask questions like, “How did last quarter’s sales compare across regions?” or “What’s the current inventory level by state?” Instead, they waited days for analysts to prepare custom visualisations and reports.
The absence of a natural language interface, real-time visualizations, or a lightweight graphing tool made agile decision-making nearly impossible, slowing down strategy execution and field coordination.
The solution: AI sales analytics agents for self-serve data exploration
GoML built a solution for Sun Pharma using Microsoft Autogen, OpenAI’s GPT-4, and a modular multi-agent framework. The result: an AI sales assistant that enabled conversational queries for complex sales data using plain English, instantly visualized and contextualized.
“This wasn’t just about replacing dashboards. It was about enabling faster decisions by removing friction between users and data,” says Prashanna Rao, Head of Engineering, GoML.
AI sales analytics agents for every step of the query journey
- Conversational agent: Built using OpenAI and Autogen, it interprets natural language queries and routes them to the right AI agents.
- Query agent: Translates business questions into SQL for querying structured sales and inventory data stored in PostgreSQL.
- Analysis agent: Converts raw results into meaningful summaries and sales insights.
- Visualization agent: Generates automated charts and data views using Streamlit and PyGWalker, without needing full dashboard builds.
Powered by OpenAI + Autogen on Azure
- Language intelligence: GPT-4, accessed via Microsoft Autogen, powers query understanding and collaboration between agents.
- Visualization stack: Streamlit + Pygwalker deliver instant graph generation.
- Database integration: PostgreSQL powers high-performance data access.
- Multi-agent framework: Modular agents allow scalable orchestration of tasks across query, analysis, and visualization layers.
Scalable architecture across cloud-native components
- Data ingestion: API Gateway, AWS Glue, and Python preprocessing pipelines.
- Data enrichment: Feature engineering + embeddings via SageMaker.
- Knowledge layer: Embedding vectors stored in StackCloud (Vector DB) for context-aware querying.
- LLM orchestration: AWS Bedrock integrates RAG workflows and prompt tuning via Lambda functions.
- BI tools: QuickSight provides deeper analytical reporting for power users.
- CI/CD ready: Full deployment and update pipeline via AWS CodePipeline.
The impact: faster sales decisions with AI sales analytics agents
Sun Pharma’s sales and operations teams now ask questions in natural language and get answers instantly. Data access no longer requires SQL knowledge or analyst intervention.
“With GoML’s GenAI system, we’ve made our data truly self-service. Sales leaders now act on insights in seconds, not days,” said a senior leader from Sun Pharma.
This AI sales assistant system not only saved time; it changed how Sun Pharma’s sales force engages with performance metrics and operational data.
- 70% reduction in manual effort: Automated analysis and visualization replace spreadsheet-based workflows.
- 80% simplified data consumption: Lightweight charting and smart summaries reduce the need for full BI dashboards.

Lessons for data-rich enterprises
- Self-service doesn’t mean more dashboards; it means removing blockers to insight.
- Conversational AI in pharma can unlock values hidden in relational databases.
- Real-time charting without a BI tool makes sales and ops agile.
Advice for sales and distribution teams
- Identify repeat insight queries, those are prime for automation.
- Use modular agents to scale intelligence across departments.
- Pair LLMs with robust governance and embedding models for precision.
Looking to make your enterprise data talk back?
Let GoML help you build an AI in pharma solution that turns business questions into insights instantly, securely, and at scale.