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
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.
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.
| axis | question it answers | example, for a printer |
|---|---|---|
| use case | What is it for? | Document printing vs thermal printing |
| environment | Where will it be used? | Office, home, or a legal firm |
| buyer persona | Who 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.
- 1SQL consolidates 15+ Snowflake tables into one flattened Delta table in Databricks
- 2Only changed records refresh: about 5–10K of ~300K SKUs per run
- 3Validation checks run in both the SQL and the Python layers
- 4Only changed products are re-tagged, which cut the recurring cost further
- 5Failures alert, a dashboard tracks each run, and I was on call for it
- aPick 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.
- bBootstrap 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.
- cTrain 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.
Batch tagging time, ~300K products (drawn to scale)
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.
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.