AI Chatbot with RAG for Legal Firm
Document cataloging and semantic search system for legal consulting
The Challenge
The legal firm managed a massive amount of information fragmented across different formats: not just legal PDFs and contracts, but also audio transcripts of hearings, emails, client chats, and agreements. Cataloging was manual and error-prone, making it nearly impossible to quickly cross-reference data from such heterogeneous sources to build a defense strategy or respond to a client. Centralizing this knowledge while ensuring maximum privacy was paramount.
The Solution
I developed a unified platform for the ingestion and analysis of multimodal documents. The system allows lawyers to upload any digital file type (text, audio), which is processed by a local workflow automation system. The engine extracts content, transcribes audio if necessary, and automatically catalogues it by client and case. Thanks to an advanced RAG engine, users can query the entire knowledge base (from a single email to a PDF judgment) in natural language, obtaining answers that precisely cite the original source.
Key Features
Results
Tech Stack
Frontend: Next.js, React, Tailwind CSS. Automation: n8n (Self-hosted). AI/LLM: OpenAI / Local Models (Ollama), LangChain, Whisper (Audio). Database: PostgreSQL + pgvector. Infra: Docker, Private Cloud.