Skip to content

jeevandas-jd/smartMathTutor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€–πŸ“š Smart Math Tutor – AI Agent Collaboration for Solving and Verifying Math Problems

Welcome to Smart Math Tutor, a project that demonstrates the power of collaborative AI agents working together to solve and verify mathematical problems.

This repo showcases how two AI agents – a Problem Solver and a Verifier – interact in a round-robin format using mathematical tools like SymPy and a calculator to accurately solve equations, derivatives, and arithmetic problems.


πŸš€ What This Repo Is About

Imagine an intelligent math tutor who not only solves your problems but also double-checks every step to ensure accuracy – that's what this system replicates.

πŸ“Œ Main Objectives:

  • One agent solves math problems using symbolic computation.
  • Another agent verifies the solution through evaluation and validation.
  • Both work collaboratively until a correct and validated answer is reached.

πŸ› οΈ What You'll Build

A Python-based AI system where:

Agents:

  • Problem Solver Agent:

    • Uses the solve_math_problem function.
    • Leverages SymPy to solve equations, perform differentiation, or evaluate arithmetic.
  • Verifier Agent:

    • Uses the verify_solution function.
    • Substitutes results into the original problem or recomputes to confirm correctness.

🧠 Tools Used

  • SymPy Tool:

    • Symbolic math library for solving and manipulating math expressions.
    • Examples:
      • Equation solving: x^2 - 4 = 0
      • Differentiation: differentiate x^2
      • Arithmetic: 2 + 2
  • Calculator Tool:

    • Used by the verifier to substitute values and re-evaluate the expressions.

πŸ” Workflow

  • The two agents operate in a round-robin chat.
    1. Problem Solver provides a solution.
    2. Verifier checks and either confirms or asks for correction.
    3. The loop continues until a valid solution is reached and the process ends with "TERMINATE".

βœ… Validation Steps

  • Check if the solution is correct using symbolic substitution.
  • Ensure output is formatted in LaTeX for readability.
  • Confirm both agents reach agreement before termination.

πŸ“¦ Required Packages

Install the necessary dependencies before running:

pip install autogen-agentchat sympy google-generativeai

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages