Multi-agent system for predicting brands and categories from ambiguous product descriptions. Mapped 15K+ products with 88% accuracy and became the foundational framework adopted for other catalog automation projects.
Built a multi-agent system that automatically predicts brands and hierarchical categories for unmapped product descriptions. The system resolves ambiguity, handles abbreviations, and avoids hallucinations while enabling downstream catalog enrichment and offer targeting.
Thousands of product descriptions (SPDs) existed in Fetch's database without assigned brands or categories, preventing them from being matched to catalog items. Challenges included:
Developed an agentic system with LangGraph orchestration featuring four specialized agents:
Agent Architecture:
Retrieval System:
Web Search Integration:
Tech Lead for a cross-functional team of 4 engineers (analytics engineer, MLE apprentice, backend engineer, and team lead). Owned architecture decisions and drove technical direction:
Implemented beam search for navigating hierarchical category trees with 6+ depth levels. Agents explore multiple category paths simultaneously with confidence-based stopping, allowing predictions at any depth rather than forcing terminal categories when uncertain.
Beam=2: Explores top 2 paths at each level (solid), prunes others (dashed)
Combined lexical search (fuzzy matching) with semantic search (embeddings) using Reciprocal Rank Fusion. The hybrid approach handles both exact abbreviation matches ("org" to "organic") and semantic similarity for brand disambiguation.
Reciprocal Rank Fusion combines rankings from both retrievers
SPDs that fall below the ML model's confidence threshold are routed to the agent pipeline for prediction. Human reviewers validate these predictions, and feedback flows back into the system - correct predictions become reference examples for similar future cases, while errors become patterns for the guardrail to catch.
SPDs below ML confidence threshold go to agents; human feedback improves future predictions
Implemented a guardrail agent that validates coherence across all pipeline predictions, checking for logical consistency (e.g., "Coca-Cola" brand should map to "Beverages" category, not "Pet Food").
Hallucination prevention through grounded validation. When agents predict a category, the path is validated against the actual taxonomy tree. If the category doesn't exist or the path is incorrect, validation fails and the agent retries with a valid category - ensuring all predictions are grounded in real taxonomy entries rather than plausible-sounding hallucinations.
AI/ML: LangChain, LangGraph, OpenAI models, Gemini models
ML Infrastructure: Sentence Transformers, FuzzyWuzzy, FAISS
Backend: Python, Pydantic, Snowflake
Search: Semantic + lexical hybrid search, web search integration
This system unlocked value from thousands of previously unmapped products, enabling more accurate offer targeting and improved user experience. The error-learning mechanism created a virtuous cycle where the system continuously improved from production feedback.
Framework Adoption: The multi-agent architecture became a foundational pattern for the organization. Another engineer on the team leveraged the core agents (Canonical Brand, Fetch Brand, Category) and retriever infrastructure to build CatOps Automation - a larger system for Receipt Quality catalog data cleanup. By reusing the proven agent patterns, retrievers, and category navigation tools, the CatOps project accelerated development significantly rather than building from scratch.