File size: 899 Bytes
aad7814
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""Maximum AI — same in-place baseline adaptation as minimum/medium."""

from __future__ import annotations

from backend.core.reference_mapper import map_reference_paragraph
from backend.models.schema import TemplateSchema


def compose_maximum_ai(
    observations: list[str],
    reference_excerpts: list[str],
    *,
    section_title: str = "",
    section_id: str = "",
    schema: TemplateSchema | None = None,
    rating_value: str | None = None,
) -> str:
    """Apply in-place fact updates to the assembled REFERENCE baseline."""
    refs = [r.strip() for r in reference_excerpts if r.strip()]
    sch = schema or TemplateSchema()
    baseline = refs[0] if refs else ""
    return map_reference_paragraph(
        baseline,
        observations,
        sch,
        "maximum",
        section_id=section_id,
        section_title=section_title,
        rating_value=rating_value,
    )