Applied AI Product · Datacue — Sanabil Venture

RetailGPT — Agentic Retail Intelligence Platform

Ask retail data a question in plain English and get a governed, cited, multi-format answer back — safely.

Delivered at: Datacue — Sanabil Venture
Role: Lead / solution architect — concept-to-production, designed and built end to end.

The problem

Retail teams sit on large transactional datasets but can’t query them without an analyst and a wait. The hard part of a natural-language layer over that data isn’t the chat UI — it’s the security and governance around it: who can ask what, what’s safe to execute directly, and what needs retrieval instead.

Architecture

Scroll sideways to see the full diagram
RetailGPT — System Architecture & WorkflowSingle end-to-end flow: query · security · governance · orchestration · execution · response1 · User consoleSubmits a natural-language query2 · AI security layerJailbreak · prompt-injection check3 · Category access checkOnly the user's own category is allowed4 · LLM orchestratorDeterministic or non-deterministic?LLM layerfallback mechanismGeminiprimaryOpenAIsecondary · if primary downServes every LLM step —orchestrator · RAG · recommendContext handlerMaintains the conversation windowboth paths can run in paralleldeterministicnon-deterministic5 · BigQueryDeterministic query executes6 · RAG pipelineVector DB · pgvector retrieval7 · RecommendationReads BigQuery · next sales actiondata5.1 · MultiprocessingBuilds four response types in parallelSummaryText overviewTableStructured rowsChartVisual graphDownloadExport link5.2 · Response to userRelevant response type shownCROSS-CUTTING · OBSERVABILITY & STORAGE8 · AI observabilitySelf-managed · tracing & metricsPostgreSQLShared data store9 · Chat & user historyConversation storeTEN ARCHITECTURE PILLARS · REVIEWED END TO ENDScalabilitySecurityAI Security / GuardrailsReliability & ResilienceObservabilityGovernanceCost OptimizationData & RAG SecurityPerformanceMaintainability / DevSecOpsLegendSecurityGovernance / accessOrchestrationData / modelProcessing / executionRecommendationObservability / storagePrimary LLM: Gemini · secondary (fallback): OpenAI · vector store: pgvector · storage & observability: PostgreSQL · deterministic → BigQuery, non-deterministic → RAG (parallel).

Key capabilities

Dual-path orchestration — deterministic warehouse queries and non-deterministic RAG retrieval run in parallel and merge into one response

AI security layer for jailbreak and prompt-injection defense, plus per-user category access control

Multi-format responses generated in parallel — summary, table, chart and export

A recommendation engine that reads the same governed data to suggest next actions

Automatic primary/secondary LLM fallback so the assistant stays available

Full conversation history and AI observability from day one

Architecture pillars

Designed and reviewed against all ten — see how I evaluate every architecture.

ScalabilitySecurityAI Security / GuardrailsReliability & ResilienceObservabilityGovernanceCost OptimizationData & RAG SecurityPerformanceMaintainability / DevSecOps

Technology

GeminiOpenAI (fallback)Agentic orchestrationBigQuerypgvectorPostgreSQLPython

Want something like this, built properly?

I design and ship systems like this one — from architecture through to production.

AI Evaluation & Observability Platform AI Agent Security & Runtime Defense Platform