https://github.com/jv456/gemmatician
A generative AI Streamlit app that solves math and logic problems from natural language, powered by Google Gamma and Langchain agents.
https://github.com/jv456/gemmatician
google-gemma2 langchain streamlit
Last synced: about 2 months ago
JSON representation
A generative AI Streamlit app that solves math and logic problems from natural language, powered by Google Gamma and Langchain agents.
- Host: GitHub
- URL: https://github.com/jv456/gemmatician
- Owner: JV456
- Created: 2025-07-19T12:49:57.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-07-19T15:38:21.000Z (11 months ago)
- Last Synced: 2025-07-19T17:12:00.936Z (11 months ago)
- Topics: google-gemma2, langchain, streamlit
- Language: Python
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gemmatician - MathsGPT
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.
---
## ✨ Features
- **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.
---
## 🛠️ How It Works
### Architecture
- **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.
### Flow
1. **User inputs a math or logic question.**
2. **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)
3. **Step-by-step response**, often with pointwise explanations, is displayed in the chat interface.
4. **Session history** is maintained, and every new question/answer is appended to the chat.
---
## 📝 Example Usage and Output


---