Inspiration
Hundreds of millions of Indians think, study, and speak in Hinglish — Hindi-English code-switching — but every major voice assistant answers them in stiff, formal English (or formal Hindi). Students preparing for exams think in the mixed language they grew up with; study tools that can't meet them there lose them. PadhaiPal was inspired by my own exam prep: 134 detailed machine-learning notes, and no study tool that could talk about them the way I actually talk.
What it does
PadhaiPal is a Hinglish-first study companion built as an Alexa+ experience. You ask a study question the way you'd actually say it — "gradient descent ko simple words mein samjha do" — and PadhaiPal explains it back in Hinglish, citing the exact study notes the answer came from. Then it does what a good study buddy does: offers a 3-question quiz with instant feedback and Hinglish explanations of your mistakes, plus flippable flashcards — and it can speak its answers in a Hindi voice, right in the browser.
How we built it
- Self-hosted MCP server (MCP spec 2025-11-25+, Streamable HTTP) exposing five tools the code actually calls at runtime:
ask_concept,explain_hinglish,quiz_me,make_flashcards,cite_sources. - RAG over real study material: 450 searchable chunks indexed from 134 detailed machine-learning study notes (TF-IDF, scikit-learn), so answers are grounded and cited — not hallucinated.
- Simulated Alexa+ web experience: chat + voice input (Web Speech API, Hindi locale), quiz/flashcard rendering, TTS toggle — the demo surface judges interact with.
- LLM backend: Google Gemini generates the answers, quizzes, and flashcards in this demo. The backend is pluggable by one env var (
LLM_PROVIDER): an AWS Bedrock backend (Converse API,amazon.nova-micro-v1:0, us-east-1) is implemented and wired the same way, but the AWS account's Bedrock entitlement is currently pending an AWS-side enablement (Support case open with AWS), so the submitted demo runs on the backend that is verified working end-to-end.
Challenges we ran into
- MCP SDK v2 renamed FastMCP to MCPServer — every tutorial teaches the v1 API; the import error's migration pointer saved us, and the full JSON-RPC handshake (initialize → tools/list → tools/call) was verified by hand.
- Mounting the MCP app inside a parent web app silently breaks — the Streamable HTTP session manager never starts as a sub-app. Solved by registering the web routes directly on the MCP server via
@mcp.custom_route, one app, one lifespan. - Two LLM providers failed for non-code reasons: my Groq key's organization is restricted (400
organization_restricted), and the AWS account's Bedrock entitlement is blocked account-wide (Error 002, under AWS review with no timeline). The pluggable-backend design absorbed both — the demo ships on Gemini, verified end-to-end. - A subtle retrieval bug: questions typed in Devanagari script match zero tokens against the English notes index, so retrieval correctly returns "not in your notes." Roman-script Hinglish questions retrieve and cite properly — a real lesson in how script choice affects keyword retrieval.
Accomplishments that we're proud of
- A real, working Alexa+ architecture: a self-hosted MCP server over Streamable HTTP, genuinely called at runtime — not a mock or a screenshot demo.
- Answers grounded in a real student's real notes, with citations a judge can verify against the source files.
- The full study loop in one flow: ask → cited answer → quiz with feedback → flashcards → spoken answers in Hindi.
- Designed, built, and tested in six days, during exam week.
What we learned
- How MCP servers actually work under the hood — sessions, lifespans, and why the transport details matter more than the tool functions.
- Retrieval quality is a data problem before it is a model problem: chunking and script/token overlap decided whether answers were grounded.
- Pluggable backends are not over-engineering. Two providers failed for account reasons during this build; the design meant neither failure could sink the project.
What's next for PadhaiPal - Hinglish Alexa+ Study Companion
- Personal note libraries: any student uploads their own notes and gets their own cited companion.
- Embeddings-based retrieval to replace TF-IDF, so Devanagari and Roman Hinglish both retrieve well.
- Switching the demo backend to the already-implemented Bedrock provider once AWS enables the account.
- A native Alexa skill front-end on top of the same MCP server.
Honesty disclosure
The 134 ML study notes used as RAG data pre-date the hackathon (they are data, cited as such). Every line of the MCP server, agent layer, and web demo was built inside the submission window, starting 2026-10-17.
Built With
- github
- google-gemini-api
- mcp
- python
- rag
- scikit-learn
- starlette
- uvicorn
- web-speech-api
Log in or sign up for Devpost to join the conversation.