-
-
Tab 1: AI Advisor
-
AI Advisor Output Snippet - Example Prompt #1 (Prerequisite & Workload Check)
-
AI Advisor Output Snippet - Example Prompt #2 (Al / Research Concentration Pathway)
-
AI Advisor Output Snippet - Example Prompt #3 (What-If Schedule Recalculation)
-
AI Advisor Output Snippet - Example Prompt #4 (General Education Optimization) + notice major changed to Bioinformatics
-
Tab 2: Degree Roadmap & Simulator
-
Tab 3: Prerequisite Graph
-
Example Prerequisite Graph - CSE 40 (Depth Level 1)
-
Example Prerequisite Graph - CSE 40 (Depth Level 2)
-
Example Prerequisite Graph - CSE 40 (Depth Level 3)
-
Example Prerequisite Graph - CSE 40 (Depth Level 4)
Inspiration
Every UC Santa Cruz student knows the unique stress of enrollment week. With UCSC operating on an intense 10-week quarter system, course planning feels like navigating a minefield. Many upper-division computer science and engineering courses have deep, tangled prerequisite chains spanning multiple departments. One miscalculated quarter or missed bottleneck course can cascade into a full-year graduation delay because many courses are only offered once per academic year.
When students turn to commercial Large Language Models (LLMs) for advice, they run into a dangerous problem: hallucinations. LLMs confidently invent non-existent course equivalencies, overlook hidden prerequisites, and suggest mathematically impossible schedules.
I was inspired to build SlugRoute to reduce this anxiety. I wanted to combine the conversational intuition of Google Gemini with the mathematical rigor of deterministic graph algorithms, giving UCSC slugs an authoritative, zero-hallucination academic mentor.
What it does
SlugRoute is an AI academic advisor and interactive degree pathway simulator engineered specifically for UC Santa Cruz students. It guides students across three synchronized interfaces: an AI advisor chat, a deterministic roadmap simulator, and an interactive prerequisite graph.
In the AI Advisor interface, students converse naturally with a Gemini-powered mentor that tailors guidance to their declared major, completed courses, and quarterly credit limits. Rather than relying on guesswork, the advisor uses native tool calling to verify catalog data, evaluate prerequisites, and generate multi-quarter plans before replying. Furthermore, every course code mentioned in the chat automatically transforms into a verified, clickable link pointing directly to the official UCSC General Catalog.
In the Roadmap Simulator, students select their target graduation courses to generate a personalized quarter-by-quarter schedule. The engine places courses in topologically legal order while balancing credit caps between 12 and 22 credits per quarter, resolving prerequisite choices based on major preferences.
In the Prerequisite Graph interface, students visually explore course dependency networks rendered with browser physics in authentic UCSC Banana Slug Gold and Navy Blue. An adjustable depth slider allows students to seamlessly inspect immediate prerequisites or zoom out to the entire ancestral chain leading to graduation.
How I built it
The project architecture connects an automated data ingestion system, a deterministic graph engine, a local semantic vector store, a grounded agent layer, and a web visualization dashboard.
The data pipeline begins with an automated web crawler built using BeautifulSoup and Requests. It systematically scrapes all 87 department pages of the official UCSC General Catalog, extracting course titles, unit counts, prerequisite descriptions, and direct catalog URLs for 6,164 courses into a clean, structured JSONL dataset.
The core curriculum logic is managed by an AcademicGraphEngine built on NetworkX, representing the university's course ecosystem as a Directed Acyclic Graph with 6,164 nodes and 4,962 dependency edges. Raw prerequisite strings are parsed into structured Disjunctive Normal Form, grouping requirements into alternative tracks and interchangeable course options. The engine generates multi-quarter graduation roadmaps using topological sorting to schedule courses in strict prerequisite order, applying major-specific cost minimization to break "OR" ties while balancing credit limits between 12 and 22 credits per quarter.
For course discovery, a local vector retrieval engine utilizes SentenceTransformers with the all-MiniLM-L6-v2 model. Course descriptions are transformed into 384-dimensional dense vector embeddings and serialized into a PyTorch tensor. The retriever performs real-time cosine similarity search across these local tensors, providing sub-millisecond semantic search for concepts, career interests, and General Education categories without relying on external vector databases.
The intelligence layer is implemented via a stateful SlugAdvisor class that interfaces with Google Gemini 3.5 Flash through the google-genai SDK. Gemini operates under strict system instructions using automatic function calling across four deterministic tools: course search, prerequisite verification, roadmap generation, and catalog inspection. This architecture forces the model to consult the graph engine and vector store before formulating responses, eliminating hallucinations.
The frontend is built using Streamlit, featuring custom CSS tuned to official UCSC colors. A regular-expression linkification utility automatically transforms course codes across advisor messages into clickable, verified catalog URLs. For graph visualization, the app uses Pyvis and vis.js to dynamically export NetworkX subgraphs into standalone HTML documents with physics-based force simulation, which are rendered seamlessly in the browser via responsive iframes.
Challenges I ran into
The biggest challenge was untangling the chaotic natural language in university course descriptions. Academic catalogs are written with inconsistent syntax, nested clauses, and exceptions like instructor consent or test scores. Converting thousands of irregular sentences into clean boolean dependency trees required extensive regular expressions and structural normalization.
Accomplishments that I'm proud of
I'm proud to have built a strict, zero-hallucination academic advising architecture. By establishing a separation between conversational semantic reasoning in Gemini and deterministic validation in NetworkX, it's impossible for the AI to recommend an illegal schedule or invent a prerequisite. Successfully structuring, indexing, and validating 6,164 courses and 4,962 prerequisite connections with 100% graph acyclicity was another major accomplishment. Finally, I’m proud of how tailored the product feels to the UC Santa Cruz community, featuring our beloved Banana Slug mascot, authentic collegiate colors, and direct links to the official campus catalog.
What I learned
This project taught me how to bridge symbolic algorithms with generative AI. While large language models are great at natural conversation and intent extraction, deterministic symbolic systems like graph theory and boolean logic are essential for factual truth and hard constraints.
I also gained extensive experience working with Google's new google-genai SDK, specifically managing multi-turn agent sessions, tuning generation parameters, and orchestrating automatic function calling.
Additionally, I developed a strong practical understanding of applied graph algorithms, including cycle resolution, Disjunctive Normal Form evaluation, and precedence-constrained scheduling on messy real-world datasets.
What's next for SlugRoute
The next milestone for SlugRoute is expanding into native multimodal intelligence by allowing students to directly upload a PDF of their unofficial UCSC transcript or MyUCSC Academic Advisement Report.
Instead of manually selecting completed classes in the sidebar, students could simply drag and drop their transcript into the app. Leveraging Google Gemini's native document-processing and vision capabilities, SlugRoute would automatically extract completed course codes, transfer credits, and AP exam waivers. The engine would instantly ingest these records into the live student profile, immediately unlocking verified prerequisite chains in the interactive graph and generating an optimized graduation roadmap with zero manual data entry.