Opening the book…
This section explains the OPL header for the worked example and shows how to pick biology-appropriate classification tags. The header comes before DOCUMENT() and acts as the metadata "section zero" for the problem.
Use this page when: you are writing metadata for a new problem or reviewing a problem before publishing.
Worked example header
This is the complete OPL header for the worked example in Chapter 4.
## TITLE('Color choice using radio buttons')
## DESCRIPTION
## Select the correct color label from two radio button formats and confirm the choice labels.
## ENDDESCRIPTION
## KEYWORDS('radio buttons','choice list','PGML prompt')
## DBsubject('Biochemistry')
## DBchapter('Lab techniques')
## DBsection('Reporting conventions')
## Level(2)
## Date('2026-01-28')
## Author('Example author')
## Institution('Example institution')
## Language(en)
Customize the TITLE, DESCRIPTION, KEYWORDS, and classification fields to match your problem's content and subject area.
Field checklist
| Field | What it should contain | Common mistakes |
|---|---|---|
| TITLE | Short, student-facing task title. | Too long or story-like titles. |
| DESCRIPTION | 2 to 3 sentences describing the task and constraints. | No constraints or overly long explanations. |
| KEYWORDS | 3 to 5 concept or technique keywords. | Story nouns instead of concepts. |
| DBsubject/DBchapter/DBsection | Life science classification strings. | Leaving these blank or too generic. |
| Level | Bloom's taxonomy level (1-6). | Omitted or set to wrong cognitive level. |
| Date/Author/Institution | Attribution fields for reuse. | Omitted attribution. |
| Language | ISO 639-1 code (e.g., en). |
Omitted entirely. |
How this header fits into the problem structure
The OPL header is "section zero" - it comes before DOCUMENT() and exists outside the traditional four-section structure (Preamble, Setup, Statement, Solution). Think of it as the problem's passport: it makes the problem searchable, classifiable, and reusable in problem banks.
Five-section reality
- Section 0: OPL Header (metadata comments, before DOCUMENT)
- Section 1: Preamble (DOCUMENT through loadMacros)
- Section 2: Setup (Perl code before PGML)
- Section 3: Statement (BEGIN_PGML / END_PGML)
- Section 4: Solution (optional BEGIN_PGML_SOLUTION / END_PGML_SOLUTION)
Traditional PG documentation only lists four sections because it omits the OPL header. However, for long-term reuse and problem bank classification, the header is essential.
Choosing biology classifications
The worked example uses DBsubject('Biochemistry') because the problem context is lab-focused. Here's how to choose classifications for other biology problems.
Classification decision guide
| Problem type | DBsubject | DBchapter suggestion |
|---|---|---|
| Dilution calculations, spectrophotometry, gel analysis | Laboratory Techniques | Solution preparation, Protein analysis, DNA analysis |
| Enzyme kinetics, buffer pH, protein structure | Biochemistry | Enzymes, Acids and bases, Proteins |
| Punnett squares, pedigrees, linkage | Genetics | Mendelian inheritance, Pedigree analysis, Linkage |
| Cell signaling, membrane transport, organelles | Cell Biology | Signal transduction, Membranes, Organelles |
| DNA replication, transcription, translation | Biology - molecular | DNA replication, Gene expression, Translation |
Classification guidelines
- Start with course context: If the problem is for a Biochemistry course, use
DBsubject('Biochemistry')even if it involves lab techniques. - Use existing tags: Search your repository for similar problems and copy the exact classification strings to maintain consistency.
- Be specific in DBsection: Instead of "General concepts", use "Michaelis-Menten kinetics" or "Serial dilutions".
- Avoid empty strings: Never leave DBsubject, DBchapter, or DBsection blank. Choose the closest existing label and revise later if needed.
Quick reference: Header fields explained
TITLE field
Student-facing title that appears in problem listings. Keep it under 80 characters and focus on the task, not the story wrapper. For detailed guidance and good/bad examples, see OPL Header and Metadata.
Example for worked problem: TITLE('Color choice using radio buttons')
DESCRIPTION block
Instructor-facing summary (2-3 sentences) that describes the task, constraints (units, rounding), and provenance if adapted from another source. For templates and biology examples, see OPL Header and Metadata.
Example for worked problem: The description mentions "radio button formats" and "choice labels" to clarify what students will interact with.
KEYWORDS field
3-5 technique or concept keywords that make the problem searchable. Avoid story nouns and generic terms. For keyword selection process and biology examples, see OPL Header and Metadata.
Example for worked problem: KEYWORDS('radio buttons','choice list','PGML prompt') focuses on interaction type and PGML features, not biology content (since this is a demonstration problem).
Attribution fields
Date, Author, and Institution provide credit and help track provenance for long-term reuse. Always include these fields, even for internal problems.
Textbook provenance fields
When a problem is adapted from a textbook or other source, use these fields to track the original. Number the tags (TitleText1, TitleText2, etc.) to map to multiple texts when appropriate.
## TitleText1('Title of source')
## EditionText1('Edition')
## AuthorText1('Author(s)')
## Section1('Section identifier')
## Problem1('Problem identifier')
If adapted, also state that in the DESCRIPTION block (e.g., "Adapted from ...").
Level field: Bloom's taxonomy
The Level(...) field uses a 1-6 scale aligned to Bloom's revised taxonomy. This field classifies the cognitive demand of the problem and is required.
| Level | Category | Description |
|---|---|---|
| 1 | Remember | Recall a term, definition, or basic fact. Verbs: recall, define, label, list, identify. |
| 2 | Understand | Describe, explain, or classify a concept. Verbs: explain, summarize, interpret, classify. |
| 3 | Apply | Use rules or methods in a direct way. Verbs: apply, use, determine, solve. |
| 4 | Analyze | Interpret data and connect to conclusions. Verbs: analyze, compare, contrast, infer. |
| 5 | Evaluate | Justify choices or critique evidence. Verbs: evaluate, justify, critique, defend. |
| 6 | Create | Design or propose something new. Verbs: design, propose, formulate, develop. |
The worked example is Level 2 (Understand) because students classify color labels from given options. For the full Bloom's taxonomy scale with biology-specific examples, see OPL Header and Metadata.
Language field
Use ISO 639-1 language codes. This field is required. For English:
## Language(en)
License comments
Include a license comment block at the top of every problem file for proper attribution and reuse. OPL does not define a standard license tag. Use plain comment lines (single #) to state licensing. This is not an OPL tag but is required for the repository.
# This work is licensed under CC BY 4.0 (Creative Commons Attribution 4.0 # International License). # https://creativecommons.org/licenses/by/4.0/ # Source code portions are licensed under LGPLv3.
Cross-references for detailed guidance
- OPL Header and Metadata: Comprehensive OPL header guidance with biology examples, decision trees, and good/bad comparisons.
- Minimal Templates: Complete problem templates with pre-filled OPL headers you can copy and adapt.
- Next sections in Chapter 4: After the header, see Preamble, Setup, Statement for how each section builds on the metadata.
Common mistakes in problem context
- Forgetting to update the header after modifying the problem: If you change a dilution problem to a genetics problem, update DBsubject, DBchapter, KEYWORDS, and DESCRIPTION.
- Copying header from unrelated problem: Always customize TITLE, DESCRIPTION, and classification tags to match the new problem's actual content.
- Smart quotes in header: Use plain ASCII quotes (
'), not curly quotes ('or'). Smart quotes break OPL parsing tools. - Empty classification fields: Never leave DBsubject, DBchapter, or DBsection empty. Pick the closest existing tag and revise later if needed.
Apply it today
- Check that every problem has TITLE and DESCRIPTION before you edit the prompt.
- Update the DBsubject tags whenever the scientific context changes.
- Use existing classification strings from your repository to maintain consistency.
- Cross-reference OPL Header and Metadata for detailed field guidance and biology examples.
- Use templates from Minimal Templates for pre-filled OPL headers.
This page titled 4.2: OPL Header was last modified on Fri, 27 Feb 2026 15:21:24 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Neil R. Voss.
The book could not be loaded just now.