Logo Lanfrica

Faith4078/Yoruba-Ragchat

Domain:

natural language processing

Record type:

software
Creator:
Fai
Host:
Conversational AI for exploring Yoruba cuisine, recipes, and food traditions.. Built with Next.js, Sanity CMS, pgvector, and Neon DB # Yoruba Ragchat (Ìlè Oúnjẹ) A Retrieval Augmented Generation chatbot that teaches Yoruba cuisine. Every answer is grounded in a curated dish knowledge base managed in Sanity, so the assistant explains a dish's origin, ingredients, and preparation steps using only real, editor authored content, then shows the dish's picture and ingredient photos as a card beneath the reply. Built with Next.js App Router, the Vercel AI SDK, Sanity, Neon Postgres (with pgvector), and Clerk. ## Table of contents - Features - How the RAG pipeline works - Content and data model - Tech stack - Project structure - Getting started - Environment variables - Populating the knowledge base - Scripts - Testing - Deployment - License ## Features - **Grounded chat**: answers are generated only from dishes retrieved from the knowledge base. The system prompt (`lib/ai/prompts.ts`) enforces strict scope matching (a "what is X" question gets a definition, not a full essay) and forbids inventing dishes, ingredients, or steps. - **Hybrid retrieval**: dish search fuses lexical keyword matching with vector similarity search using Reciprocal Rank Fusion, so both exact name matches and semantically related queries surface the right dish. - **Rich dish cards**: every retrieved dish renders as a card with its main picture and a horizontally scrollable ingredient carousel, both inline in the chat and at a standalone `/dishes/[id]` route. - **Sanity Studio built in**: content editors manage dishes at `/studio` with no separate deployment, using a schema tailored to Yoruba dish data (name, category, picture, background, ingredients with photos, recipe, additional info). - **Multiple models**: Gemini 2.5 Flash Lite is the default (served directly with your own free tier Gemini key), with Gemini 2.5 Flash and Pro, plus gateway routed models (DeepSeek, Mistral, Kimi K2.5, GPT OSS, Grok) available from the model picker. - **Flexible auth**: anonymous visitors can chat immediately with nothing persisted; signin …

Languages