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)