Inspiration

As an AP Computer Science teacher, I watched students struggle with difficult problems, such as code tracing for selection sort—they either spent hours stuck or screenshot entire questions to ChatGPT. They wanted to learn; they just needed scaffolding. During office hours, strategic hints helped them grasp concepts quickly and solve problems independently, but office hours don't scale to 30 students at 11 pm. AP Dazi was born from this need: what if AI could provide the same pedagogically sound hints I give in person, guiding students toward understanding instead of just giving answers?

What it does

AP Dazi is a Chrome extension that provides progressive, scaffolded hints for AP Classroom questions using Chrome's built-in Gemini Nano. When students get stuck, they click "Get Hint" and receive strategic guidance in three levels (1/3 → 2/3 → 3/3), each becoming more specific without revealing the final answer.

The extension automatically detects the AP course from the URL and tailors hints to the subject matter. It runs completely offline by default for privacy, with an optional online mode using GPT-5 for advanced reasoning. Students learn by doing, not by copying—just like having a teacher available 24/7.

How we built it

I started by exploring Chrome's extension samples at GoogleChrome/chrome-extensions-samples/functional-samples, experimenting with all the Nano APIs to understand Gemini Nano's capabilities and limitations. I used the ai.gemini-on-device-summarization template as a foundation and adapted it for educational use. The architecture uses Manifest V3 with a service worker (background.js) handling AI requests, content scripts (collegeboard-content.js) extracting question text and MathJax formulas, and a side panel UI for displaying hints. I implemented session-based caching with 1-hour TTL to avoid regenerating identical hints, and added sophisticated state management to prevent stale hints when students navigate quickly between questions.

Throughout development, I invited AP teachers from different subjects (CS, Calculus, Physics) to test the extension and provide feedback on hint quality, which was crucial for refining the prompts. The result is a hybrid architecture supporting both offline (Gemini Nano) and online (GPT-5) modes with seamless toggling.

Challenges we ran into

The biggest challenge was prompt engineering—designing a system that generates correct, problem-specific hints across diverse subjects (CS, Calculus, Physics) and question types (conceptual vs application, multiple choice vs free response). I needed the AI to extract actual variable names, loop bounds, and formulas from questions while avoiding both overly generic hints ("use the chain rule") and giving away answers.

After many iterations, I implemented a chain-of-thought pipeline where the AI first analyzes question format, extracts constraints, and identifies common pitfalls before generating hints. Another major hurdle was content extraction: parsing MathJax formulas required extracting aria-label attributes, and handling image alt text and graphs to give the AI complete context. Getting the balance right—specific enough to guide but never revealing the answer—took extensive testing across different AP courses.

Accomplishments that we're proud of

The moment that validated AP Dazi was when AP Psychology teachers tested it and praised the hint quality—proving the system works beyond just code and math problems. This was a breakthrough because psychology questions are often conceptual and require understanding nuanced terminology and theories, not just computational logic.

What we learned

The biggest insight was that teaching AI to teach requires explicitly structuring prompts around pedagogical principles—not just asking for "hints," but specifying progressive scaffolding, problem-specific details, and common pitfalls students encounter.

What's next for AP Dazi - Smart Hints for AP Students

  • Expand from 11 to all 38 AP courses, refining prompts based on teacher feedback across subjects like History, Chemistry, and foreign languages.
  • Implement analytics to track hint effectiveness and continuously improve quality through student and teacher feedback.
  • Add features like step-by-step post-submission walkthroughs, study session tracking, and collaborative study group features.

Built With

Share this project:

Updates