CogniFast Study : Transforming Notes into Interactive Learning
Inspiration
The inspiration for CogniFast Study came from the need to combat passive learning inherent in traditional studying. We realized that simply reading static lecture PDFs doesn't guarantee comprehension. Our core goal became: How can we instantly convert a static, boring PDF into an engaging, multi-modal learning experience that actively tests the user? This led to designing a study companion that automates the tedious work (extraction, summarization) so the user can focus on high-value, active study methods.
What it does
CogniFast Study instantly transforms uploaded PDF documents into five distinct, interactive study tools:
Interactive Quiz: Generates multiple-choice quizzes of adjustable difficulty based on the document content, complete with instant feedback and scoring.
Flashcards: Extracts and presents key concepts and definitions for quick memorization and review.
Mind Map (Visual Knowledge Graph): Generates a Graphviz DOT code visualization, illustrating the hierarchical relationships between the document's main ideas.
Audio Summary (Podcast Mode): Converts a concise AI-generated summary script into audio using the
gTTSlibrary, allowing users to listen and review notes on the go (customized for a British English accent).AI Tutor (Chat): Provides a conversational interface where users can ask complex questions about the document's context, serving as a dedicated, personalized teaching assistant.
How we built it
CogniFast Study is built on a robust architecture leveraging Python and Streamlit for the frontend, powered by the incredible speed of Groq Cloud for AI inference.
Architecture Highlights:
Core Extraction (
pypdf): Handles the initial heavy lifting of extracting raw text from the PDF file.Rapid AI Processing (Groq API): We use the
llama-3.1-8b-instantmodel via the Groq API. The low latency of the Groq LPU™ is critical for delivering near-instant quiz and flashcard generation, which significantly enhances the user experience.Structured Output Engineering: Specialized functions in
utils.pyutilize fine-tuned prompts to force the LLM to return data in specific, strict JSON formats for predictable and reliable output (e.g., questions/options, concepts/definitions).Two-Page Security Model: We implemented custom session-state management to enforce separation. The sensitive API Key and PDF upload are confined to the
Home Page, while the study tools operate in a secure, cleanTools Page. This significantly improves privacy and UX.Custom Theming: The application uses a custom "Soft Neo-Minimal" theme (
styles.py) for a professional and consistent visual identity.
Challenges we ran into
LLM JSON Adherence: The most frequent roadblock was ensuring the LLM reliably generated perfectly structured JSON (especially for the quiz data and initial attempts at flat keyword lists), leading to numerous parsing errors. This required explicit, restrictive prompt engineering.
External Tool Fragility: An attempt to implement a "Related Videos" feature using a non-API scraping library (
Youtube) proved highly unreliable due to network and structural changes, forcing us to remove the feature to preserve application stability.Streamlit Layout Optimization: We faced layout challenges in ensuring all quiz options and the submit button fit the screen without requiring vertical scrolling, which was solved by carefully adjusting the quiz container layout and element spacing.
Accomplishments that we're proud of
Achieving Near-Instant Generation: Leveraging the Groq LPU™ to generate complex quiz and flashcard data almost instantly, transforming the typical "AI waiting experience" into a fluid study session.
Robust Security and UX: Successfully separating the application into two distinct pages, hiding the API key from the main tool interface.
Elegant Score Display: Implementing the improved quiz completion screen that provides immediate feedback, percentage score, and tailored advice based on performance.
What we learned
We learned that code quality and robust parsing are paramount when dealing with LLM-generated content. We initially underestimated the difficulty of forcing a generative model to adhere to strict schemas, requiring us to become experts in defensive parsing and prompt specificity. Furthermore, we reaffirmed the importance of application stability over feature quantity, making the difficult but correct decision to remove the unstable video feature.
What's next for CogniFast Study - Study Companion
Enhanced Quiz Features: Implement question shuffling, time limits, and question skipping/marking for review.
Flashcard Interaction: Develop interactive flashcard flip mechanics instead of simple expanders.
Persistence Layer: Integrate a database (like Firebase Firestore) to allow users to save their processed documents, quizzes, and chat history between sessions.
Log in or sign up for Devpost to join the conversation.