Skip to content

feat: Generate Quiz - #10

Merged
ItsAbhinavM merged 1 commit into
amfoss:mainfrom
Nishthajain7:generate-quiz
Apr 11, 2026
Merged

feat: Generate Quiz#10
ItsAbhinavM merged 1 commit into
amfoss:mainfrom
Nishthajain7:generate-quiz

Conversation

@Nishthajain7

@Nishthajain7 Nishthajain7 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Description

Implements the quiz generation feature using gemini API. This PR adds a new endpoint to generate MCQ questions from input syllabus.

JSON schema enforced via response_json_schema

Model: gemini-3-flash-preview

Related Issue

Fixes #9

@Nishthajain7

Copy link
Copy Markdown
Contributor Author

@ItsAbhinavM Could you please review the PR

@ItsAbhinavM
ItsAbhinavM self-requested a review April 10, 2026 13:52
Comment thread app/routers/quiz.py

prompt = f"""
Generate MCQ questions from the JEE syllabus given below
{syllabus_text}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you give an example of syllabus_text after adding datas like subject, concepts and chapters. I just want to know how it would be before giving it to the LLM.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I select the chapters "Units of measurements" and "Coordination Compounds" the syllabus_text is

Physics
- Chapter: Units and Measurement
  Concepts: Units of measurements, System of units, SI Units, Fundamental and derived units, Least count, Errors in measurements, physical quantities, Dimensional analysis

Chemistry
- Chapter: Coordination Compounds
  Concepts: Introduction to coordination compounds, Werner's theory, Ligands, Coordination number, Colour and magnetic properties, Importance in qualitative analysis, extraction of metals

Comment thread app/schemas/quiz.py
Comment thread app/schemas/quiz.py
Comment thread app/routers/quiz.py
@ItsAbhinavM
ItsAbhinavM merged commit eefa725 into amfoss:main Apr 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate Quiz Endpoint

2 participants