7  Mapping a Course

map_curriculum() coordinates input checking, taxonomy classification, alignment scoring, and level comparisons. It returns a CurriculumMapping object containing both the scores and the derived findings.

7.1 Input and model configuration

library(curriculum)
library(rtemis.llm)

course <- read_course("objectives.yaml", "assessments.yaml")
classification_config <- config_Ollama("your-llm-model", temperature = 0)
scoring_config <- config_OllamaDecision("your-decision-model")

cm <- map_curriculum(
  course,
  classification_config = classification_config,
  scoring_config = scoring_config,
  course_id = "demo",
  scoring_system = "ioc",
  threshold = 0.5,
  verbosity = 1L,
  outdir = "runs/demo"
)

Replace the model names with available models. classification_config requires an LLMConfig; scoring_config accepts an LLMConfig or DecisionConfig and defaults to the classification configuration. Set scoring_config <- classification_config to use one LLM for both stages.

The course argument also accepts a path to a single YAML file. When assessments are stored separately, combine the files with read_course() first. Assessments are optional: without them, the session-to-assessment stage is omitted and the report states that assessment mapping was not performed.

7.2 Pipeline stages

7.2.1 Input checks

By default, check_objectives() runs before model calls. Findings with severity "error" stop the run. Findings are retained in cm@run[["checks"]] when the run proceeds. check = FALSE skips these findings checks; other argument and checkpoint validations remain active.

7.2.2 Classification

The classification model assigns taxonomy levels to course objectives, session objectives, and supplied assessment items. It also identifies wording issues. Classification uses the taxonomy definitions and the full statement, including the requested performance and its context.

7.2.3 Course-to-session scoring

The scoring model evaluates each course-objective/session-objective pair under the selected rubric. Identical texts can share computed scores while retaining their original identifiers. Failed scores remain missing; retry = TRUE requests a retry after the main pass.

7.2.4 Session-to-assessment scoring

The same scoring system evaluates each session-objective/assessment-item pair. The session objective is the criterion and the assessment item is the candidate. This stage runs when assessment items are supplied.

7.2.5 Level comparison

The package compares recorded taxonomy ranks among pairs whose strength reaches the alignment threshold. It summarizes those comparisons by criterion. This stage makes no model calls. The two directions are summarized separately; the result is not an independently estimated course-to-assessment mapping.

7.3 Stage-specific controls

Argument Purpose
classification_config, scoring_config Select the model for each stage
classification_repeats, scoring_repeats Set ratings per item or pair
classification_rationale, scoring_rationale Request stage-specific explanations
classification_options, scoring_options Supply named per-call options
scoring_system Select the alignment rubric; default "ioc"
taxonomy Select the classification scheme; default "blooms_revised"
block Set "pairwise" or "joint" scoring; default "pairwise"
threshold Minimum aligned strength; default 0.5
tolerance Rank difference treated as consistent; default 0L
retry Retry failed alignment scores; default TRUE
outdir Save and reuse checkpoints

For example, classification can use repeated LLM ratings while decision scoring uses its required single rating:

cm <- map_curriculum(
  course,
  classification_config = classification_config,
  scoring_config = scoring_config,
  course_id = "demo",
  classification_repeats = 3L,
  classification_rationale = TRUE,
  classification_options = list(temperature = 0.3),
  scoring_repeats = 1L,
  scoring_rationale = FALSE,
  scoring_options = list(),
  outdir = "runs/demo_repeated_classification"
)

LLM stages default to one rating and request rationales. Decision scoring defaults to one rating and no rationale, requires an empty options list, and supports categorical scales only. Provider and connection settings belong in the model configuration. Reserved call and connection arguments are rejected in the options lists.

llmconfig remains a compatibility alias for classification_config in map_curriculum() and plan_mapping(). The shared repeats and rationale arguments supply defaults for LLM stages. In map_curriculum(), ... supplies default per-call options for LLM stages. Explicit stage arguments make analyses with different model types easier to reproduce.

7.4 Result components

cm
as.data.frame(cm@mapping)
as.data.frame(cm@levels)
Property Contents
cm@course Course name, title, and term
cm@mapping Course-to-session Mapping
cm@levels Classification for objectives and assessment items
cm@consistency Level comparisons for aligned course-to-session pairs
cm@gaps One coverage and level summary per course objective
cm@issues Model-identified objective wording issues
cm@assessment_mapping Session-to-assessment Mapping, or NULL
cm@assessment_consistency, cm@assessment_gaps Assessment-direction comparisons and summaries
cm@run Settings, checks, timing, and component run records

7.4.1 Coverage and cognitive level

cm@gaps[, c(
  "from_text", "from_level", "n_aligned", "max_to_level", "reached"
)]

n_aligned counts candidate items at or above the strength threshold. reached is TRUE when at least one aligned, classified candidate has rank at least as high as the criterion. It is FALSE for an uncovered criterion or when available classifications do not establish that condition.

These are findings about the supplied text and model judgments. A false value can reflect incomplete documentation, classification failure, the selected threshold, or a substantive curricular gap. Review the associated texts and missing values before interpreting it as evidence about teaching.

The assessment summary applies the same calculation to session objectives:

cm@assessment_gaps[, c(
  "from_text", "from_level", "n_aligned", "max_to_level", "reached"
)]

7.4.2 Missing scores and retries

edges <- as.data.frame(cm@mapping)
subset(edges, is.na(value))

retried_mapping <- retry_failed(
  cm@mapping,
  scoring_config = scoring_config
)

For decision scores, retry with the original model configuration and scoring definitions. Joint retries reconstruct the original question context and replace failed pairs. retry_failed() returns a Mapping; it does not update the enclosing CurriculumMapping or recompute its gap tables. Recompute dependent consistency and gap summaries when using a retried component separately.

7.5 Running individual directions

course_mapping <- map_course_to_sessions(
  course[["objectives"]],
  course[["sessions"]],
  course_id = "demo",
  scoring_config = scoring_config
)

assessment_mapping <- map_sessions_to_assessments(
  course[["sessions"]],
  course[["assessments"]],
  course_id = "demo",
  scoring_config = scoring_config
)

These functions return Mapping objects and use repeats and rationale for their single scoring stage. Their llmconfig argument is an alias for scoring_config. Use the same inputs and course_id in classify_objectives() when combining independently computed mappings and classifications.

7.6 Saving and reporting

saveRDS(cm, "demo_mapping.rds")
report_curriculum(cm, "demo_report.html")

See Planning and resuming for interruption recovery, Visualization for figures, and Reports and reproducibility for interpretation and provenance.

© 2026 E.D. Gennatas