Compare assessments
lca_compare_assessmentsSave a comparison across 2–8 saved assessments. Each target is an a<N> ref (listable with lca_get(kind='assessments')); every lca_run_assessment call already saves one, so there is no separate save step. Two preconditions are enforced (400): all targets share one LCIA method, and all declare the same functional unit — comparing 1 kg against 1 unit is refused unless allow_mismatched_fu is set. Differences in allocation, database or provider linking are not refused; they are returned as equivalence warnings alongside the result. The comparison is saved into the workspace named by workspace and returned as primary_ref (c<N>), which holds the full matrix. The matrix does not rank the targets; it reports each impact category separately. nw_set adds the targets' stored single scores for that set beside the matrix; every target must already carry it (lca_apply_nw_set). The assessment_interpretation skill (load_skill) documents comparison discipline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nw_set | No | Compare by the single score of this normalization/weighting set (its name, or a unique part of it); every target must carry it, see `lca_apply_nw_set`. A target missing it, or carrying a different copy, is refused with what to do. Omit for the characterized matrix only. | |
| targets | Yes | Saved-assessment refs to compare, e.g. ['a1', 'a2']. Must have ≥2 items. | |
| workspace | Yes | Name of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace. The connection's default is often an empty sandbox rather than the user's work. | |
| allow_mismatched_fu | No | Compare targets that declare DIFFERENT functional units (e.g. 1 kg vs 1 unit). Default false refuses with a 400 naming both. Setting it true does NOT make the comparison valid — it stamps a warning onto the result. Only set it when the user has said the two functional units are equivalent for their question, and say so in your answer. |