BharatLex
Turn proof into Action!
The problem BharatLex solves
Legal awareness and access in India is still fragmented and difficult for most people to navigate. When someone faces a legal issue, the first and most important challenge is not taking action, but understanding what the problem actually means in legal terms. Real-world situations like scams, fraud, threats, or disputes don’t naturally map into clear legal categories for an average person, which creates immediate confusion at the very beginning itself.
Even when legal help exists, it is often not accessible in a way that supports quick early-stage understanding. Consulting a professional can be expensive, and most available resources are not designed to guide users step-by-step from their raw situation to a structured legal interpretation. On top of that, legal language and processes are typically complex, making it harder for non-lawyers to clearly understand their rights or possible next steps.
Because of this gap, many people either delay taking action, misunderstand the seriousness or nature of their situation, or fail to properly structure their information when they eventually seek help. This weakens their ability to respond effectively and can reduce the quality of any legal support they later receive.
Overall, there is a missing first layer of support — a simple, intelligent system that can take a user’s real-world problem and convert it into structured legal understanding in real time, before the need for formal legal intervention.
Challenges we ran into
During development, we initially built BharatLex using a RAG-based approach, but after mentor feedback, we were asked to shift towards a multi-agent system. This required us to redesign the architecture so that different agents could handle specific responsibilities like classification, legal reasoning, and response generation. While this improved structure and modularity, it also introduced complexity in coordination between agents.
We also faced frequent token exhaustion issues while using Gemini, especially since our pipeline involves multiple LLM calls per user request. To address this, we integrated Ollama for local model execution, which allowed us to run certain components directly on local machines. This reduced dependency on external APIs, improved speed during development, and made the system more cost-efficient.
Another challenge was that the multi-agent system was taking too long due to extended internal discussions between agents. In some cases, agents were iterating excessively and consuming unnecessary tokens. To solve this, we optimized the system by limiting interactions to a maximum of two reasoning rounds, ensuring faster responses while still maintaining structured output quality.
Overall, these adjustments helped us balance performance, cost, and system complexity, making BharatLex more efficient and practical for real-world use.
Tracks Applied (4)
Vultr
Major League Hacking
MongoDB
Major League Hacking
Sarvam.ai
Sarvam.ai
Gen AI&ML
HackPrix

