Aptitude Test Web App using Streamlit and LLMs

 


๐Ÿง  Introduction

In today's competitive environment, assessing aptitude and reasoning skills has become essential for job placements and government exams. To address this, our team developed an Aptitude Test Web App using Python, Streamlit, and LLM (Groq’s LLaMA-3). The application dynamically generates multiple-choice questions across three core sections: Quantitative, Logical, and Verbal, simulating a real exam experience.


๐Ÿ’ป Tech Stack

  • Frontend & App: Streamlit

  • Backend AI Model: LLaMA-3 via Groq API

  • Data Visualization: Plotly

  • Language: Python


๐ŸŽฏ Objective

To build a dynamic aptitude test platform that:

  • Generates section-wise questions of varying difficulty using an LLM.

  • Tracks user performance in real-time.

  • Displays section-wise scores and feedback after the test.


๐Ÿงช Test Structure

  • Total Questions: 45

  • Sections: Quantitative, Logical, Verbal

  • Each Section: 15 questions (5 Easy, 5 Medium, 5 Hard)

  • Time: 1 min per question

  • Scoring: +1 per correct answer, no negative marking


๐Ÿ› ️ Features

  1. User Input Page – Name, email, and phone number.

  2. LLM-based Question Generator – Uses Groq's LLaMA-3 to generate MCQs from real exam topics like SSC, CAT, GATE, etc.

  3. Timer per Question – 60-second timer per question.

  4. Dynamic Section Loading – Each section starts with instructions and then loads questions.

  5. Live Answer Tracking – Saves responses section-wise.

  6. Final Result Page – Shows:

    • Overall score and rating (Excellent, Good, Average, Needs Improvement)

    • Section-wise performance

    • Plotly Pie & Bar Charts

    • Personalized feedback


๐Ÿ“Š Data Visualization

  • Pie Chart: Shows overall score

  • Bar Graph: Section-wise accuracy

  • Data Table: Displays correct answers per section and overall accuracy


๐Ÿค– AI-Generated Questions

All questions are generated live using this LLaMA-3 prompt:

“Generate 15 multiple-choice questions of varying difficulty for [section] covering topics like Profit & Loss, Coding-Decoding, Grammar, etc.”

Each question includes:

  • Question text

  • 4 answer options

  • Correct answer for scoring


๐Ÿ’ฌ Personalized Feedback

After the test, users receive motivational and section-wise feedback:

  • Above 80%: Excellent – Practice advanced sets

  • 60–79%: Good – Strengthen concepts

  • 40–59%: Average – Focus on basics

  • Below 40%: Needs Improvement – Start with foundations

๐Ÿ“ท Screenshots of the App

๐Ÿ–ผ️ User Details Page

This page collects the user’s name, email, and phone number before starting the test.

๐Ÿ–ผ️ Section Introduction Page

Before each test section begins, the app displays a brief overview of what topics are covered and how the section is structured. For example:

  • Quantitative Aptitude includes Profit & Loss, Time & Work, Percentages, etc.

  • Logical Reasoning covers Number Series, Puzzles, Blood Relations, and more

  • Verbal Ability focuses on Reading Comprehension, Grammar, Vocabulary, etc.



๐Ÿ–ผ️ Question Page with Timer

During the test, each section presents one question at a time with a 60-second countdown timer. The question includes:

  • A multiple-choice format with 4 options

  • A "Next" button to proceed (automatically moves if time runs out)



๐Ÿ“Š Final Score Pie Chart

A pie chart shows your total score as a percentage of correct answers.

๐Ÿ“Š Section-wise Accuracy Bar Chart



A bar chart displays performance in each section: Quantitative, Logical, and Verbal.

๐Ÿงพ Section-wise Performance Table

A table summarizing total questions, correct answers, and accuracy percentage per section.

๐Ÿ“ Personalized Feedback Display

Based on your score, the app generates section-wise tips and encouragement messages.


๐Ÿ”š Conclusion

This team project helped us explore real-time UI development using Streamlit, integrate LLMs (LLaMA-3 via Groq) for dynamic question generation, and apply Plotly for data visualization. It demonstrates how AI and app development can be combined effectively in EdTech to create interactive learning tools.







Comments