PickWise v2 — AI Product Recommendation Platform
LangChain ReAct Agent, 4-Stage RAG Pipeline & Next.js 16 Interface
Buying a laptop or PC has become an overwhelming experience for everyday users due to technical specification overload and the rigid nature of traditional e-commerce filters.
- Context-blind Filtering: Conventional multi-select filters fail to interpret nuanced, multi-factor constraints (e.g., "a lightweight laptop for a Computer Science student on an RM3,500 budget that can handle light 3D rendering and has good battery life").
- Information Asymmetry: Non-technical consumers struggle to translate subjective software needs into concrete hardware requirements (RAM, TGP, thermal headroom, display color accuracy).
- The Illusion of Choice: Naive keyword searches often return biased or sponsored results rather than calibrated, value-driven alternatives, leading to decision paralysis or purchase regret.
PickWise shifts the paradigm from passive browsing to an interactive, agentic AI consultant. Instead of relying on brittle keyword queries or naive RAG pipelines, it uses a conversational ReAct agent to conduct a guided needs discovery interview, translating ambiguous constraints into deterministic hardware scoring parameters.
- Multi-Step Agentic Reasoning: Built a ReAct-style tool-calling agent (LangChain create_agent, Gemma 4 via the Gemini API) with 4 tools: search_laptops (the retrieval pipeline below), get_review_evidence (YouTube review excerpts), calculate_custom_apple_price (Apple upgrade pricing) and search_malaysian_market_price (catalog price history plus live retail listings). Responses stream over SSE, and the agent decides per turn whether to search again or answer from the conversation and current shortlist.
- 4-Stage RAG Pipeline: pgvector top-50 cosine recall → rule-based reranking (similarity × budget/weight penalty + purpose/brand bonus) → constraint relaxation (weight, then budget, only when no candidate is viable) → relevance gating, using 768-dimension Gemini embeddings on PostgreSQL. The 0.53 gate threshold was set by spot-checking relevant and irrelevant queries; below it, the agent asks a clarifying question instead of recommending weak matches. Every search logs its gate decision, top score and any relaxation.
- Bilingual Eval Harness: Built an offline evaluation harness over Chinese, English and mixed-language queries, combining an LLM judge with deterministic rule checks, including one that flags RM prices the agent states without tool output behind them across multi-turn conversations. Three repeat runs showed about one item in six varies between runs, so single-run changes are treated as noise until they reproduce.
- Automated Data Ingestion: Built Playwright scrapers (with uploaded-HTML parsing for a site that blocks automation) and an LLM extraction step (Gemma 4 via the Gemini API) that turns raw product pages into structured records, prompted to emit one SKU per listed RAM/SSD upgrade option. Catalog of 370 SKUs (Apple, ASUS, Acer), running in Docker Compose.
- Explainable Scoring Engine: Designed an 8-factor deterministic scoring engine with a per-factor score breakdown for each laptop. Replaced min-max normalization, which scaled factors against outlier catalog extremes, with percentile rank within the catalog.