Use for existing files. Not recommended for new exams due to escaping complexity.
Best for programming exams. Clean syntax, no quote escaping, supports multi-line code.
Human-friendly format. Native code blocks, easy to write and preview.
title - Exam nameduration - Time in minutes (YAML/MD) or seconds (JSON)passingPercentage - Minimum score to pass (optional, default: 60)id - Unique identifiertype - "single" or "multiple"question - Question textcode - Code snippet (optional)language - Programming language (optional, default: python)options - Array of answer choicescorrectAnswer - Index for single choice (0, 1, 2...)correctAnswers - Array of indices for multiple choicemarks - Points for this questionexplanation - Answer explanationtitle: "Python Programming Exam"
duration: 60 # minutes
passingPercentage: 60
questions:
- id: Q1
type: single
marks: 3
question: "What will this code print?"
code: |
name = "World"
print(f"Hello, {name}!")
language: python
options:
- "Hello, World!"
- "Hello, name!"
- "name World"
- "Error"
correctAnswer: 0
explanation: "F-strings substitute variables into the string."Only single and multiple types are supported. Matching, true/false, and other types are not currently available.
When using code: | syntax in YAML:
"text" not \"text\"Answers use zero-based indexing. The first option is 0, second is 1, etc.
For multiple choice: correctAnswers: [0, 2, 3]
On the home page, you'll find AI-optimized prompts for popular AI assistants (Gemini, ChatGPT, Claude, Perplexity). These prompts help generate properly formatted YAML files.
Check the error message. Common issues: missing required fields (title, duration, questions), wrong question type, or malformed YAML/JSON syntax.
Remove escape characters from your YAML. When using code: |, paste code normally without escaping quotes.
Ensure duration is set correctly. In YAML/Markdown, use minutes. In JSON, use seconds.
Example exam files are available in the public folder:
sample-exam.yaml - YAML format examplesample-exam.json - JSON format examplesample-exam.md - Markdown format example