Skip to content

std.document

Generated by sema doc from stdlib/sema/document.sema. Import with from std.document import …. For a narrative introduction see std.document.

std.document — typed document IR + deterministic render (design ⑦).

The model fills a typed Report; rendering to markdown is a pure, deterministic function — no regex repair of freeform LLM markdown, and section/table placement is structural. Replaces a hand-rolled assemble_basic_answer/_assemble_report. nl is the newline separator, parametrizable so the same renderer can emit a single-line form for tests or real newlines for output.

Fields

field type descriptor
title str
context str
confidence f64
rationale str
takeaways list[str]
section_titles list[str]
sections_text str
conclusion str
def fmt1(x: f64) -> str !{}

Parameters

name type
x f64

Returns str

Effects !{}

def render(r: Report, nl: str) -> str !{}

Parameters

name type
r Report
nl str

Returns str

Effects !{}