Zubby AI
  • Pricing
Sign inStart free trial
  • Welcome
  • How the AI works
  • System prompt & persona
  • Knowledge base
  • Training & gaps inbox
  • Languages
  1. Docs
  2. How the AI works

How the AI works

Zubby’s AI isn’t a plain chatbot. It’s an agent: a language model wrapped in a retrieval pipeline, a function-calling tool registry, and a guardrail layer that keeps it inside the lanes you set. This page explains what happens between a shopper typing a message and the AI replying — so you know exactly what to tune when an answer is wrong.

The five stages of a reply

  1. Intent classification. A small model decides what kind of question this is — product discovery, order status, policy, sizing, complaint, escalation, etc. Each intent has a different system prompt and tool allowlist.
  2. Retrieval. If the intent needs catalog or policy knowledge, we embed the shopper’s message into 1,536-dimensional vectors and run a hybrid search across your products, FAQs, pages, and reviews. The top hits become the agent’s “context window”.
  3. Tool selection. The main model decides whether to answer directly or call one of the tools: search products, compare, get bundle recommendations, get order status, check inventory, get size recommendation, get smart offer, get store policy, add to cart. Tools call back into your store’s live data.
  4. Drafting. The model writes a draft answer grounded in the retrieved snippets and tool outputs. Citations are tracked at the sentence level so the dashboard can show exactly which source backed which sentence.
  5. Guardrail pass. A second model verifies the draft against your brand rules (e.g. “never promise free shipping”, “never quote a discount over 20%”) and the global safety filter. Failures route to a fallback response or trigger a human handoff.

Retrieval

Retrieval is the most consequential stage. If the right snippets don’t show up in the top-k results, the AI either answers from memory (risky) or escalates (safe but unhelpful). Three things shape retrieval quality:

  • Catalog completeness — every product synced with rich descriptions, attributes, and at least one image alt text.
  • Knowledge base depth — your policies, FAQs, and long-form pages indexed. See Knowledge base.
  • Embedding freshness — when a product changes, we re-embed within a minute via Shopify / Woo webhooks.

Hybrid retrieval

Zubby combines vector similarity (semantic match) with BM25 keyword match and a reranker. Keyword search catches SKUs and exact phrases; semantic search catches “gift for my mom who likes baking”. Together they outperform either alone by ~18% in our internal offline evals.

Citations

Every answer is annotated with source citations: product cards, page URLs, or a verbatim policy block. Citations are displayed inline in the widget and audited in Conversations → Detail view.

When a sentence has no citation, the dashboard flags it for review. Flagged sentences are a top input to the gaps inbox (Training).

Tools

Tools are functions the agent can call to get fresh data or take an action. You can disable any tool from AI → Tools — for instance, turn off add to cart if you want the agent to recommend but never modify the cart.

Guardrails

Two layers:

  1. Universal. Toxic content filter, jailbreak detection, PII redaction in outbound logs. Always on.
  2. Brand-specific. Your “do not say” list, allowed discount range, persona constraints. Edit under System prompt.

Provider routing

Zubby is multi-provider. The admin control plane resolves each capability (chat, embeddings, recovery) to a concrete model based on status, health, and priority. Supported providers: OpenAI, Azure OpenAI, Anthropic, and Gemini. Embeddings are pinned to 1,536 dimensions so any provider switch is hot-swappable without re-indexing.

Failover is automatic. If the primary provider returns a 5xx or breaches latency budgets, the next provider in the queue takes over within seconds — your shoppers don’t see an outage.

What good replies look like

Audit-worthy AI replies share three properties: they have at least one strong citation, they answer the actual question rather than the adjacent question, and they offer a clear next action (product link, return policy, escalate). The dashboard scores every conversation on these three axes; weekly review surfaces patterns to fix.

Was this page helpful?

Still stuck? Contact support with the URL of this page (/docs/ai-agent).

PreviousEmbed codesNextSystem prompt & persona

Footer

Zubby AI

The AI sales agent for Shopify and WooCommerce. Learns your store, guides shoppers in real time, and recovers the revenue you would have otherwise lost.

System status

Product

  • All Features
  • AI Sales Agent
  • Cart Rescue
  • Widget Designer
  • Multi-Language
  • Pricing
  • Changelog

Solutions

  • Solutions Hub
  • Cart Recovery
  • Product Discovery
  • 24/7 Support
  • Upsell + Cross-sell
  • Conversion Optimization

Industries

  • Fashion & Apparel
  • Beauty & Cosmetics
  • Electronics
  • Jewelry & Accessories
  • Food & Beverage
  • Health & Wellness

Integrations

  • Shopify
  • WooCommerce
  • All integrations
  • vs Rep AI
  • vs Tidio
  • vs Klaviyo
  • vs Gorgias

Resources

  • Documentation
  • Guides
  • ROI Calculator
  • Glossary
  • Answers (AI Q&A)
  • Blog
  • Case Studies

Company

  • About
  • Careers
  • Contact
  • Trust
  • Security
  • Status
  • Privacy
  • Terms

© 2026 Zubby AI, Inc. All rights reserved.

Built for merchants.Made with care.