hammadii123 /
AI-Crypto-Assistant
An intelligent crypto assistant . This AI agent answers questions about cryptocurrencies, market trends, and blockchain concepts while also showing simulated price trends using clean visual charts.
Loading repository data…
Premkumar9799817360 / repository
About An intelligent Financial Analysis system that combines Knowledge Graphs with Large Language Models using GraphRAG (Graph Retrieval-Augmented Generation) to answer complex financial queries with explainable reasoning.
An intelligent Financial Analysis system that combines Knowledge Graphs with Large Language Models using GraphRAG (Graph Retrieval-Augmented Generation) to answer complex financial queries with explainable reasoning.
I built an intelligent Financial Analysis system using GraphRAG (Graph Retrieval-Augmented Generation) that combines knowledge graphs with Large Language Models (LLMs) to answer complex financial queries with high accuracy, explainability, and multi-hop reasoning.
The system extracts entities and relationships from heterogeneous financial documents, constructs a knowledge graph, and performs hybrid retrieval (vector similarity + graph traversal) to generate grounded, explainable responses.

financial-graphrag/
├── Data/
│ ├── csv_Data/ # 3 CSV files with stock prices and company data
│ ├── json_Data/ # 5 JSON files with financial data
│ ├── pdf_Data/ # 12 PDF files (research papers, reports)
│ └── textfile_data/ # 6 text files (articles, documentation)
├── Preprocessing.py # Document loading, cleaning, chunking, embedding
├── GraphBuilding.py # Knowledge graph construction and visualization
├── AgentWorkflow.py # Agentic AI workflow and reasoning engine
├── AgentMemory.py # Memory management and conversation history
├── config.py # Configuration (API keys, model settings)
├── app.py # Streamlit UI application
├── knowledge_graph.pkl # Serialized knowledge graph
└── agent_memory.json # Persistent memory storage
You can test the project live using the link below:
Or click the button below 👇
I selected the Finance domain because it is highly impacted by current AI advancements and requires reasoning over structured + unstructured data, making it ideal for GraphRAG.
This domain also benefits significantly from:
I collected and curated financial data from multiple sources:
These resources have been collected from multiple high-quality sources including:
Springer Link – Financial Chapter
https://link.springer.com/chapter/10.1007/978-0-306-47828-4_21
AEA Web – Journal of Economic Perspectives (PDF)
https://pubs.aeaweb.org/doi/pdfplus/10.1257/jep.27.2.3
Behavioral Finance on Stock Markets (ResearchGate PDF)
https://www.researchgate.net/profile/Ramona-Birau/publication/258698903_THE_IMPACT_OF_BEHAVIORAL_FINANCE_ON_STOCK_MARKETS/links/02e7e53cbe7d89cb92000000/THE_IMPACT_OF_BEHAVIORAL-FINANCE-ON-STOCK-MARKETS.pdf
Medium – Financial Decision Making Challenges
https://medium.com/illumination/why-is-it-so-hard-to-make-good-financial-decisions-2f3648591041
Medium – AI in Personal Finance Management Systems
https://medium.com/@david-serrault/on-the-design-of-personal-finance-management-systems-based-on-artificial-intelligence-and-machine-b58898265d2f
To ensure efficient experimentation and reduce processing time during early development, CSV datasets were intentionally limited to 100–200 rows.

## Dataset Structure
Data/
├── csv_Data/ (3 CSV files)
├── json_Data/ (5 JSON files)
├── pdf_Data/ (12 PDF files)
└── textfile_data/ (6 TXT files)
Implemented a robust preprocessing pipeline to standardize heterogeneous data formats.

pandas (CSV & JSON handling)
PyPDF2 (PDF parsing)
re (text cleaning)
sentence-transformers/all-MiniLM-L6-v2 (384-dim embeddings)
File: Preprocessing.py

I constructed a semantic knowledge graph using NetworkX, enriched with entity relationships extracted via LLM prompts.
The graph visualization displays:
File: GraphBuilding.py
I designed a multi-step autonomous agent workflow to enable intelligent reasoning.
This is the main file responsible for the agentic AI workflow, which defines how the entire project operates. It includes extensive prompt engineering and manual intent classification.
I created predefined intent categories such as factual_query and multi_hop_reasoning to guide the agent’s behavior. Using classes and methods, the system identifies the user’s intent and routes the query through appropriate processing steps.
The workflow implements multiple functions, including:
Additionally, an answer evaluation module is implemented to assess the quality of the response. This evaluation checks the answer length, verifies whether the answer is supported by source documents, and calculates a confidence score. If the confidence score is 50% or above, the result is marked as High confidence; otherwise, it is marked as Medium confidence.

Manually defined intent categories:
1. factual_query
2. multi_hop_reasoning
3. explanatory_query
File: AgentWorkflow.py
I implemented a manual agent memory mechanism to store previous interactions in a JSON file, which is then loaded into the Streamlit UI to maintain conversational context.
The AgentMemory.py file manages the memory system and defines three separate lists to store different types of information:
Each conversation record is stored with a timestamp, along with the user query, the generated answer, and the retrieved context. This structured memory design enables context-aware responses, improves follow-up question handling, and provides a more personalized user experience.
File: AgentMemory.py
A main configuration file is used to centrally manage all LLM models, API keys, and system parameters required by the application.
The configuration file also defines key preprocessing and retrieval parameters, including:
These settings control document chunking, embedding quality, and retrieval accuracy.
The system uses the following persistent files:
1. knowledge_graph.pkl – Stores the serialized knowledge graph
2. agent_memory.json – Stores agent memory data in list format
Centralizing these configurations ensures easy maintenance, model flexibility, and consistent behavior across the entire GraphRAG pipeline.
File: Config.py
The Streamlit UI is the final layer of the system and displays all important details of the GraphRAG application. It provides a simple chat interface that allows users to ask questions and interact with the agent.

The UI includes the following features:
Although the UI is minimal, it clearly
Selected from shared topics, language and repository description—not editorial ratings.
hammadii123 /
An intelligent crypto assistant . This AI agent answers questions about cryptocurrencies, market trends, and blockchain concepts while also showing simulated price trends using clean visual charts.
HarshitWaldia /
An intelligent AI agent that provides context-aware, actionable weather recommendations using Agentic AI principles. Unlike traditional weather apps that only display raw data, this agent focuses on decision support—helping you make informed choices about clothing, travel, and activities.