Resolve soil water status from free-text input
resolve_soil_water(soil_water_input, use_ai = TRUE, use_cache = TRUE)A list with fields: type, pawc_mm, fraction, status, source, raw_input, assumptions. If not resolvable, type is "unknown".
This function attempts to interpret a farmer's free-text description of soil water status using an LLM. It returns a structured representation with PAWC (Plant Available Water Content) in mm, fraction of profile fullness, and a categorical status. If the input cannot be resolved, it returns "unknown".
The output is a list with the following fields:
list( type = "measured" | "fraction" | "categorical" | "unknown", pawc_mm = 100, # optional, only if known fraction = 1.0, # optional (0–1) status = "full", # categorical source = "user_provided", raw_input = "PAWC about 100mm, full profile", assumptions = NULL )
# Example with AI backend configured:
if (FALSE) { # \dontrun{
resolve_soil_water("PAWC about 100mm, full profile")
resolve_soil_water("profile about half full")
resolve_soil_water("not sure")
} # }