Zubby AI
  • Pricing
Sign inStart free trial
Back to the blog
Engineering

Grounding LLMs on live commerce data — how we built the retrieval layer

Pgvector, HNSW indexing, variant-aware reranking, and the per-store memory layer powering Zubby.

AAlex Chen · Infra EngineerMar 10, 202612 min read

Retrieval is the part of the stack that either makes an AI agent feel omniscient — or catches it in its first hallucination. Here's how we designed ours.

Why pgvector won for us

We run Postgres for every other durable thing. Adding a separate vector store would have meant a second source of truth on top of the product catalog. pgvector + HNSW indexing solved the latency and recall tradeoff inside the same database.

The four-tier ranking

  • Tier 1 — cosine top-20 against a 1536-dim embedding.
  • Tier 2 — structural filters: stock, price band, category, store-of-origin.
  • Tier 3 — merchant rules: blocks, guardrails, boosts, semantic pins.
  • Tier 4 — variant-aware rerank by the current shopper context.
If you take one thing from this post: rerank on the live page context, not the embedding alone.
Keep readingAll posts
Playbooks

How AI sales agents lift Shopify conversion — a 2026 operator's guide

A practical breakdown of where AI moves the needle on conversion, when it doesn't, and how to measure it honestly.

Read
Playbooks

The abandoned cart rescue playbook for 2026

Inbox fatigue is real. Here's how to win back carts with on-site nudges, SMS, and branded email — in that order.

Read
Customer Stories

How Vervain Beauty cut pre-sale tickets 61% with an AI teammate

Sofia Martinez on installing Zubby in an afternoon and shipping a real conversion lift by Friday.

Read
Stop reading. Start shipping.

Try Zubby on your own store.

Install free. Point it at your catalog. Watch the numbers move.

Start free trialSee case studies

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.