An AI Analytics Copilot for Corporate Retail Analytics

How do you build one AI copilot that searches corporate knowledge, plugs into a code assistant, and checks its own answers against live data?

Azati built an AI analytics copilot for a retail analytics team, combining a custom hybrid retrieval approach over corporate analytics knowledge, an MCP server connecting the system to the client's Cursor code assistant, and an SQL execution layer that checks answers directly against the client's own data environment.

The copilot is now used by 25+ analysts across multiple business domains, up from zero users on the AI-built prototype it replaced, with a benchmark repository driving continuous retrieval quality improvement.

Ask us about your analytics AI roadmap
25+

analysts using the copilot daily across multiple business domains

Full-word to semantic

search upgraded from literal keyword matching to context-aware retrieval

4

integrated components: semantic search, MCP server, SQL execution, and a benchmark repository

Technologies used

Python
Python
FastAPI
FastAPI
FastMCP
FastMCP
OpenAI API
OpenAI API
GreenPlum
GreenPlum
ClickHouse
ClickHouse
MS SQL
MS SQL
LangFuse
LangFuse

The project’s specifics

A retail analytics team spread across multiple business domains needed one system that could do three different things well: search corporate analytics knowledge by meaning when nobody remembers a document’s exact wording, give a code assistant direct access to that same knowledge, and let an analyst or an agent check a hypothesis against real production data.

An earlier prototype had already tried. It was assembled with AI assistance, then kept on life support, and it had zero users. Full-word matching meant an analyst searching for one phrasing got nothing when the document used another, answers were slow to come back, and nothing was instrumented, so there was no way to tell whether any change made things better.

Azati rebuilt the system around a custom hybrid retrieval approach that combines Okapi BM25 keyword ranking with semantic embeddings and purpose-built ranking models tuned to the client’s own analytics data, so a query matches intent as well as exact phrasing. An MCP server connects the client’s Cursor-based code assistant directly to the analytics knowledge base, and an SQL execution layer runs an agent’s queries inside the client’s own data environment, so answers trace back to real data. A benchmark repository tracks retrieval quality as the platform keeps expanding to new domains.

What made building this platform harder than a single search feature

Challenge 01

Retrieval had to earn trust before anything else could

An unused tool isn’t a head start, it’s a credibility problem. Analysts had already decided the previous version wasn’t worth their time, which meant the rebuilt version had to earn adoption from scratch:

  • No existing user base willing to tolerate rough edges during a rebuild
  • No baseline metrics from the prototype to measure improvement against
  • Full-word search failures analysts had already learned to route around
#1
Challenge 02

Retrieval had to work across genuinely different analytics domains

Fifty-plus analysts spread across multiple business domains don’t ask questions the same way, and a retrieval system tuned for one domain’s vocabulary can quietly fail for another:

  • Domain-specific terminology varying across business areas
  • Hybrid search needing to balance exact keyword matches with semantic intent
  • No single domain’s data representative enough to tune against alone
#2
Challenge 03

Search answers needed to be checkable

A semantic search result that reads convincingly but can’t be verified against real data doesn’t help an analyst make a decision, the same problem Azati writes about in fixing broken LLM pipelines for measurable results:

  • SQL execution needing to run inside the client’s own data environment
  • Agent-generated queries requiring fast turnaround for hypothesis testing
  • Results that trace back to real query output, not to a model’s approximation of one
#3
Challenge 04

Proprietary infrastructure, no shortcuts around it

The system had to run entirely inside the client’s own environment, using the client’s own data stores, which meant every architectural decision had to work within constraints that weren’t negotiable:

  • GreenPlum, ClickHouse, and MS SQL as the existing data landscape, not a clean slate
  • Proprietary infrastructure with no external cloud fallback
  • Integration work happening inside systems Azati didn’t build and couldn’t redesign
#4

What actually makes an analytics copilot get used

A retrieval approach built for this client’s data, not off the shelf

Rather than wiring up a stock vector database and calling it semantic search, Azati developed a custom retrieval approach for the client’s analytics corpus, including purpose-built ranking models tuned to how that data is structured and how analysts query it. That work is what separates a search box that returns something from one that returns the right thing.

A retrieval approach built for how analysts search

Combining Okapi BM25 keyword ranking with semantic embeddings was a direct response to why the original search failed: analysts don’t always know the exact words a document uses, but they know what they mean. Hybrid retrieval closes that gap while keeping precision on the exact terms that do matter: report names, internal metric names, product identifiers.

A benchmark repository so quality keeps moving

Search quality isn’t something you ship and walk away from. Building a benchmark repository into the system from the start means every change to retrieval can be measured against the last one. Without it, the team is judging search quality by anecdote.

One embedded engineer, full ownership of the rebuild

This wasn’t a handoff between specialists. One ML engineer owned retrieval architecture, the MCP server, the SQL execution layer, the benchmark repository, and the project roadmap, which kept decisions across those pieces consistent.

Building AI tools your team still has to trust with real decisions?

We build retrieval, code assistant integration, and data verification as one connected system, not three separate tools bolted together. Tell us what your analytics team actually needs.

Ask us about your analytics AI roadmap

What the copilot is built from

Four pieces, each solving a distinct part of how analysts actually work with data.

01

Semantic API over corporate analytics knowledge

The core of the system: a semantic API that holds the client’s analytics knowledge and searches it by meaning rather than exact wording. This is what replaced the original full-word matching that analysts had learned not to trust.

Hybrid retrieval combines Okapi BM25 keyword ranking with semantic embedding search, scoring both signals for every query. It keeps the precision on exact terminology that pure vector search loses, while capturing the intent that pure keyword search misses.

Key capabilities:
  • Custom hybrid retrieval combining Okapi BM25 ranking with semantic embeddings
  • Purpose-built ranking models tuned to the client’s analytics data
  • Context-aware search over corporate analytics knowledge
  • Foundation layer for every other module in the system
02

MCP server for code-assisted access

An MCP server connects the client’s Cursor code assistant directly to the analytics knowledge base, so developers and analysts working inside their existing coding tools can query the same retrieval layer without switching context.

An MCP (Model Context Protocol) server exposes tools and data sources to an AI assistant through a standard interface, so the assistant can call them without custom integration code.

Key capabilities:
  • FastMCP-based server implementation
  • Direct integration with the client’s Cursor-based workflow
  • Shared retrieval layer across search and code-assisted workflows
03

SQL execution for hypothesis testing

An execution layer that runs an agent’s SQL directly inside the client’s data environment, letting a hypothesis get checked against real numbers in the same session that produced the question.

Key capabilities:
  • Direct SQL execution inside the client’s own data environment
  • Fast turnaround for agent-generated hypothesis testing
  • Results traceable back to real query output
04

Benchmark repository for continuous improvement

A repository built specifically to track retrieval quality over time, so every change to the system can be measured against a known baseline.

Key capabilities:
  • Structured benchmark tracking for retrieval quality
  • Baseline comparison across iterative improvements
  • Analyst feedback mechanisms feeding back into retrieval tuning

What Azati built

AreaAzati contribution
RetrievalRebuilt search from full-word matching to a custom hybrid approach combining Okapi BM25 and semantic retrieval, with purpose-built ranking models
Code assistant integrationBuilt an MCP server connecting the analytics knowledge base to the client’s Cursor code assistant
Hypothesis testingBuilt an SQL execution layer running agent queries inside the client’s data environment
Quality trackingBuilt a benchmark repository for iterative retrieval quality improvement
ArchitectureBroke the original prototype into microservices and modules, and defined a staged improvement roadmap for the whole project
Feedback mechanismsAdded analyst feedback capture and GitLab integration

Security

The system runs entirely inside the client’s proprietary infrastructure, with no external cloud dependency. SQL execution runs inside the client’s own data environment, using the client’s existing access paths.

Team composition

One engineer embedded directly with the client’s analytics team, owning the platform end to end from architecture through ongoing iteration.

  • ML Engineer / Backend Developer responsible for retrieval architecture, the MCP server, the SQL execution layer, the benchmark repository, and the overall project roadmap, working with the client’s analytics team since March 2026.

How the engagement was delivered

Kanban, ongoing since March 2026

The engagement runs on Kanban, with no fixed end date. The team started with an initial MVP assembled from the original system’s pieces, then broke it into microservices and modules, with retrieval rebuilt as the first priority ahead of new feature work.

Architecture staged deliberately, not shipped all at once

Each phase followed a documented plan rather than reacting to whatever came up next. The SQL execution module, analyst feedback mechanisms and GitLab integration were added as the system matured, once the retrieval layer was stable.

Results, stated honestly

From zero users to 25+, across domains that don’t share vocabulary

The clearest measure of whether this rebuild worked isn’t a retrieval accuracy score, it’s that analysts who ignored the previous version now use this one, across multiple business domains with genuinely different terminology.

Full-word search became a search that understands intent

Analysts no longer need to guess the exact phrase a document used. Hybrid retrieval matches on meaning as well as exact terms, which is the difference between a search tool people tolerate and one they reach for.

Hypotheses get checked, not just described

The SQL execution layer means a convincing-sounding answer isn’t the end of the conversation. Analysts and the agent itself can verify a claim against real data in the same workflow where the question was asked.

Improvement is measured, not assumed

The benchmark repository means retrieval quality changes get tracked against a real baseline, so the team knows whether a change helped before it ships broadly.

The engagement continues

The client extended the work beyond the initial rebuild, and development is ongoing.

Strategic wins

What this engagement actually taught the team:

Retrieval quality decides whether the rest of the system gets used

An MCP server, an SQL execution layer, and a benchmark repository are only as useful as the search underneath them. Getting hybrid retrieval right first is what made every other piece of the platform worth building on top of, a lesson Azati relearned building its own internal AI operating system, ACOP.

Retrieval quality is a moving target, so measure it like one

Building the benchmark repository alongside the retrieval rebuild, not after it, is what makes continuous improvement real. Without it, every change to search is a guess dressed up as an upgrade.

Verification has to live next to the answer

An analytics copilot that only returns convincing answers is a liability. Putting SQL execution directly in the loop is what turns a search result into something an analyst can act on.

Need an analytics copilot your team will actually rely on?

Retrieval, code assistant integration, and data verification, built as one system with room to keep improving. Let’s talk about your analytics stack.

Talk about your analytics stack

What should a retail analytics AI platform get right first?

PriorityWhy it mattersWhen it becomes urgent
Retrieval qualityIf the search itself doesn’t understand what users mean, nothing built on top of it will get adopted either.When user adoption is at or near zero and the tool has otherwise shipped.
VerifiabilityAnswers that sound right but can’t be checked against real data erode trust fast, especially with analysts.When users start double-checking the tool’s answers manually instead of trusting them.
Quality measurementWithout a benchmark, every improvement is a guess, and regressions go unnoticed until users complain.Before the next round of changes ships, not after the first complaint arrives.
Integration into existing workflowsA copilot that requires switching tools entirely faces a much higher adoption bar than one embedded where people already work.When the roadmap includes code assistants, dashboards, or other tools analysts already use daily.

The described expertise is relevant for

  • Rescuing AI-generated or vibe-coded prototypes that failed to gain adoption
  • Semantic and hybrid search engineering for internal knowledge systems
  • MCP server development connecting AI systems to code assistants such as Cursor
  • SQL execution agents for hypothesis testing against production data
  • Embedded ML engineering inside proprietary, closed infrastructure
  • Retail and enterprise analytics automation

This engagement model is unlikely to be the right fit for

  • Teams building a brand-new AI product from a clean slate, with no existing system or prior work to build on.
  • Organizations that prefer to keep every architectural decision fully in-house, with an external partner implementing to spec rather than proposing the design.
  • Projects where success is measured against a fixed feature list agreed upfront, rather than real usage and adoption.
  • Environments where, for compliance or data-governance reasons, an execution layer cannot query production data directly.

Frequently asked questions

If you’re the one who has to explain to your team how this copilot actually works before they’ll trust it with real decisions, this FAQ is written for that conversation.

It searched by literal full-word matching, returned slow answers, and had no baseline metrics to improve against. More importantly, it had zero adoption: none of the client’s own analysts were using it. If nobody opens a prototype, it isn’t solving their problem, and no accuracy metric changes that.

Azati’s analytics copilot exposes a semantic API over the client’s analytics knowledge base, so analysts can search by meaning even when they don’t know a document’s exact wording. An MCP server connects it to the Cursor code assistant, an SQL execution layer runs an agent’s queries inside the client’s data environment for fast hypothesis testing, and a benchmark repository tracks retrieval quality over time.

Azati built a custom hybrid retrieval layer combining Okapi BM25 keyword ranking with semantic embedding search and purpose-built ranking models tuned to the client’s own analytics data, so queries match on exact terminology and on meaning at the same time.

An MCP (Model Context Protocol) server exposes tools and data sources to an AI assistant through a standard interface. Azati built a FastMCP-based server so the client’s Cursor code assistant could query the same analytics knowledge base as the copilot, instead of duplicating the retrieval layer inside a second tool.

Because a search answer isn’t always enough. A retrieved answer describes what should be true; an executed query shows what is true. When an analyst or the agent needs to check a hypothesis against real numbers, the SQL execution layer runs that query inside the client’s data environment and returns the result, closing the loop between finding an answer and verifying it.

More than 25 analysts across multiple business domains, up from zero users of the prototype it replaced. That adoption curve, more than any single accuracy metric, is the number this engagement is judged on.

Azati's related enterprise AI and knowledge retrieval expertise

Explore our successful projects and see how Azati delivers measurable results for our clients.

Embedded AI Search for Oil & Gas Engineering Reviews

Embedded AI Search for Oil & Gas Engineering Reviews

~92% faster search for similar engineering observations
85-90% similarity-matching quality in feature testing
~500 historical observations accessible across 6-8 active projects
  • Java
  • Spring Boot
  • React
  • GraphQL
  • PostgreSQL
  • Hasura

⚡ Pain Points We Tackled

Engineering teams accumulated valuable knowledge across capital projects, but finding a comparable past observation required manually searching project records, reviews, and documentation. As the client's enterprise platform grew to cover engineering reviews, requirements, PDRI assessments, and project observations across large oil and gas projects, experts needed a faster way to reuse relevant engineering knowledge without leaving their existing workflow.

Our Approach

Azati embedded AI-powered semantic search directly into the existing capital project platform, allowing experts to find and rank similar observations within the relevant engineering discipline. The solution combined enterprise AI orchestration, domain-restricted retrieval, and contextual recommendations while preserving the existing UX, governance, and review process, delivered in four weeks.

Applied Methods and Practices

  • AI-assisted engineering search: Analyzes engineering recommendations, retrieves similar historical observations within the same discipline, and ranks them by semantic relevance, linking back to source projects and remediation history.
  • Embedded AI workflow integration: Experts launch the search directly from an engineering observation and receive ranked recommendations inside the existing interface, with no context switching.
  • Enterprise AI operations and governance: An orchestration layer manages AI requests, LLM processing, response persistence, lifecycle handling, and timeouts, with domain restrictions keeping AI operations predictable and governable.
  • Contextual engineering decision support: Ranked observations include similarity score, project stage, engineering phase, and responsible engineer, not just a generic search result.

Solution Features

  • ~1 hour to under 5 minutes: AI-assisted search cut the time experts spent finding comparable observations by roughly 92%, across ~500 observations in 6-8 active projects.
  • Organizational engineering intelligence: 50,000+ historical observations became searchable through one AI-assisted experience, turning siloed project knowledge into reusable organizational intelligence.
  • Seamless adoption inside existing software: Azati embedded AI into the existing engineering interface and delivered the capability in four weeks, with no end-user retraining required.
  • Enterprise AI governance: AI requests are centrally managed through a dedicated orchestration layer with request tracking, response persistence, and configurable retention policies.
Secure Enterprise LLM Platform for Internal Knowledge Management

Secure Enterprise LLM Platform for Internal Knowledge Management

100% corporate data processed within private infrastructure
60% faster access to internal business information
75% reduction in employee search time
  • vLLM
  • Open WebUI
  • Enterprise LLMs
  • RAG
  • Private AI infrastructure

⚡ Pain Points We Tackled

The client wanted generative AI to improve employee productivity, but public LLM services created security, compliance, and confidentiality concerns. They needed an enterprise AI assistant that could securely give employees fast access to internal knowledge while keeping sensitive business information entirely within the corporate environment.

Our Approach

Azati developed a secure, locally hosted enterprise LLM platform combining private AI infrastructure, Retrieval-Augmented Generation, and enterprise knowledge integration, delivering ChatGPT-like capabilities while keeping full control over corporate data.

Applied Methods and Practices

  • Private enterprise AI deployment: Deployed and optimized open-source LLMs within the client's internal infrastructure, eliminating dependence on public AI services.
  • Enterprise knowledge integration: Integrated the platform with internal knowledge sources and business data, enabling employees to retrieve accurate, context-aware answers from trusted corporate resources.
  • Advanced AI retrieval and reasoning: Enhanced RAG using multi-query processing, contextual retrieval, keyword extraction, and topic identification to improve response quality.
  • AI optimization for enterprise infrastructure: Applied model optimization and efficient deployment techniques to reduce computational requirements while maintaining response quality.

Solution Features

  • Secure enterprise AI adoption: Employees use generative AI without exposing confidential business information to external cloud services.
  • Faster knowledge discovery: Reduced the time required to locate internal information by 60%, with conversational, context-aware access.
  • Higher workforce productivity: Cut employee search time by 75% by automating information retrieval across internal systems and documentation.
  • Flexible enterprise AI platform: Established a private AI foundation that can evolve alongside organizational knowledge and future AI initiatives.
Enterprise AI Agents for Software Development Lifecycle Automation

Enterprise AI Agents for Software Development Lifecycle Automation

5 AI agents designed to automate engineering workflows across the SDLC
12,000+ employees supported by the enterprise engineering environment
12 months from solution design to production-ready AI agent specifications
  • Node.js
  • Azure DevOps
  • Kubernetes
  • OpenAI
  • PostgreSQL
  • Redis

⚡ Pain Points We Tackled

A large insurance enterprise wanted to reduce engineering effort spent on repetitive software development tasks while maintaining the security, governance, and approval processes required in a regulated environment. The solution needed to integrate directly with existing Azure DevOps workflows and comply with strict information security policies.

Our Approach

Azati designed an enterprise AI agent ecosystem automating routine engineering activities across the development lifecycle, combining secure LLM deployment, Azure DevOps integration, intelligent request routing, and AI-powered development assistants.

Applied Methods and Practices

  • Enterprise AI infrastructure: Secure architecture deploying open-source language models within the client's own infrastructure, keeping proprietary code and data inside the corporate environment.
  • AI-powered code review: An intelligent pull request review agent analyzing code quality, security issues, and development standards directly within Azure DevOps.
  • Automated software testing: An AI agent generating unit tests based on application code, improving test coverage consistency.
  • Requirements validation and deployment assistance: AI-driven specification verification against internal documentation, plus a deployment assistant referencing internal runbooks and deployment history.

Solution Features

  • Faster software delivery: Reduced manual effort across code reviews, test creation, requirements verification, and deployment preparation.
  • AI integrated into existing workflows: Embedded directly into Azure DevOps, so developers benefit from automation without changing established engineering processes.
  • Secure enterprise AI adoption: A production-ready architecture keeping sensitive source code and development assets within the organization's infrastructure.
  • Enterprise-ready delivery: Successfully navigated architecture governance, security reviews, and stakeholder approvals in a highly regulated insurance environment.

Last updated

Got a job for Azati? Let’s talk business!

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

What's next?

  • 1. Tell Us Your Story
    Describe your project. We come back within 24 hours with team availability and a rough plan. NDA on request before the first call.
  • 2. Get Your Roadmap
    Receive a detailed proposal with scope, team composition, timeline, and costs tailored to your goals.
  • 3. Start Building
    Azati aligns on details, finalize terms, and launch your project with full transparency.