Skip to main content

Quiz Mode

Quiz mode generates standalone assessments to test the user's knowledge on a topic.

Agents

QuizAgent

generate_quiz(topic, user_background, count=10)

Generates a full quiz with multiple-choice questions.

  • Adaptive Count: If count is set to 'auto', it estimates the appropriate number of questions based on topic complexity using get_quiz_count_for_topic.
  • Validation: Uses validate_quiz_structure to ensure the LLM output is a valid JSON object with question, options, and correct_answer fields.
  • Output: JSON dictionary containing the list of questions.

get_quiz_count_for_topic(topic, user_background)

Consults the LLM to determine the complexity of the topic and suggests a question count (clamped between 5 and 30).