Conversational Shopping Copilot
Outcome
Let a shopper describe a need in natural language and receive grounded product recommendations with live price, promotion, and fulfillment promise, while the basket and consent state stay authoritative in Cosmos DB.
| Portfolio attribute | Value |
|---|---|
| Primary persona | Customer |
| Primary aggregate | ShoppingSession |
| Cosmos DB containers | 3 |
| Grounding data | catalog, inventory, prices, promotions, reviews |
| Development estimate | USD 60-220 monthly dev estimate |
| Runtime options | Python FastAPI and C# ASP.NET Core |
Productivity hypothesis
These measures reflect the workflow, evidence, decision boundary, and industry risk for this use case.
| Impact type | Measure | Conservative internal assumption | Customer measurement |
|---|---|---|---|
| Productivity | Query-to-satisfactory-answer time | 12-22% reduction | (baseline median query-to-answer minutes - assisted median minutes) / baseline median minutes * 100 |
| Quality or risk | Accepted answers | 5-10 percentage-point improvement | assisted percentage of answers accepted as satisfactory - baseline percentage |
Important: Conservative internal pilot assumptions only; not public benchmarks, commitments, or expected customer results. Validate against a comparable baseline or matched control cohort with mandatory human review.
Rationale: Conversational retrieval can shorten product discovery, but stale price or availability data would invalidate the result.
Pilot guardrail: Use current catalog, inventory, price, promotion, and review data and disclose unavailable information.
Customer validation plan
- Baseline the current workflow with representative users and tasks.
- Run the accelerator on the same task mix with human review retained.
- Measure query-to-satisfactory-answer time and accepted answers with the documented formulas.
- Replace internal assumptions with customer-observed results before a business case.
Why Azure Cosmos DB
This AI solution needs an operational data plane, not only a vector index:
- Hybrid vector and full-text retrieval combines semantic recall with exact identifiers, codes, names, and domain language.
- Hierarchical partition keys and metadata predicates keep tenant and domain boundaries in the normal query path.
- Operational JSON, source chunks, workflow and agent state, feedback, and audit records remain together for low-latency reads and governed writes.
- Change feed reacts to source and operational updates without polling.
- Autoscale throughput, configurable consistency, and multi-region distribution support variable demand and enterprise availability.
Domain workflow

| Stage | Actor | Input → output | Approval |
|---|---|---|---|
| 1. Capture shopping intent and constraints | Shopper | Natural-language need with budget and occasion → Structured intent frame on the ShoppingSession | Policy controlled |
| 2. Retrieve candidate SKUs with vector plus attribute filter | Retrieval agent | Intent frame and preference profile → Ranked ProductCard candidate set | Policy controlled |
| 3. Validate price, promotion, and availability | Commerce validation service | Candidate SKU list and postal code → Priced, promisable shortlist | Policy controlled |
| 4. Present cited recommendation and fit rationale | Shopping copilot | Priced shortlist with review digests → Comparison answer with source citations | Policy controlled |
| 5. Confirm basket update or checkout handoff | Shopper | Proposed cart mutation → Committed cart lines and order handoff token | Human required |
Technical architecture

Cosmos DB data model
| Container | Hierarchical partition key | Documents | Search paths |
|---|---|---|---|
shoppingSessions | /tenantId, /shopperId | ShoppingSession, ConversationTurn, ShopperPreferenceProfile | /utteranceVectorEmbedding, /affinityVectorEmbedding, /utteranceVector, /affinityVector |
merchandisingCatalog | /tenantId, /productCategoryId | ProductCard, PromotionOffer | /descriptionVectorEmbedding, /reviewDigestVectorEmbedding, /offerTextVectorEmbedding, /descriptionVector, /reviewDigestVector, /offerTextVector |
inventoryPromise | /tenantId, /skuId | InventorySignal | Operational fields only |
Query contract
| Query | Container | Scope | Purpose |
|---|---|---|---|
| Active session replay | shoppingSessions | single-partition | Rehydrate the current basket and the last turns for continuity across channels. |
| Promisable candidate lookup | inventoryPromise | cross-partition-bounded | Knowledge-container query against inventoryPromise (bounded fan-out across the /tenantId + /skuId partitions named by the shortlist): filter ranked candidates to SKUs with available-to-promise at the shopper's preferred fulfilment nodes, as a bounded fan-out across the at most fifty shortlisted SKU partitions. |
| Eligible offer resolution | merchandisingCatalog | cross-partition-bounded | Knowledge-container query against merchandisingCatalog (bounded fan-out across the /tenantId + /productCategoryId partitions named by the shortlist): return only offers currently in effect and stackable with the basket state, fanned out across the handful of product categories present in the basket. |
| Abandoned basket recovery scan | shoppingSessions | cross-partition-bounded | Bounded cross-partition control-plane query: find sessions with value still in the cart that stalled, for follow-up messaging. It cannot carry the second partition key because recovery targets are unknown until every shopper partition is examined, so it runs as a tenant-scoped scheduled sweep off the interactive path, bounded by the ShoppingSession type inside a rolling 48-hour updatedUtc window, executed with MaxItemCount paging and continuation tokens. |
Python and C# services route each document type to its declared container and hierarchical partition key. ETag-based writes protect mutable aggregates, while append-only records and bounded cross-partition queries preserve scale.
Azure deployment

Clone the source repository, authenticate with Azure, and run:
Set-Location accelerators/retail-e-commerce/conversational-shopping-copilot
az login
./Deploy.ps1 -Runtime python -Location eastus2
Change python to csharp to deploy the .NET implementation.
Explore the implementation
- Launch signed-in demo
- Implementation article
- Domain data model
- Workflow and API contract
- Python application
- C# application
- Domain container Bicep
- Platform Bicep
- Cost and configuration
- Source repository