E-commerce

Find assortment gaps on the digital shelf

Three research agents map a retail category into Databricks, mine review complaints for demand evidence, and verify assortment gaps on the live shelf before filing them as Linear tickets.

Quick Start

Inputs

  1. Retail category The category to map, for example "coffee makers", chunked into subcategories for high-recall discovery.
  2. Retailer Where to build the catalog, for example "amazon.com"; a hard source whitelist keeps every run on-shelf.
  3. Merchandising rules Taught in the app, for example "always segment by price band"; they update the verifier agent permanently.

Outputs

  • Full-category product catalog with field-level provenance
  • Whitespace grid by subcategory and price band
  • Customer review themes with quotes and source links
  • Gap verdicts backed by live-shelf evidence
  • Closest-match product lists for every gap
  • Linear tickets with the full evidence attached

Two verbatim agent results ship with the repo: a discovery chunk (30 SKUs with field-level provenance) and a live-shelf verification with its verdict and evidence.

View example on GitHub

How it works

A 6-phase pipeline.

  1. Discover the catalog A dataset_building agent enumerates the category subcategory by subcategory, 6 chunked runs with recall goals in each prompt; dedup by canonical product id lands 300+ distinct SKUs.
  2. Map the whitespace Pure SQL over the catalog: a subcategory by price-band grid exposing cells with few products or none well-rated. No API calls; the math proposes, it never invents.
  3. Uncover the demand An enrichment agent reads customer reviews for the top products around flagged cells and returns recurring complaint themes, each with a verbatim quote and its review-page URL.
  4. Synthesize hypotheses A Claude agent loop reads the grid and the quotes and drafts specific, checkable gap statements, only where the math and the complaints point the same way.
  5. Verify on the live shelf A research agent searches the retailer's live catalog for counterexamples at maximum effort. One in-stock counterexample refutes the gap; refuted hypotheses are dropped, not filed.
  6. File and learn Confirmed and partial gaps become Linear tickets carrying the quotes and evidence. Taught merchandising rules update the verifier agent permanently.

Stack

Nimble primitives plus the full runtime stack.
Nimble APIs
What it does
  1. Web Search Agents Three agents: catalog discovery at high recall with a hard source whitelist, review-theme mining with verbatim quotes, and live-shelf gap verification at maximum effort.
  2. Trust framework Field-level provenance on every row: prices, ratings, and quotes map to claims with source URLs; the evidence in every ticket.
3rd Party Tools
Role
  1. Databricks Delta tables for the catalog, review themes, verdicts, and run checkpoints.
  2. OpenAI Agent SDK + LiteLLM The synthesis loop that proposes, verifies, and files gaps.
  3. claude-sonnet-5 Runs the synthesis loop's judgment.
  4. Linear Where confirmed gaps land as tickets with full evidence.
  5. Streamlit Catalog, whitespace grid, evidence, gap board, teach page.
Reach out if you have any questions.
Talk to an Expert