# Abstract
Audit Assistant Chatbot is an AI-driven system to assist with audit inquiries using Retrieval-Augmented Generation (RAG) technology. The app, featuring a Flask backend and React frontend, leverages Groq's LLM (llama-3.3-70b-versatile model) to provide accurate, context-specific responses to audit inquiries. The system ingests and processes documents from PDF and TXT files, creating a searchable knowledge base that enables the AI to provide relevant, sourced information. With conversation history persistence, custom chunking, and knowledge export capabilities, the Chatbot is an end-to-end solution for audit professionals seeking quick access to information.
The system follows a systematic approach to deliver accurate and contextually relevant answers:
Document Processing:
Takes in documents from the data/ directory, and it accepts PDF and TXT formats Applies user-configurable text chunking (default 500 tokens with 50-token overlap) Utilizes Sentence Transformer embedding’s to create vector representations of text chunks
Vector Database:
Employs Chroma as the vector database for efficient similarity search Stores document chunks alongside their embedding’s for quick retrieval Supports dynamic knowledge base updates
Query Processing:
Processes user queries through a multi-stage pipeline Retrieves relevant document chunks based on vector similarity search Augments the LLM prompt with retrieved context Generates responses using the Groq LLM with tunable parameters (temperature, max_tokens)
Conversation Management:
Stores conversation history in a SQLite database Multiple users and sessions supported Sliding window trimming for context management
API Architecture:
RESTful endpoints for querying and history management Asynchronous processing for performance, robust error handling and logging Results The Audit Assistant Chatbot demonstrates several significant
Efficient Knowledge Retrieval:
Successfully processes and retrieves information from audit documents Responds with relevant context from the knowledge base according to sources Preserves context over multiple queries in a conversation.
Technical Implementation:
Modular architecture with clean separation of concerns Configurable through config.yaml for diverse use cases robust error handling and logging for production use
User Experience:
Conversational web UI with history responsive UI with Tailwind CSS Real-time interaction with streaming responses
Scalability:
Document processing pipeline optimized Vector database optimization for fast similarity search Support for large document collections. The system provides a solid foundation for audit professionals to query and access information of interest with speed, with potential for extension and customization to handle more specialized audit workflows.