Inspiration :
Tunisian legal texts are often complex, outdated in format, and difficult to access—especially for youth, the elderly, and rural populations. Navigating administrative procedures typically involves digging through lengthy paper documents or unstructured legal codes. Our solution aims to be a game-changer: it provides up-to-date legal and administrative information instantly, clearly, and reliably—right at the citizen’s fingertips.
What it does :
Tuniguid is an AI-powered legal assistant that allows users to search, understand, and interact with Tunisian laws and administrative documents. It includes:
A chatbot capable of answering questions about legal texts.
A document upload feature that analyzes scanned legal documents.
An automatic update system connected to JORT (via 9anoun.tn) to ensure all legal content remains current and accurate.
How we built it :
Our solution is an agentic system developed using the LangGraph framework. It consists of three core features:
Tunisian Law Document Reader Combines OCR (PaddleOCR) to extract text from scanned legal documents, and an LLM to correct and clean the extracted content for accurate analysis.
Tunisian Law Chatbot After a document is uploaded, it is chunked and stored in a vector store database (Qdrant). This enables an interactive chatbot that can directly answer any question about the uploaded document using Hybrid-RAG (semantic search + bag-of-words) for improved accuracy.
JORT Update Feature Automatically retrieves the latest legislative texts from 9anoun.tn and updates the system’s knowledge base to reflect recent amendments and new laws.
Finally, the entire system was deployed via a web platform using Flask as the backend framework.
Challenges we ran into :
Identifying and organizing reliable sources for Tunisian legal codes was challenging.
Legal texts are often long, complex, and require deep domain knowledge to process accurately.
Performing LLM inference on large documents was computationally demanding, which led us to integrate Groq APIs for faster and more efficient processing.
Accomplishments that we're proud of :
Built a fully functional system that digitizes, interprets, and responds to questions about scanned legal documents.
Developed a robust agentic workflow using LangGraph.
Designed a user-friendly web interface that supports document upload, legal search, and chatbot interaction.
What we learned :
Gained hands-on experience with LangGraph, a powerful framework for designing modular AI workflows.
Developed deeper insight into how to preprocess legal documents for accurate AI interpretation.
Learned to optimize LLM performance using tools like Groq APIs for real-time inference at scale.
What's next for Tuniguid :
We aim to pilot this solution in partnership with Tunisian public institutions, collect user feedback, and assess its real-world effectiveness. The next steps include expanding to more legal use cases, refining chatbot accuracy, and continuously improving the system with advanced AI capabilities.
Log in or sign up for Devpost to join the conversation.