yuedai-pbc/FINESSE-Financial-Reasoning-Agent
About
Reference implementation of FINESSE: self-reflective multi-agent financial reasoning with dynamic expert routing and ethical verification.
Business & FinanceMeasured star growth
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- +49
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalFINESSE
Self-Reflective Multi-Agent Financial Reasoning with Dynamic Expert Routing and Ethical Verification
FINESSE is a reference implementation of a multi-agent architecture for explainable, retrieval-grounded, and ethically verified financial reasoning. It decomposes complex financial queries into dependent subtasks, routes each subtask to specialized experts, coordinates structured debate, and verifies the resulting consensus before returning a response.
The system combines five specialist roles - Investment, Risk, Macro, Ethics, and Quantitative analysis - with a planner, dynamic top-k router, financial memory, retrieval-augmented grounding, self-reflective debate, and a final verifier.
Architecture at a glance
- Hierarchical planner - converts a complex financial query into a directed acyclic graph of subtasks.
- Dynamic expert router - activates the most relevant LoRA specialists while accounting for load and latency.
- Dual-stream grounding - combines semantic retrieval from a financial corpus with gated persistent memory.
- Self-reflective debate - allows specialists to challenge, refine, and consolidate their analyses.
- Verifier and ethics audit - checks the consensus and can return feedback to the planner for another pass.
Hierarchical task decomposition
The planner organizes subtasks by topological depth. Independent nodes at the same depth can run in parallel, reducing the critical execution path from the number of subtasks to the graph depth.
Latency-aware dynamic expert routing
Each subtask embedding is scored against the expert pool. The router activates a top-k subset and aggregates their outputs, while auxiliary objectives encourage balanced expert utilization and latency-aware routing.
Retrieval and persistent financial memory
FINESSE uses adaptive semantic chunking and FAISS-based retrieval for external grounding. A gated key-value memory stores reusable financial reasoning traces and supplies relevant context to later subtasks.
Repository contents
FINESSE/
|-- main.py
|-- requirements.txt
|-- baselines/
|-- data/
|-- src/
| |-- task_planner.py
| |-- expert_router.py
| |-- expert_agents.py
| |-- debate_protocol.py
| |-- rag_module.py
| |-- memory_bank.py
| |-- ethics_module.py
| |-- evaluation.py
| `-- finesse_pipeline.py
|-- assets/
`-- PUBLIC_RELEASE_AUDIT.md
Installation
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
Configure an OpenAI-compatible model endpoint without committing credentials:
export TYPHOON_API_BASE="https://your-endpoint.example/v1"
export TYPHOON_API_KEY="your-key"
For a local OpenAI-compatible server, use OPENAI_API_BASE and OPENAI_API_KEY. Never place a real key in source files or Git history.
Usage
python main.py --help
python main.py demo
python main.py evaluate
Release scope and reproducibility
This public package contains the inference-oriented architecture, evaluation utilities, baseline clients, configuration, and small synthetic/example data files. It is not a full reproduction bundle for the paper's reported training run.
The following items are not included:
- trained model weights or LoRA adapters;
- the complete benchmark and financial knowledge base;
- training infrastructure and trained router/ethics checkpoints;
- the exact environment required to reproduce the paper's reported tables.
The train command in main.py is currently a placeholder. Randomly initialized planner, router, and ethics components are suitable for code inspection and API demonstrations, not for reproducing the paper's reported evaluation without trained parameters.
See PUBLIC_RELEASE_AUDIT.md for the publication review, exclusions, and remaining reproducibility gaps.
Data and model licensing
The bundled CSV files and knowledge-base text are examples only. Before publishing this repository, the authors must confirm that they created these files or otherwise have redistribution rights.
Model users must separately comply with the licenses and access terms of Typhoon2, Llama, Qwen, embedding models, and their selected inference provider.
License
No software license has been selected in this draft release. Add a license only after all authors agree and confirm that they have the right to license every included file. Until then, public visibility does not grant reuse rights.
Citation
Add the final arXiv identifier and BibTeX entry after the submission is publicly announced.
Explore related projects
Loading…