top of page
Search

Behind the Scenes: AI-Powered Proofs, Thinking Models, and "Trivia" Filtering

While users have been enjoying the new Dark Mode and Gamification features, the backend of OpenMaths has undergone a massive upgrade to support deeper mathematical learning. Here are the latest technical updates from the last few days.

1. Introducing the "Proof Trainer" Engine

The most significant addition is the Proof Trainer backend module (src/backend/proof_trainer.jsw). This system moves beyond simple numeric answers, allowing users to contribute Open Problems and write full text-based mathematical proofs.

  • AI Grading: The system uses a specialized prompt (gradeProof in src/backend/ai_module.jsw) to evaluate student proofs on three criteria: Accuracy, Clarity, and Rigor (scored 1-10).

  • Similarity Detection: To prevent duplicate entries, the system checks new proofs against existing solutions using semantic similarity analysis.

  • Constructive Feedback: The AI provides specific, actionable feedback on how to improve the logic or presentation of the proof.

2. Advanced AI Integration: "Thinking" Models

The AI module (src/backend/ai_module.jsw) has been completely rewritten to leverage the latest Gemini 3 models, introducing a sophisticated Tiered Task System:

  • Thinking Config: For complex tasks like grading proofs or verifying community problems, the system activates "Thinking" mode (e.g., gemini-3-flash-preview with thinkingConfig). This allows the AI to "reason" through the problem before generating a response, ensuring higher accuracy.

  • Task Types: The system intelligently switches between models based on the task:

    • VERIFICATION / GENERATION: Uses High-Tier models with Thinking enabled.

    • EXPLANATION / HINTS: Uses Low/Medium-Tier models for faster, cost-effective responses.

  • Direct wix-fetch: The implementation now uses wix-fetch directly, bypassing SDK limitations for better reliability.

3. Community Quality Control: No More "Trivia"

A new, strict verification layer (src/backend/community_problems.jsw) ensures that the community problem feed remains high-quality and strictly mathematical.

  • Anti-Trivia Filter: The AI validator explicitly rejects "stupid" or purely computational trivia problems (e.g., "Find the 50,000th prime", "Digits of Pi", arbitrary large multiplication).

  • Topic Validation: Problems are automatically categorized into a detailed VALID_TOPICS_MAP (covering Algebra, Geometry, Number Theory, etc.) and assigned a difficulty level (1-25).

  • Robust JSON Parsing: A new extractAndParseJson helper ensures that AI responses are correctly processed, even if the model includes markdown formatting or extra text.

These updates represent a shift from checking answers to understanding mathematics, powered by state-of-the-art AI.

 
 
 

Recent Posts

See All

1 Comment


Dongeun Kim
Dongeun Kim
Feb 27

Yeah but I haven’t being enjoying gemification thing you made

Like

Get in Touch

Thanks for submitting!

Untitled design_edited.png
bottom of page