Draft write-up
EchoSeek is a product discovery platform where shoppers describe what they want in natural language (or with an image) and receive ranked results, side-by-side comparisons and answers grounded in the catalog rather than in the model's imagination.
01Problem
Keyword search fails on how people actually shop: vague intent, attribute-heavy queries and visual taste. Plain LLM chat fixes the language problem but invents specs and prices. The goal was an experience that understands intent and stays factual.
02Approach
- 01
Index the catalog as embeddings
Product text and images are embedded into a shared vector space so a text query can match either description or look. Metadata (price, brand, category) is kept alongside for filtering.
- 02
Retrieve, then rerank
A fast vector search pulls candidates, structured filters narrow them, and a rerank step orders the final shortlist so the context sent to the LLM is small and relevant.
- 03
Generate grounded answers
Llama 3.1 is orchestrated with LangChain and prompted to answer only from the retrieved products, citing which item each claim comes from. Comparisons are produced from the same structured records.
- 04
Stream to the UI
FastAPI streams tokens to a Next.js front end so users see answers form in real time, with product cards rendered next to the text.
03Architecture
A retrieval-first pipeline: every answer is built from retrieved catalog records, and the front end talks to a single streaming API.
01Client
Next.jsChat and search UI, product cards, comparison view, streamed responses.
02API
FastAPIQuery endpoint, request validation, streaming responses, session handling.
03Orchestration
LangChainQuery rewriting, retrieval chain, prompt assembly and output parsing.
04Retrieval
Embeddings + vector storeHybrid text/image embeddings, metadata filters, reranking of candidates.
05Generation
Llama 3.1Grounded answer and comparison generation from retrieved context only.
06Deployment
DockerContainerised API and front end for reproducible local and cloud runs.
- Natural-language and image-assisted product search
- Side-by-side product comparison generated from structured data
- Streaming answers with source products attached
- Filters on price, brand and attributes combined with semantic search
04Challenges
The model stated specs that were not in the catalog.
FixRestricted the prompt to retrieved records, required item-level attribution, and returned 'not available' when a field was missing.
Retrieval returned near-duplicates, crowding out variety.
FixAdded reranking and de-duplication before building the context window.
Slow first token hurt perceived quality.
FixStreamed the response end to end and rendered product cards as soon as retrieval finished.
05Learnings
Outcomes
- Working end-to-end RAG product search with comparison and streaming UI
- Answers traceable to specific catalog items
- Containerised so the whole stack starts with one command
What I learned
- Retrieval quality moves answer quality more than prompt tweaks.
- Grounding rules need to be tested with adversarial queries, not just happy paths.
06Next
- 01Offline retrieval evaluation set with recall@k tracking
- 02User feedback loop to tune ranking
