~/venkat neelraj nitta

case-studies/staples

The retrieval and data layers under an agentic e-commerce system

role
AI Engineer Intern, Staples, Framingham, MA
when
Jan–Jul 2026
team
Small; sole owner of anything data-related
stack
SQL, Python, PySpark, Databricks, Delta Lake, Vector Search, Neo4j, PyTorch, Ray, LangChain
Context

A conversational agent had to answer questions like “which printer works for a small law office”. The catalog had no fields for use case, environment or buyer, so retrieval had nothing to filter on, and answers depended on how well the retrieval layer held up.

Where my time went

Most of it on the retrieval layer the agent queried: three Databricks Vector Search indexes split by content type (reviews and FAQ, descriptions and specifications) and a Neo4j product graph. I owned bug fixes and feature work on both, and added the product-to-product relationships (bought-together, compatibility) in the graph.

I also owned the data path that fed it and built the SKU enrichment classifier.

The three tag axes
axisquestion it answersexample, for a printer
use caseWhat is it for?Document printing vs thermal printing
environmentWhere will it be used?Office, home, or a legal firm
buyer personaWho is buying it?Office admin, employee, or student

The tags land as columns on the Delta table and the agent uses them as retrieval filters. That is how enrichment and retrieval connect.

Daily data path
  1. 1SQL consolidates 15+ Snowflake tables into one flattened Delta table in Databricks
  2. 2Only changed records refresh: about 5–10K of ~300K SKUs per run
  3. 3Validation checks run in both the SQL and the Python layers
  4. 4Only changed products are re-tagged, which cut the recurring cost further
  5. 5Failures alert, a dashboard tracks each run, and I was on call for it
Decisions
  1. a
    Pick the graph store by prototyping. With no graph background, I built small versions in FalkorDB and Neo4j and compared them with Cosmos DB on cost, governance and customization. The team adopted Neo4j.
  2. b
    Bootstrap the taxonomy with an LLM, then curate it by hand. An LLM proposed tags over a stratified product sample; I added, edited and deleted until the three axes held up.
  3. c
    Train a small model and keep the LLM for hard cases. A fine-tuned multi-label DeBERTa classifier tags most SKUs; low-confidence ones go to an LLM that picks a tag or proposes a new one.
Results

Batch tagging time, ~300K products (drawn to scale)

before
~240 min
on Ray, 1 GPU node
90 min
0.8avg tagging accuracy
~0.7on the buyer-persona axis
3vector indexes maintained

Measured on labeled sets grounded in the internal taxonomy, with an LLM judge as a second signal. The work aimed to improve search relevance and product discovery.

Communicating it

I presented the pipeline architecture and model outputs to non-technical senior leadership, and proposed business directions from the data, including customer-acquisition channels it surfaced.