Docs quiz: randomised questions generated from the documentation, by level
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- nuxt
- Ambito
- documentation, frontend
Direzione di ricerca
This is an open design proposal, and its final questions (quiz length, placement, topic tracks, whether Deployment is included) are still undecided. Before any code, read the Nuxt Content setup and the page frontmatter conventions to see how sections and hashes could be derived. Done means the maintainers agree on the open questions and the generation script pnpm quiz:generate is specified.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A short quiz on the docs site that excites and intrigues developers, introduces CWA's ideas, and tests their knowledge a bit. Every answer links back to the docs section it came from. This is a proposal for discussion; the open questions are at the end.
What we've decided so far
- Audience: developers. Questions come only from the documentation.
- Where: a feature of the docs site.
- Question types: multiple choice, "select the line of code that does X", and "spot the mistake".
- Levels: the reader picks beginner, intermediate or advanced (and maybe a topic or two) before starting.
- Variety without hand-writing: we generate the questions from the docs ourselves, and they're randomised, so each person's short quiz differs a lot and nobody has to write or code new questions.
- Results: stay in the browser for now. No sign-in and no stored scores.
Proposed design
1. Map the docs into sections
Nuxt Content already parses every page into headings and code blocks. The unit for questions is a section: page path + heading anchor + a hash of its text. That gives each question:
- a source to link to ("Read more" goes to
/api/routes#route-generation); - a way to know it's stale (the section's hash changed).
Pages opt out with frontmatter quiz: false (releases, troubleshooting, the glossary maybe).
The default level comes from where the page lives, and a model can adjust it per question:
| Docs section | Default level |
|---|---|
| Getting Started, Key Ideas, Guides | beginner |
| Core Concepts | intermediate |
| API, Nuxt Module, Deployment | advanced |
2. Generate a question bank offline, not at runtime
A script (pnpm quiz:generate) sends each changed section to Claude and gets back questions in a fixed JSON schema. They're stored in the repo as a Nuxt Content data collection (content/quiz/<page>.yml) and prerendered with the site, so it costs nothing per visitor and needs no server.
Each question records:
type:choice,pick-lineorspot-mistakelevel, and concept tagssource: the page and anchor, plus the section hash it was generated fromquote: the exact sentence(s) or code from the section that prove the answeranswer,distractors, and a one or two sentenceexplanation
Only sections whose hash changed are regenerated, so a docs edit refreshes its questions in the same PR, and a reviewer reads the YAML diff. That's reading, not coding.
3. How each type comes from the docs
- Multiple choice: a fact in the section. The distractors must be plausible, and the prompt forbids answers borrowed from other frameworks (the same rule as the chat persona in #1).
- Select the line: take a real code block from the docs. The model picks one line and describes what it does; the reader clicks the line. The code is real by construction.
- Spot the mistake: take a real code block and make one realistic mutation. Examples: a phantom method,
.valueon a plain boolean,getEntity()instead ofgetPage(), auiComponentwithout its prefix,PUTwhere the docs sayPATCH. The reader clicks the wrong line. Many of the best mutations are mistakes the docs audits actually found.
4. Grounding check before a question is kept
The docs audits showed how easily a confident, wrong claim gets in. So a second, separate pass gets only the section and the question, and must answer it on its own:
- if it picks a different answer, or the
quoteisn't verbatim in the section, the question is dropped; - for spot-the-mistake, it must find the mutated line without being told.
5. Randomising each quiz
The browser picks about 10 questions for the chosen level and topics, spread across sections so one page can't dominate, and shuffles the options. The pick is seeded, so "share this quiz" can be a link with the seed, and a friend gets the same questions.
Each answer shows the explanation and a link to the section, which covers the "introduce the concepts" goal. A "report this question" link opens a pre-filled GitHub issue.
Cost
Generation is a one-off per changed section. At around 400 pages and 5–10 questions per section, a full first run is a few dollars on Haiku or Sonnet. After that, only edited sections cost anything. There's nothing at runtime.
Overlap with #1 (chat assistant)
Both need the docs split into sections with stable anchors and hashes. That step could be shared.
Open questions
- How many questions in a quiz, and is there a timer?
- Is there a score summary at the end ("you're intermediate on caching, beginner on fixtures")? That needs concept tags we trust.
- Topic choice: free picks, or a few fixed tracks (Content editing, Building components, API, Deployment)?
- Do Deployment questions belong? They're template-specific and change often.
- Should generation run in CI on every docs PR, or locally before committing?
- Where does it live:
/quiz, a button in the header, or a card at the end of each guide ("Test yourself on this page")? - Should questions about versions ("since alpha.18") be excluded? They date quickly.
- Lingua principale
- Vue
- Stelle
- 0
- Fork
- 0
- Merge medio
- 1h 20m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di components-web-app/docs
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
components-web-app/docs#256 · 1 commento ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
components-web-app/docs#253 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
components-web-app/docs#255 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
components-web-app/docs#254 · 1 commento ·
-
documentation
Difficoltà 3/5 1-3 ore Idoneità per principianti 25/100
components-web-app/docs#226 ·
Tutte le issue di components-web-app/docs
Issue simili
-
documentation needs-triage priority:medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
yeongseon/azure-functions-validation-python#546 ·
I maintainer di solito rispondono entro 1 giorno
-
domain:upgrade
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
spec-kitty/spec-kitty#6362 ·
I maintainer di solito rispondono entro 1 giorno
-
Page request: dotnet addApertahelp wanted new command
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
tldr-pages/tldr#24755 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement priority:p3 track:open-source
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue help wanted
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
ChristianHandy/FleetPilot#120 ·
I maintainer di solito rispondono entro 1 giorno