🧠 Agentic Reasoning Pipeline (ETHOS Hackathon Submission) Overview This project implements a fully custom, modular Agentic Reasoning Pipeline designed to solve diverse problems without relying on external Large Language Model (LLM) APIs.
It adheres strictly to the hackathon's requirement of utilizing self-built/base LLM setups (simulated via robust NLU parsing) and specialized deterministic solvers (tools) for high-precision task execution. The pipeline demonstrates core agentic concepts: classification, planning (routing), tool execution, and transparent tracing.
🌟 Key Features Modular Agentic Architecture: The pipeline separates Natural Language Understanding (NLU) from Reasoning/Execution, routing questions to the most appropriate dedicated tool.
Custom NLU Module: A self-built parser simulates a "base LLM" for intent classification (Math, Algebra, Logic, Geometry, Date/Time) and data extraction, replacing the need for external LLM inference.
Deterministic Solvers (Tools): High-accuracy solvers are used for specific domains:
Symbolic Solvers: Solves linear algebra and finds polynomial roots using sympy.
Rule-Based Logic Engine: Custom implementation of Forward Chaining logic for drawing transitive inferences from a defined Knowledge Base (KB).
Transparent Traceability: Every decision—from classification to tool execution and logic inference—is recorded in a detailed output trace, ensuring explainability and verifiable reasoning.
🗂️ Project Structure The project is structured to demonstrate clean separation of concerns:
File / Directory
Role
reasoning_pipeline.py
Core Agent: Contains the ReasoningAgent class, the NLU module, and the routing logic.
solvers/
Directory containing all specialized, deterministic tools (solvers).
solvers/logic_solver.py
Contains the custom Forward Chaining rule engine.
solvers/math_solver.py
Contains solve_math, solve_algebra, and solve_polynomial (Symbolic Solvers).
solvers/geometry_solver.py
Contains the Geometric tool (Area/Perimeter).
solvers/datetime_solver.py
Contains the Date/Time calculation tool.
main.py
Execution file for demonstrating the agent with example questions.
requirements.txt
Lists required Python dependencies (sympy).
🚀 Setup and Run Prerequisites Clone the Repository (Simulated): Ensure all files (main.py, reasoning_pipeline.py, and the solvers/ directory) are in place.
Install Dependencies: Use the provided requirements.txt to install the necessary libraries, primarily sympy for symbolic math.
pip install -r requirements.txt
Execution Run the demonstration script to see the agent process a batch of diverse questions:
python main.py
The output will show the question, the final answer, and the detailed step-by-step Agent Trace for verification.