Skip to content

ayushchaware08/Audit-GPT

Repository files navigation

Audit-GPT: Financial Document Analysis System

This project integrates a React frontend with a RAG model backend for analyzing financial audit documents. Users can upload documents (PDF, DOCX, TXT) and receive AI-powered analysis and insights.

Project Structure

Audit-GPT/
├── backend/                    # Flask backend API
│   ├── app.py                  # Main Flask application
│   ├── audit_assistant.py      # AI assistant with Groq LLM
│   ├── document_processor.py   # Document processing & ChromaDB
│   ├── requirements.txt        # Python dependencies
│   ├── .env.example            # Environment variables template
│   └── chroma_db/              # Vector database storage
├── src/                        # React frontend
│   ├── components/             # Reusable UI components
│   ├── pages/                  # Page components
│   │   └── UploadPage.tsx      # Document upload & query interface
│   ├── App.tsx                 # Main app component
│   └── main.tsx                # Entry point
├── RAG_model/                  # Original RAG implementation
├── package.json                # Node.js dependencies
├── vite.config.ts              # Vite configuration
└── README.md                   # This file

Setup Instructions

Backend Setup

  1. Create and activate a Python virtual environment:
# Navigate to the backend directory
cd backend

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file in the backend/ directory:
# On Windows
copy .env.example .env

# On macOS/Linux
cp .env.example .env
  1. Edit the .env file and add your GROQ API key:
GROQ_API_KEY=your_groq_api_key_here
CHROMA_DB_DIR=./chroma_db
MAX_CHUNK_SIZE=1000
CHUNK_OVERLAP=200

Get your free API key from: https://console.groq.com/keys

  1. Start the backend server:
python app.py

The backend will run on http://localhost:5000

Frontend Setup

  1. Install Node.js dependencies:
# Navigate to the project root directory
npm install
  1. Start the development server:
npm run dev

The frontend will run on http://localhost:5173

Usage

  1. Start both servers (backend and frontend)
  2. Open your browser and navigate to http://localhost:5173
  3. Click on "Upload" in the navigation menu
  4. Upload a PDF document: Drag and drop a financial audit document (PDF only) or click "Choose File"
  5. Wait for processing: The document will be processed and stored in ChromaDB
  6. Ask questions: Once uploaded, type questions about the document in the chat interface
  7. Get AI-powered answers: The assistant will analyze the document and provide relevant answers

Example Queries

  • "What is the total revenue for the fiscal year?"
  • "Summarize the key audit findings"
  • "What are the internal control weaknesses mentioned?"
  • "List all compliance issues identified"

Technologies Used

Frontend

  • React 18 - UI framework
  • TypeScript - Type safety
  • Vite - Build tool & dev server
  • TailwindCSS - Styling

Backend

  • Flask - Web server
  • LangChain - RAG framework
  • ChromaDB - Vector database
  • Groq LLM - Language model provider

Key Features

PDF Document Upload - Upload financial audit PDFs for analysis
AI-Powered Q&A - Ask questions about uploaded documents
RAG Technology - Retrieval-Augmented Generation for accurate answers
Context-Aware Responses - Answers based on actual document content
Chat Interface - Interactive conversation with your documents
Vector Search - Fast semantic search using ChromaDB
Clean Response Formatting - Professional, formatted answers without symbols

Contributing

Contributions are welcome! Please open issues or submit pull requests for improvements or new features.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

LLM agent for automating financial auditing and regulatory compliance - Final Year Project

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors