Skip to content
Pratim/Dasude
06/RAG2 min read

EchoSeek

Outcome

Product search that answers from the catalog instead of from the model's imagination.

RAGLLMMultimodalFull stack

Llama 3.1, LangChain, FastAPI, Docker, Next.js

The EchoSeek search prototype with the query formal mens wearprototype
The EchoSeek search prototype, with a natural-language query.

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

01ClientNEXT.JS02APIFASTAPI03OrchestrationLANGCHAIN04RetrievalEMBEDDINGS + VECTOR STORE05GenerationLLAMA 3.106DeploymentDOCKER
  1. 01Client

    Next.js

    Chat and search UI, product cards, comparison view, streamed responses.

  2. 02API

    FastAPI

    Query endpoint, request validation, streaming responses, session handling.

  3. 03Orchestration

    LangChain

    Query rewriting, retrieval chain, prompt assembly and output parsing.

  4. 04Retrieval

    Embeddings + vector store

    Hybrid text/image embeddings, metadata filters, reranking of candidates.

  5. 05Generation

    Llama 3.1

    Grounded answer and comparison generation from retrieved context only.

  6. 06Deployment

    Docker

    Containerised 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