Retail and eCommerce Case study

Ecommerce AI chatbot on Azure OpenAI

SabaClient: SabaPlatform: Web

Ecommerce AI chatbot for a supplement store: approved answers first, Azure OpenAI only from retrieved passages (RAG), and guards for health claims, prices and unsafe topics.

Banner with the title Ecommerce AI chatbot on Azure OpenAI: a customer question about tracking an order and an answer with a help-pages source and a checked-before-sending tag
Client
Saba
Service
AI, Web apps, Integrations
Years
2026
Stack
Azure Functions, Azure AI Search, Azure OpenAI, .NET and 5 more
Platforms
Web

Overview

Saba wanted visitors to get quick answers about products, orders, the company and policies. The assistant searches an index of approved question-and-answer entries and crawled site pages, returns a stored answer word for word when it is clearly right, and otherwise drafts a reply from the retrieved passages or says it cannot answer. It replaced an earlier bot whose answers were shipped to every visitor's browser. We built the chat engine inside the storefront, the nightly ingestion job, the chat widget and the test suite.

The challenge

Supplement wording carries regulatory risk, and similarity scores alone cannot tell a right answer from a wrong one. Prices must not come from stale text, and a bad crawl must never wipe the search index.

What we built

  1. A curated question-and-answer set, each entry tagged with how it may be served: as written, with a disclaimer, as a link only, held for review or hedged
  2. A nightly Azure Functions job that reads the sitemap, crawls and cleans the pages, chunks and embeds the text and loads it into a hybrid keyword and vector index, with price masking, host allow-lists and an abort rule for a bad crawl
  3. A chat engine in the storefront: fixed replies for greetings, contact, order status, price questions, abuse and self-harm, then retrieval with a stored answer returned only above set thresholds, and a model that answers only from the retrieved passages
  4. An output guard that removes disease claims, quoted prices, leaked instructions, foreign links and emails
  5. Safety-topic tracking across a conversation, with a caring reply and a crisis line for self-harm
  6. Request limits, anti-forgery protection and a lazy-loaded, keyboard and screen-reader accessible chat widget that re-checks links before showing them
  7. Automated tests for adversarial input, intent routing, the orchestrator, the output guard and live retrieval, and Bicep templates for the Azure resources
  8. Removal of the previous bot and its in-browser answer data

How a system like this fits together

Reference architecture: guarded retrieval-grounded AI assistant

Simplified reference architecture, not a client schematic.

Reference architecture: guarded retrieval-grounded AI assistantZones: the chat widget on the left; the storefront application with the chat engine and the answer guard; Azure services for search and the language model; and, below, content sources feeding a nightly ingest function that refreshes the search index. Full description in the numbered list below the diagram.ClientsApplication: storefrontAzure servicesContent sourcesBackground job (async)questionembed, draftsearchchecksanswer + sourcesload indexembeddingsChat widgetDeep Chat,lazy loadedChat engineFixed rules, retrieval,answer routingAnswer guardRemoves claims, prices,foreign linksAzure OpenAIEmbeddings, groundedanswersAzure AI SearchHybrid keyword andvector indexApproved Q&ACurated answers,treatment tagsSite pagesCrawled fromthe sitemapIngest functionNightly: crawl, chunk,embed, refresh indexReference architecture: guarded retrieval-grounded AI assistantZones: the chat widget on the left; the storefront application with the chat engine and the answer guard; Azure services for search and the language model; and, below, content sources feeding a nightly ingest function that refreshes the search index. Full description in the numbered list below the diagram.ClientsApplication: storefrontAzure servicesContent sourcesBackground job (async)questionchecksanswer + sourcesembed, searchnightly refreshembed + load indexChat widgetDeep Chat, lazy loadedChat engineFixed rules, retrievalAnswer guardRemoves claims, prices, linksAzure OpenAIEmbeddings, grounded answersAzure AI SearchHybrid keyword and vectorApproved Q&ASite pagesIngest functionNightly: crawl, chunk, embed
Approved answers come first, a model answers only from retrieved passages, and a guard checks every reply.
  1. A shopper types a question in the chat widget on the storefront. The widget sends it, with the last few messages, to the chat API.
  2. Fixed rules answer greetings, contact, order-status, price and abusive questions, and handle self-harm, without calling Azure.
  3. Otherwise the engine embeds the question (Azure OpenAI) and searches the index (Azure AI Search) for approved answers and site pages.
  4. A clear stored answer is returned as written. If none fits, the model drafts a reply only from the retrieved passages, or says it cannot answer. The answer guard then removes disease claims, quoted prices and foreign links before the widget shows it with its sources.
  5. Separately, a nightly Azure Function reads the approved Q&A and crawls the site pages, embeds them and refreshes the index.

Technology used

Technology named in the project records, by layer
LayerChoicePurpose
SearchAzure AI Searchhybrid keyword and vector retrieval
AIAzure OpenAIembeddings and grounded answers
Ingestion.NET, Azure Functionsnightly crawl, chunking and embedding
EngineC# inside the ASP.NET storefrontrouting, retrieval, guards
DeliveryBicep, xUnitrepeatable resources and a test safety net
MonitoringApplication Insightslogs and function monitoring

What happened next

  • Delivered

    The work described above was delivered to the client.

  • Operational facts
    • Our work on this project took place in 2026.

Could this be your project?

Request similar work

Questions about this project

How long did this project take?

Our work on it took place in 2026.

What technology was used?

Azure Functions, Azure AI Search, Azure OpenAI, .NET, C#, RAG, Bicep, xUnit, Application Insights.

Similar work

Banner with the title AI assistant for city services: a mock chat answering a fence question with a city code source, beside a map with a zoning layer and a location pin

Also AI assistants and .NET, also an AI project

AI assistant that guides residents to city services

  • Public safety and government
  • AI
  • Web apps

2026

A chat assistant that answers property and permit questions from city documents and live GIS layers, cites its sources and routes people to the right department.

Top Tier Editing: quote calculator and order platform screenshot

Also .NET, same industry

Top Tier Editing: quote calculator and order platform

  • Retail and eCommerce
  • Business software and compliance
  • Web apps
  • eCommerce
  • Integrations

2023–2026

A .NET Blazor quote calculator, order and checkout flow and back office for Top Tier Editing, an editing service: instant prices from admin-set rules, document upload with word count, Stripe and PayPal payments and scheduled emails.

Banner with the title Direct selling storefront and distributor back office and a mock storefront with three product cards beside a back-office card with commission bars and an organisation tree

Also .NET, same industry

Direct selling storefront and distributor back office

  • Retail and eCommerce
  • Web apps
  • eCommerce
  • Integrations

2025–2026

Direct selling website for a US supplement brand: a replicated storefront and a distributor back office with guest checkout, enrollment, auto-orders and marketing automation.

Building something similar?

Tell us what you need and your industry. We will tell you what is realistic, what it would take, and show you the closest work we have done.

Are you ready to partner with us?

Our good-natured team is waiting to hear your business requirements.

Book a free project call