Inspiration

We've all been there - staring at a homework problem with no idea where to start. The natural instinct? Google it (or using ChatGPT). But here's the problem: Google gives you links, not learning paths. You get a wall of SEO-optimized results, YouTube videos with clickbait thumbnails, forums with half-correct/blurred out answers, and maybe one decent Khan Academy link buried on page 2. Worse, students often grab the first answer they find, copy it, and move on without actually learning anything. We realized the real problem isn't access to information - it's knowing where to start and how concepts connect. A student struggling with derivatives doesn't need the derivative of x² - they need to understand that derivatives require functions, functions require algebra, and algebra requires variables. Google can't show you that map. We wanted to build something that empowers learning, not enables cheating. A tool that shows you what you need to know, the order to learn it, and the best place to learn each piece.

What it does

Opensourcerer transforms homework questions into an interactive knowledge graph. Upload a question - text or even a photo - and instead of getting answers, you get a visual network of curated learning resources with AI-discovered prerequisites and personalized readiness assessments.

Core Features:

OCR Upload - Snap a photo of handwritten homework and our Gemini Vision integration extracts the math and concepts instantly

Smart Prerequisites - AI discovers learning paths using vector embedding geometry (algebra → functions → derivatives) without any hardcoded rules

Knowledge Readiness - Personalized assessment based on your learning history. The system tells you if you're ready to tackle a problem or need to learn prerequisite concepts first

Interactive Force-Directed Graph - Drag, zoom, and explore your learning path visually. Color-coded by resource type (red for videos, blue for articles, amber for textbooks, cyan for interactive tools)

Real-Time Streaming - See results appear progressively as the AI works

The Pipeline: Ingest → Extract Concepts → Embed → Find Prerequisites → Retrieve Resources → Rank by Quality → Validate URLs → Assess Readiness → Cluster Related Topics

The Result: No solutions. No cheating. Just the best path to understanding - visualized in a way Google can't.

How we built it

Gemini API Integration (3-Way Usage):

Gemini Vision - OCR extraction from homework photos Gemini 1.5 Flash - Concept extraction, resource generation, prerequisite reasoning, and readiness interpretation text-embedding-004 - Generate 768-dimensional vectors for semantic analysis and prerequisite discovery

Frontend:

Next.js 14 with App Router for server-side rendering TypeScript for type-safe development Tailwind CSS for modern, responsive styling Custom Canvas Visualization - Hand-built force-directed graph with physics simulation because we needed full control over node interactions, zoom behavior, and dynamic updates

Backend/Infrastructure:

Next.js API Routes - Serverless endpoints Server-Sent Events (SSE) - Real-time streaming for progressive result rendering Supabase - User authentication and search history storage pdf-parse - PDF text extraction for uploaded documents

The Magic: Vector Geometry for Learning Paths Instead of hardcoding "learn X before Y," we use embedding space:

Embed all detected concepts into 768-dimensional vectors Calculate cosine similarity between concept pairs Analyze vector relationships (directionality, magnitude) to infer prerequisites Build learning paths automatically for ANY topic

Knowledge Readiness Feature In Tutorial Mode, new questions are assessed against your learning history:

Compare new question's embedding with previously learned concepts using cosine similarity AI analyzes the match percentage and concept overlap Returns: "Ready," "Needs Prerequisites," "Too Advanced," or "Already Mastered" Visual progress bar shows your readiness score

This showcases embeddings for personalized learning recommendations at scale.

Challenges we ran into

Discovering Prerequisites:

Traditional systems need experts to hardcode thousands of prerequisite relationships. We solved this using embedding geometry - when you embed concepts like "variables," "functions," and "derivatives" into vector space, their geometric relationships naturally encode learning dependencies. By analyzing directional similarity and complexity ordering, the system automatically discovers JavaScript → functions → closures → React hooks without us teaching it. This works for quantum physics, blockchain, or any topic because relationships emerge from the embeddings themselves.

Stopping AI Hallucination:

Gemini confidently generated fake URLs like https://khanacademy.org/math/quadratics-101 that led to 404 errors. We built a three-layer solution: (1) Parallel HTTP validation for every URL, (2) Adaptive retry if validation rate drops below 20%, (3) Fallback to guaranteed-real search URLs (Khan Academy, YouTube, Wikipedia). Result: went from 40% hallucination rate to 0% broken links.

Making Multi-Stage AI Feel Instant:

Running concept extraction, embedding, prerequisite discovery, resource generation, validation, and readiness assessment could take 15-20 seconds. We implemented Server-Sent Events to stream results progressively - users see the graph building in real-time rather than staring at a blank screen. The system feels instant because there's continuous visual feedback.

Accomplishments that we're proud of

We invented zero-shot prerequisite discovery using pure embedding geometry - no hardcoded rules, works for any topic from quantum physics to React hooks. Triple Gemini integration (Vision, Chat, Embeddings) showcases creative use of embeddings beyond simple similarity search, especially for personalized readiness assessment. Built a robust validation pipeline that eliminated AI hallucination completely - users never see broken links. Shipped a complete product with multi-stage AI pipeline, custom visualization, streaming, OCR, and personalized assessment in 36 hours.

What we learned

Embedding geometry is unreasonably powerful - prerequisite relationships naturally emerge from vector space without us teaching them. LLMs confidently generate fake data (40% hallucination rate for URLs), so always validate AI outputs with robust fallback systems. Streaming beats waiting - real-time visual feedback makes 8-second operations feel instant, and multi-stage AI unlocks possibilities neither embeddings nor chat could achieve alone. Constraints drive creativity - "no solutions, only resources" forced us to innovate on learning path discovery and readiness assessment.

What's next for opensourcerer

Cache known-good URLs, track user preferences (videos vs text), and expand readiness assessment to suggest optimal learning sequences based on individual progress patterns. Build collaborative features to share prerequisite graphs as study guides and compare learning paths with classmates. Create native mobile apps for better photo capture and offline access, with adaptive difficulty that suggests resources matched to current skill level. Integrate directly into Canvas, Google Classroom, and other LMS platforms where students actually do homework, plus add multi-language support for global educational content.

Built With

Share this project:

Updates