Skip to content

Scientific/Finance Tools Module#62

Merged
a-kore merged 9 commits into
mainfrom
tooluse_experiments
Mar 13, 2026
Merged

Scientific/Finance Tools Module#62
a-kore merged 9 commits into
mainfrom
tooluse_experiments

Conversation

@a-kore
Copy link
Copy Markdown
Collaborator

@a-kore a-kore commented Mar 10, 2026

PR Type

Feature

Short Description

Adds comprehensive scientific computing toolkit enabling LLM agents to execute Python code for mathematical, scientific, and financial computations. Includes safe code execution engine, support for 12+ libraries (NumPy, SciPy, SymPy, financial packages), tool-assisted scientist agent, and type system improvements. Operates in parametric mode by default (leveraging LLM's built-in knowledge) for minimal latency and token usage.

  • ScientificToolKit: High-level orchestration with parametric mode (default), optional RAG/tool-selection (WIP)
  • PythonExecutor: Safe code execution with import restrictions and error handling
  • ToolAssistedScientist: Enhanced agent with two-stage architecture (code generation → answer formatting)
  • Library Support: NumPy, SciPy, SymPy, statsmodels, numpy_financial, py_vollib, PyPortfolioOpt, empyrical, arch
  • JSON/LaTeX Handling: Inclusion of json parsing from LLM responses with LaTeX expressions from Ali M.

Tests Added

  • 27 unit tests (test_toolkit.py: 18 tests, test_executor.py: 9 tests)
  • 8 edge case tests for malformed LLM responses (trailing commas, markdown wrapping, etc.)
  • 2 integration tests with real Gemini API (skipped by default to avoid costs)

@a-kore a-kore requested review from Ali-Meh619 and saidul-islam98 and removed request for Ali-Meh619 March 10, 2026 21:45
Copy link
Copy Markdown
Collaborator

@saidul-islam98 saidul-islam98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@a-kore a-kore merged commit 743083c into main Mar 13, 2026
2 checks passed
@a-kore a-kore deleted the tooluse_experiments branch March 13, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants