Project Showcase

Aesth-ai

Aesth-ai

2026Next.jsPayload CMSMongoDBVercel AI SDKRAGVector SearchGemini APITypeScript

Aesth-ai is a proof-of-concept AI chatbot built to validate a retrieval approach before porting it into a production codebase, running on Payload 3 and MongoDB over a beauty-product dataset.

The model chooses between two tools per question: a DB-filter tool for deterministic queries (e.g. "list face creams with a rating over 4") that grounds answers directly in database rows, and a RAG tool that embeds the query and runs nearest-neighbour search over a MongoDB Atlas vector store for semantic questions (e.g. "what can I use for dry skin?").

I designed two seams to make the engine easy to evaluate and re-target: an A/B retrieval switch (db / rag / both) implemented purely through the tool registry with no orchestrator branching, and provider-agnostic chat/embedding models swappable via a one-line env change with no vendor SDK imported in business code. The model also self-selects a typed answer shape (plain, timeline, product-list, comparison), always degrading gracefully to plain text on failure.

Built with Next.js 16 (App Router), Payload 3.85 with MongoDB, the Vercel AI SDK, Gemini Flash for chat, and gemini-embedding-001 for embeddings, with vectors stored in a dedicated collection behind a swappable VectorStore interface.