Inspiration

I was inspired by the frustration my classmates and I feel when preparing for exams. I always had trouble finding a way to study efficiently and eventually found that practice tests were most effective. However, there was no quick way to create them. Traditional study tools require a lot of manual input. I wanted to build something smarter; something that could automatically generate meaningful and well-thought-out tests and flashcards efficiently.

What it does

Study Buddy takes a prompt, link (articles, youtube videos), or an uploaded document (textbook chapters, lecture notes) with an interactive front-end and generates high-quality multiple-choice tests or flashcards based on the content. It uses a retrieval-augmented generation (RAG) pipeline and a web search tool to extract relevant context. When searching the web, returns citations to the front-end for the user to trace the context. Then it calls a language model agent to create questions and answers in a structured JSON format. Users receive a test or flashcards that's both educational and tailored to their input.

How we built it

Front End: Built with Next.js and Material UI. This is where users can input prompts, links or upload documents, select test preferences, flashcard preferences, and view the generated test.

Backend: A Flask API that loads and processes documents and links using Langchain's document loaders. Loads Splits and embeds content using HuggingFace embeddings + FAISS for semantic search. Scrapes the web with Tavily’s search API. Defines tools and prompts for a LangGraph agent to invoke context retrieval and generate questions using an OpenRouter-powered LLM. Returns a clean, structured JSON output with Pydantic.

Challenges we ran into

  • LLM recursion limits: LangGraph agents sometimes hit recursion ceilings during tool invocations, requiring prompt tuning and response format adjustments.

  • Prompt Engineering: Creating prompts that lead to a desirable outcome required a lot of fine-tuning and experimenting.

  • Output formatting: Ensuring a valid JSON response from language models was frustrating and took lots of troubleshooting.

  • Parsing large Documents: Chunking and vectorizing documents in a performant way without degrading context quality was tricky, especially for longer uploads.

  • UI/UX: I took a lot of unnecessary time deciding on a color scheme and making user-friendly interfaces.

Accomplishments that we're proud of

  • Successfully built a system where AI can autonomously pull in relevant information from a document, link, or the web and generate a complete, valid, and educational multiple choice test
  • Integrated cutting-edge technologies (Langgraph agents, FAISS, HuggingFace, Pydantic, OpenRouter) into a seamless educational experience.
  • Solved a real world issue with AI automation.

What we learned

  • How to combine document understanding (RAG) with generative capabilities in a controlled, reliable way.

  • How to effectively retrieve information from the web with agentic tooling.

  • How to transcribe information from a video or an article url and use it to provide context, improving accuracy and performance.

  • The value of modular agent tooling in Langchain to give models "abilities" like context lookup.

  • How to debug complex LLM workflows involving parsing, vector search, and structured output.

What's next for Study Buddy

I intend to add:

User experience: add a more responsive and informative loading screen and alert the user if their inputted file or link is invalid

More features: automatic note creation from audio or video for students with different study preferences, a learn mode that uses study techniques like spaced repetition, active recall, an automatic course creation that uses generative ai, or fetches videos to create a course that can have practice tests and flashcards

Increased Agent Performance: agentic reflexion, reasoning, or multi-step agents to enhance accuracy and efficiency of test generation

Authentication System: allow user login and signup and add test/flashcard creation history

Built With

Share this project:

Updates