Project Track 1: Context-Aware Academic Assistant

The Problem / Concept Generic AI hallucinates syllabus details and teaches methods different from the professor’s.

Project Overview & Objectives

Students often struggle when using generic LLMs for studying because the AI doesn’t know the specific grading rubrics, syllabus constraints, or idiosyncratic methods taught by their professor. This project builds a hyper-local, context-aware academic assistant that refuses to answer questions outside of the provided course material.

If you select this track, your goal is to build a functional Minimum Viable Prototype (MVP) that seamlessly integrates a Node.js/Express backend with Google’s Gemini API, utilizing Retrieval-Augmented Generation (RAG), multimodal vision, and autonomous tool calling.


Detailed Requirements Document (PRD)

1. RAG (Obsidian) Core Requirement

To prevent hallucination, the AI must be grounded in a specific, personal knowledge base. You will build this using Markdown files in Obsidian.

  • Knowledge Base Content: Create an Obsidian vault containing 5-10 markdown files representing lecture notes, course syllabus, and assignment prompts. The AI must retrieve relevant chunks and cite the specific file when answering. Examples: ‘According to Syllabus.md…’ or ‘As per Lecture_3_Data_Structures.md…’
  • Implementation Expectation: Your Express server must parse these Markdown files, generate vector embeddings using gemini-embedding-2, and perform a cosine similarity search against the user’s query. The retrieved text must be injected into the system prompt.

2. Multimodal (Vision) Stretch Goal

AI is not just text. Modern products must perceive the world.

  • Vision Use Case: The user interface should allow uploading an image (e.g., a photo of a whiteboard diagram or a handwritten math equation). The AI uses Gemini’s Vision capabilities to extract the text/structure and explains it using only the principles found in the RAG notes.
  • Implementation Expectation: Your frontend HTML must include a file upload input. The image must be converted to base64, sent to the /query endpoint, and passed to gemini-2.5-flash alongside the text prompt and RAG context.

3. Tool Calling Stretch Goal

Agents need to take actions in the real world or fetch real-time data that isn’t in their RAG database.

  • Tool Definition: Implement a tool-calling schema that can trigger an action like get_upcoming_deadlines(). This tool should return hardcoded JSON (simulating a Canvas/Moodle API or Google Calendar) of deadlines, which the AI then weaves into its response.
  • Implementation Expectation: You must define a strict JSON schema for this tool and register it in your Gemini API call. When the model decides to invoke the tool, your Node.js server must intercept the request, execute a mock function, and return the result to the model for the final response.

Step-by-Step Implementation Guide

If you are using this document to prompt an AI coding assistant (like GitHub Copilot or Cursor), use the following phasing:

  1. Phase 1: UI & Mock Backend: Ask the AI to generate a vanilla HTML/JS interface with a text input, file upload, and a submit button. Connect it to an Express POST /query route that returns mock JSON.
  2. Phase 2: Vanilla Gemini Integration: Connect the Express route to the actual @google/genai SDK. Send a simple text prompt and display the result.
  3. Phase 3: The RAG Pipeline: Ask the AI to write a script to read your Markdown files, split them into chunks, and get embeddings. Update your /query route to calculate cosine similarity and inject the top matches.
  4. Phase 4: Multimodal & Tools: Finally, add the base64 image parsing to the API call, and define your function declaration for the tool-calling stretch goal.

Note: In the future, a specific branch in the course repository will be provided containing starter scaffolding tailored to this exact project track.