VidhikGuru
AI meets Indian Constitution
The problem VidhikGuru solves
The Indian Constitution is vast, complex, and often overwhelming for students, aspirants, and citizens who want to understand their rights and duties. Existing resources are either textbook-heavy or lack interactivity.
Our project solves this problem by creating an intuitive platform where users can:
- Explore the Constitution in a part-wise, article-wise format with clean card UI.
- Attempt quizzes to reinforce learning.
- Chat with an AI bot trained on constitutional data to ask legal, civic, or rights-related questions in real-time.
- And most importantly — allows users to upload scanned legal documents (PDFs/images) to get them analyzed and explained using Gemini + LangChain
Challenges we ran into
- Parsing Government PDFs
- Used regex + LangChain PDFLoader to extract clean Article/Part mapping.
- Gemini API with LangChain
- Gemini required different handling than OpenAI.
- Built a wrapper using ChatGoogleGenerativeAI in LangChain.
- Adjusted prompts, model configuration, and retries for factual accuracy.
- OCR Document Handling
- Used Tesseract initially for local OCR.
- Also tested Google Vision API for cleaner output on real-world scans.
- Managed text cleaning, chunking, and embedding dynamically.
- Multi-purpose MongoDB
- Used MongoDB Atlas URI for both:
- Mongoose schema data (articles, quizzes)
- LangChain vector embeddings (for Constitution + uploaded docs)
- Ensured collections were isolated and optimized.
Tracks Applied (3)
Authenticate with Civic Auth
Civic Technologies
Best use of Gemini API
Major League Hacking
Best Use of MongoDB Atlas
Major League Hacking
Discussion
Builders also viewed
See more projects on Devfolio


