Skip to content

Built based on research paper: QuantMind: A Context-Engineering Based Knowledge Framework for Quantitative Finance

Notifications You must be signed in to change notification settings

Yvette-0508/quantmind-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuantMind RAG System

A research-grounded Financial RAG system based on the QuantMind architecture.

Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│                    QUANTMIND RAG SYSTEM                          │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  STAGE 1: KNOWLEDGE EXTRACTION                                   │
│  ┌──────────┐ → ┌──────────┐ → ┌──────────┐ → ┌──────────┐     │
│  │  Parse   │   │Summarize │   │   Tag    │   │  Store   │     │
│  │(multimodal)  │(adaptive) │   │(domain)  │   │(vectors) │     │
│  └──────────┘   └──────────┘   └──────────┘   └──────────┘     │
│                                                                  │
│  STAGE 2: INTELLIGENT RETRIEVAL                                  │
│  ┌──────────┐ → ┌──────────┐ → ┌──────────┐ → ┌──────────┐     │
│  │  Query   │   │ Retrieve │   │ Reason   │   │ Generate │     │
│  │  Parse   │   │(adaptive) │   │(multi-hop)│  │(knowledge)│    │
│  └──────────┘   └──────────┘   └──────────┘   └──────────┘     │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘

Project Structure

quantmind_rag/
├── src/
│   ├── models/              # Data models
│   │   ├── __init__.py
│   │   ├── document.py      # Document, Chunk, Entity models
│   │   └── query.py         # Query, Response models
│   │
│   ├── extraction/          # Stage 1: Knowledge Extraction
│   │   ├── __init__.py
│   │   ├── parser.py        # Multi-modal parser
│   │   ├── summarizer.py    # Adaptive summarization
│   │   └── tagger.py        # Domain-specialized tagging
│   │
│   ├── retrieval/           # Stage 2: Intelligent Retrieval
│   │   ├── __init__.py
│   │   ├── retriever.py     # Adaptive retrieval strategies
│   │   ├── reasoner.py      # Multi-hop reasoning
│   │   └── generator.py     # Knowledge-aware generation
│   │
│   ├── storage/             # Data storage layer
│   │   ├── __init__.py
│   │   ├── vector_store.py  # Vector database interface
│   │   ├── graph_store.py   # Knowledge graph storage
│   │   └── doc_store.py     # Document storage
│   │
│   ├── verification/        # Hallucination mitigation
│   │   ├── __init__.py
│   │   └── verifier.py      # Claim verification
│   │
│   └── api/                 # API layer
│       ├── __init__.py
│       └── routes.py        # FastAPI endpoints
│
├── config/
│   └── settings.py          # Configuration
│
├── main.py                  # Application entry point
├── requirements.txt         # Dependencies
└── README.md

Quick Start

# Install dependencies
pip install -r requirements.txt

# Run the API server
python main.py

# Or use the pipeline directly
python -c "from src.pipeline import QuantMindPipeline; p = QuantMindPipeline()"

Research Foundation

Based on:

  • QuantMind: Two-stage decoupled architecture (extraction + retrieval)
  • FinReflectKG: Knowledge graph for 24% accuracy improvement
  • InterpDetect: Hallucination detection via ECS/PKS scores
  • TS-Agent: Feedback loops and memory for continuous improvement

quantmind-rag

About

Built based on research paper: QuantMind: A Context-Engineering Based Knowledge Framework for Quantitative Finance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages