Refactor
Search core consolidation across product entry points
A unified retrieval interface for chat, search, and filtered discovery across the product surface.
Context
Search behavior had fragmented across chat, direct search, and filtered discovery. The product worked, but the retrieval layer was becoming difficult to reason about and maintain.
Architecture
I consolidated the separate paths into one retrieval interface with shared filter handling, shared ranking assumptions, and fewer hidden branches in the system.
Consolidated shape
Chat Search
Direct Search
Filtered Discovery
-> Shared Retrieval Core
-> Shared Filters
-> Shared Ranking
Key components
- Unified retrieval interface
- Shared filter mapping and normalization
- Consolidated search path for chat and direct discovery
- Cleaner ranking and relevance ownership
Tradeoffs
- Short-term migration cost versus long-term system clarity
- Feature-specific behavior versus a coherent core search model
- Local optimizations versus shared infrastructure
Lessons
- A fragmented search surface creates duplicated logic very quickly
- Unifying search paths improves both product consistency and engineering speed
- Refactors become valuable once they make future relevance work cheaper
Related writing
Hybrid search in practiceHybrid search becomes a systems design problem once score normalization, query routing, and operational tuning enter the picture.Why a RAG pipeline needs a resolverMost RAG stacks move too quickly from prompt to retrieval. A resolver layer improves precision by decomposing intent, extracting entities, and converting ambiguous language into structured search actions.