Rafii Ahmad Fahreza
Back to portfolio
AI / RAG· 2026

AI Learning Assistant

Context-aware educational assistant using Retrieval-Augmented Generation.

Next.jsSupabaseGemini APIPostgreSQLVector Embeddings
AI Learning Assistant

Overview

Broad-purpose chatbots often hallucinate or fail to reference specific coursework materials. This project addresses that by anchoring model responses to the user's specific learning context.

By chunking documents, calculating vector embeddings, and indexing them in a vector database, the assistant performs semantic search to retrieve the most relevant information before generating a response.

Implementation Details

The application utilizes Next.js for the interface, Supabase for authentication and database management, and the Gemini API for semantic understanding and text generation.

We implemented semantic search indexing directly inside a PostgreSQL database to retrieve relevant paragraphs, ensuring the AI replies using the actual text uploaded by the student.

Semantic Document Search

Retrieves information based on concept similarity rather than simple keyword matching.

Direct Reference Highlights

Points users back to the exact section of the document from which the answer was retrieved.

Outcomes

<1.5s

Query response time

94%

Accuracy on course docs

Successfully built a functional playground where students can upload PDFs and start asking questions within seconds, showing how targeted RAG can improve study speed.