DEV Community

Pratham Uday Pandit
Pratham Uday Pandit

Posted on

I Built an AI-Powered Indian Election Guide — Here's How

🗳️ I Built an AI-Powered Indian Election Guide — Here's How

The Problem I Wanted to Solve

As a student in India, I realized that most first-time voters (including myself!) don't fully understand how elections work. Existing resources are either too boring, too long, or not interactive at all.

So for PromptWars: Build with AI, I built VoteGuide AI — an AI-powered assistant that makes understanding Indian elections simple, fun, and interactive.

🔗 Live Demo: https://voteguide-ai.vercel.app
💻 GitHub: https://github.com/prathampandit555/voteguide-ai


🎯 What Does VoteGuide AI Do?

VoteGuide AI is a conversational assistant that:

  • Guides users step-by-step through the voting process
  • Personalizes experience based on user role
  • Runs real-life voting simulations
  • Tests knowledge with quiz mode
  • Checks voter eligibility
  • Shares amazing election facts
  • Supports Hindi language 🇮🇳

👤 Role-Based Personalization

One of my favorite features is role-based personalization. When you open the app, you choose who you are:

  • 🌟 First-time Voter
  • ✅ Returning Voter
  • 🎓 Student
  • 🔍 Curious Citizen

The AI completely changes its tone and depth based on your role. A first-time voter gets simple, encouraging, step-by-step guidance. A returning voter gets quick updates and reminders.


🛠️ Tech Stack

Technology Purpose
React 18 Frontend UI
Groq API (LLaMA 3.3 70B) AI Intelligence
Express.js Backend Proxy
Node.js Runtime
Vercel Deployment

🧠 The AI Prompt Engineering

The most important part of this project was prompt engineering. I designed the system prompt to:

  1. Handle multiple modes (chat, quiz, simulation)
  2. Adapt to different user roles
  3. Respond in Hindi when requested
  4. Always end with follow-up options
  5. Reference official ECI guidelines

Here's a snippet of my approach:

You are VoteGuide AI — an expert, friendly assistant
helping Indian citizens understand the election process.
VOTER ELIGIBILITY CHECKER:
When asked about eligibility, ask questions one by one:

Are you an Indian citizen?
How old are you?
Are you registered in the electoral roll?
Then give a clear YES/NO result with explanation.


🎮 Simulation Mode — My Favorite Feature

The simulation mode creates real-life voting scenarios:

"It's election morning. You wake up and realize you forgot where your polling booth is. What do you do?"

Users pick from 4 options and the AI gives smart feedback on wrong choices — just like a real mentor!


🚀 What I Learned

Building this project taught me:

  1. Prompt engineering is an art — small changes make huge differences
  2. React + AI APIs are a powerful combination
  3. User personalization makes apps 10x better
  4. Deploying on Vercel is incredibly easy

🌟 Try It Yourself!

🔗 Live Demo: https://voteguide-ai.vercel.app
💻 GitHub: https://github.com/prathampandit555/voteguide-ai

I'd love your feedback! What features should I add next?


Built with ❤️ for PromptWars: Build with AI by Pratham Pandit

Top comments (0)