Oliver Cheng7 downloadsRender interactive multiple-choice quiz blocks inside your notes
As the name implies: a simple quiz block format to help create interactive quizzes in your Obsidian notes. quizblock is intentionally lightweight and adds just two things:
quiz fenced code block to specify the details of each multiple-choice quizThe widget is minimal but interactive. The format is simple, powerful, and built to be easily written by humans and/or LLMs. See Using with an LLM to understand how quizblock can integrate with your LLM of choice.
quizblock is available from the Obsidian plugin catalogue! Install it from Settings → Community Plugins → Browse.
Alternatively: install BRAT using its Quick Guide, and add the quizblock plugin link: https://github.com/olliecheng/quizblock. Enable the plugin from Community Plugins.
Here is a quiz block. You get interactivity, hidden explanations, and question order shuffling included for free:
```quiz What is 1 + 1? [ ] 1 [c] 2 [ ] 3 [ ] 4 This answer is correct because: - Simple arithmetic, ==duh==! - Use a calculator ```
You can preview this block in Live Preview or Reading mode. You can answer this block interactively in Live Preview mode. Your selected options persist in the text Markdown.
You can start your ChatGPT/Claude/Gemini message with this prompt:
Your goal is to become an examiner who writes multiple-choice quiz questions in Markdown, using the quizblock format. Next, you must create a Markdown (.md) document with the quiz blocks embedded.
Here is information about quizblock:
<skill_info>
This file tells you how to write quiz blocks that the Obsidian plugin can render. The files must be in Markdown format. Wrap each question in a fenced code block with the `quiz` language tag:
```quiz
Question text
[ ] Wrong option
[ ] Wrong option
[c] Correct option
[ ] Wrong option
```
- The first line is the question. It is usually a single line of plain text.
- In some circumstances, a multiline question may be desirable. For instance, if providing a clinical vignette. In this case, everything up to the first option is considered part of the question. Markdown is supported.
- Only use a multiline question if necessary.
- Each option follows immediately, one per line, with no blank lines between them.
- `[ ]` marks a wrong option. `[c]` marks the correct option.
- There must be exactly one `[c]` per block.
Details section
You can should add an explanation that is hidden until the user answers. Put it after the options, separated by one blank line:
```quiz
What is the capital of France?
[ ] London
[ ] Berlin
[c] Paris
[ ] Madrid
Paris has been the capital of France since the 10th century. **Île de la Cité** was its historic centre.
```
The details section supports Markdown formatting. Multiple lines are fine.
Guidelines for good questions
- Write questions that have one clearly correct answer.
- Make wrong options plausible — avoid obviously silly distractors.
- Keep option text roughly the same length and grammatical form.
- Use the details section to explain *why* the correct answer is right, not just to restate it.
- Keep the question specific enough that there is no ambiguity about what is being asked.
What not to do
- Do not include more than one `[c]`. The plugin only supports single-answer questions.
- Do not put a blank line between the question and the options, or between options.
- Do not write a multi-line question — only the first line is used.
- Do not write `[w]` or `[r]` markers. Those are written by the plugin at runtime to record the user's answer; they should never appear in authored content.
Example with details
```quiz
A pituitary macroadenoma classically compresses which structure to produce a visual field defect?
- [c] Optic chiasm
- [ ] Right optic radiation
- [ ] Left optic tract
- [ ] Lateral geniculate nucleus
The pituitary gland sits directly below the optic chiasm. Upward expansion compresses the decussating nasal fibres, which carry temporal visual field information from both eyes.
Left optic tract — would produce right homonymous hemianopia; not the classic pituitary presentation.
Right optic radiation — a more posterior structure in the temporal/parietal lobe; not adjacent to the pituitary.
Optic chiasm (correct) — compression of crossing nasal fibres → bitemporal hemianopia.
Lateral geniculate nucleus — thalamic relay; too far posterior and lateral to be compressed by a pituitary mass.
```
</skill_info>
Aim to create 30 questions. Be comprehensive; your goal is create challenging questions, not easy ones.
The prompt is:
... and then tell it whatever topic/file you want to be examined on.
Download the skill from skills/quiz-writer.skill and import it into your desktop chat of choice, or view it on GitHub and copy-paste it into your chatbot.
You might like to create a separate Project which explains how to generate questions. I have also anecdotally had success instructing the agent "not to use any front-end design tool and to produce output only in Markdown format."
LLMs are bad at randomness and often their selected correct answer is located in the same location. To fix this, each question automatically has a deterministic but random shuffle order (seeded with the question stem).
The simple anatomy of a quiz block is:
```quiz Question stem prompt [ ] Answer A [ ] Answer B [c] Answer C [ ] Answer D Explanation, in Markdown - supports Obsidian's Markdown features ```
If a quiz has not been attempted, the correct answer should be marked using [c] at the start. If a quiz has been attempted:
[r][w][c]```quiz What is 1 + 1? [ ] 1 [c] 2 [w] 3 [ ] 4 ```In this case, the user has answered "2" correctly.
```quiz What is 1 + 1? [ ] 1 [r] 2 [ ] 3 [ ] 4 ```
I think that MCQs are quite a good way to test and learn content.
Obsidian provides an extensible text platform and already provides integration with your notes (i.e. via Tasks). Therefore - what if plaintext was your canvas for MCQ questions, with a renderer in Obsidian? You can generate questions using whatever you want: the web interface of ChatGPT, Claude, Gemini, or your agentic tool of choice.
Plus, this way you can share your questions with your friends! All they need is the source .md file and the quizblock plugin installed. Note that if you have attempted the quiz, your progress is saved in the file: you should first run the "Reset quiz block attempts in note" command to clear your progress.