Two-tier RAG wine recommendation engine with hybrid search, Cohere reranking, and MCP tool protocol.
2025 – 2026


Wine recommendations are either shallow (filter by price/region) or require expensive sommelier expertise. Existing AI tools hallucinate wine names and tasting notes because they lack grounding in real inventory data.
Two-tier RAG pipeline combining pgvector semantic search with tsvector full-text search, fused via Reciprocal Rank Fusion, then reranked by Cohere — catching both conceptual queries ("bold Italian red") and exact lookups ("2019 Barolo").
Next.js 16 App Router with Vercel AI SDK v6 orchestrates OpenAI GPT-4.1 tool calls against Supabase (pgvector 512-dim + tsvector hybrid search + RRF k=60 + Cohere reranking). Additional tools include Grapeminds API, Tavily web search, and an MCP server for extensible tool protocol.
Hybrid search (vector + keyword + reranking) dramatically outperforms vector-only retrieval for domains where users mix conceptual and exact-match queries.