Skip to content
VidhikGuru

VidhikGuru

AI meets Indian Constitution

Created on 21st June 2025

•

VidhikGuru

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:

  1. Explore the Constitution in a part-wise, article-wise format with clean card UI.
  2. Attempt quizzes to reinforce learning.
  3. Chat with an AI bot trained on constitutional data to ask legal, civic, or rights-related questions in real-time.
  4. 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

  1. Parsing Government PDFs
  • Used regex + LangChain PDFLoader to extract clean Article/Part mapping.
  1. 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.
  1. 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.
  1. 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

Our project fits the CIVICS Auth track because it emphasizes secure, personalized civic learning powered by authenticati...Read More
Civic Technologies

Civic Technologies

Best use of Gemini API

Our project showcases a powerful and practical implementation of the Gemini API by using it across multiple real-world c...Read More
Major League Hacking

Major League Hacking

Best Use of MongoDB Atlas

Our app uses MongoDB Atlas for every database operation, from storing articles to AI search. Its key features include : ...Read More
Major League Hacking

Major League Hacking

Discussion

Builders also viewed

See more projects on Devfolio