*NEEDS API KEY AT TOP OF WEBSITE TO FUNCTION: "AIzaSyCcPra-vkQGOgUBDo9PMPP_8VfJOu8Ly_U"

Compify — Your AI Olympiad Coach

What if every time you got stuck on a math problem, you had access to the exact insight a past AIME winner used?

Compify turns every problem into a lesson from history.


Inspiration

Breaking into Math Olympiads like AMC, AIME, and USAMO often depends on access to elite coaching. While platforms like AoPS provide great resources, there’s still a major gap: students get stuck on problems and can’t connect them to the deeper strategies used in past competitions.

We wanted to build a "Digital Olympiad Coach"—one that doesn’t just give answers, but teaches students how to think by connecting their problem to the closest known competition insight.


What It Does

Compify is an AI-powered Math Olympiad trainer that transforms a student’s problem into a guided learning experience using a Vision-to-Logic pipeline:

  • 📸 Upload a Problem
    Snap or upload a handwritten or printed math problem.

  • 🧠 Find the Closest Match (RAG)
    The system embeds the problem and searches a curated dataset of 8,000+ elite Olympiad problems to find the most relevant match.

  • 🔍 Learn the Strategy
    Using Gemini 3, Compify explains the exact reasoning behind the matched problem and applies that strategy to the new one.

  • 💬 Interactive Tutor Chat
    Ask follow-up questions, request hints, or dive deeper into concepts—all while maintaining context.


How We Built It

  • Frontend: Streamlit
  • Backend: Python

  • 📚 Dataset Processing
    Processed 2,000+ problems from the di-zhang-fdu/AOPS dataset in Google Colab and converted them into embeddings using text-embedding-004.

  • 🤖 AI Models
    Integrated the Google Generative AI SDK with Gemini 3 Pro for multi-modal reasoning (vision + math).

  • 🔎 Retrieval System
    Implemented cosine similarity search to ensure the model references similar problems before generating solutions.


Challenges We Ran Into

  • ⚙️ Model Compatibility
    Working with cutting-edge “Flash” and “Preview” models required custom API handling. We built a Model Finder tool to dynamically identify supported endpoints.

  • 🧹 Data Cleaning
    Removing noisy LaTeX and Asymptote (asy) formatting from problems was critical to prevent confusion in model reasoning.

  • 🎯 Precision vs. Creativity
    Ensuring mathematically rigorous outputs while using generative models required careful prompt engineering and grounding via RAG.


Accomplishments That We're Proud Of

  • 🎯 High Retrieval Accuracy
    The system consistently finds highly relevant historical problems—sometimes matching AIME problems from years ago to new inputs.

  • 💡 True “Aha” Moments
    Instead of just solving problems, Compify teaches why a solution works.

  • 🧠 Persistent Context
    Built a session-aware tutor that remembers the problem and adapts to follow-up questions seamlessly.


What We Learned

  • Context is everything. Providing a strong reference (via RAG) dramatically improves reasoning quality and reduces hallucinations.
  • Multi-modal AI is powerful. Converting images → embeddings → structured reasoning unlocks entirely new learning workflows.
  • AI works best as a guide, not a shortcut. The goal isn’t answers—it’s understanding.

What's Next for Compify

We’re scaling Compify into a full adaptive learning platform:

  • 📈 Expand to 15,000+ problems
  • ✍️ Add handwriting recognition for messy inputs
  • 📄 Improve LaTeX rendering for cleaner explanations
  • 🎯 Generate personalized practice sets based on student weaknesses

Our vision: make world-class Olympiad training accessible to anyone, anywhere.

Built With

Share this project:

Updates