Fill in the numbers
fill_numbersReplace placeholders in draft report text with exact measured values, detection limits, guideline comparisons, and changes from lab data or guideline tables, returning cited, traceable numbers ready for verification.
Instructions
Fill in the numbers: replace each placeholder in a draft paragraph with the exact value and unit, by code.
Never type a concentration yourself. Write a placeholder where each number goes, then call this tool. Fields are separated by '|'; case and spaces around fields do not matter:
{ANALYTE|WELL|DATE}: measured result, e.g. {PFOS|MB2|Sep 2025} gives '0.038 ug/L'. A non-detect gives the result as reported, e.g. '<0.001 ug/L'; describe it as not detected.
{sum PFOS+PFHxS|WELL|DATE}: the sum of PFOS and PFHxS, e.g. {sum PFOS+PFHxS|MB2|2025-09-16} gives '0.057 ug/L'.
{lor|ANALYTE|WELL|DATE}: the detection limit, e.g. {lor|PFOA|MB2|Sep 2025} gives '0.001 ug/L'.
{limit|ANALYTE|RULE}: a guideline value. RULE is 'nemp-3.0' or 'current' and is required, e.g. {limit|PFOS|current} or {limit|PFOS+PFHxS|nemp-3.0}. Under nemp-3.0 use the PFOS+PFHxS form: its 0.07 ug/L applies to PFOS alone, PFHxS alone and the sum (Table 4, footnote a), so say which one the sentence compares.
{change|ANALYTE|WELL|FROM|TO}: change from the earlier round FROM to the later round TO, with direction and percent, e.g. {change|PFOS|MB2|Nov 2024|Sep 2025} gives 'a fall of 0.003 ug/L (7.3%)'. Write the sentence so the phrase fits, e.g. 'PFOS showed {change|...} between November 2024 and September 2025.' Dates: '2025-09-16', '16 September 2025' or 'Sep 2025'. One well per call.
Returns the filled text, the same text with [n] source markers, each value with its offsets and explanation, and a numbered source list (lab file and row, or guideline document, table and page). If any placeholder is unknown or ambiguous, nothing is filled and the error lists every problem and the valid forms. Afterwards, call check_paragraph on the filled text: it checks the words around the numbers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The draft paragraph, with every number written as a placeholder such as {PFOS|MB2|Sep 2025}. | |
| well | Yes | Monitoring well id, for example 'MB2'. Placeholders must name this well. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text with every placeholder replaced. Pass this to check_paragraph. | |
| well | Yes | ||
| notes | Yes | ||
| values | Yes | ||
| sources | Yes | ||
| next_step | Yes | ||
| annotated_text | Yes | The same text with source numbers in brackets after each value. |