Welcome to my Gemmatician - MathsGPT – an end-to-end generative AI application powered by Google Gamma! This app is built using Streamlit and leverages the latest AI models and agent toolchains to provide dynamic step-by-step solutions for math and logical reasoning problems.
- Chatbot Interface: Ask math questions in natural language and get step-by-step explanations.
- Supports Logical Reasoning: Not just calculations–get thoughtful answers to logical and multi-step problems.
- Integrated Wikipedia Search: Fetches relevant information for queries requiring background knowledge.
- Persistent Chat History: Conversations are maintained for session continuity using Streamlit's session state.
- Agent-Based Toolchain: Combines multiple tools (calculator, Wikipedia, logic/reasoning) with Google Gamma's LLM for robust results.
- Streamlit provides the frontend and stateful chat interface.
- Google Gamma (via Grok API): The backbone LLM for all generative and reasoning tasks.
- Tools & Agents (Langchain):
- Wikipedia Tool: Handles search and fetch queries.
- Calculator Tool: Parses and solves mathematical expressions.
- Reasoning Tool: Runs custom prompts with the LLM to solve multi-step or logic-based queries.
- User inputs a math or logic question.
- Agent orchestrates the required tools based on the task:
- For direct math: Calculator Tool
- For context/knowledge: Wikipedia Tool
- For logic/reasoning: Reasoning Tool (LLM chain with a prompt template)
- Step-by-step response, often with pointwise explanations, is displayed in the chat interface.
- Session history is maintained, and every new question/answer is appended to the chat.