All MicroEvals
Scientifically defensible deterministic estimate of nicotine exposure possible
Create MicroEval

Scientifically defensible deterministic estimate of nicotine exposure possible

Prompt

Build a nicotine pouch pharmacokinetic engine. Goal: given nicotine pouch session history and a query time, produce the most scientifically defensible deterministic estimate of nicotine exposure that can reasonably be derived from published human evidence. The engine is intended to support a nicotine-use monitoring application. It should estimate exposure from actual pouch-use timing rather than rely only on daily totals or the most recent session. Required inputs: - nicotine content or pouch strength in mg for each session; - session start time; - session end time, or an indication that the session is still active; - query time; - configurable baseline concentration used for time-to-baseline calculations. Required outputs: - estimated current systemic nicotine amount; - estimated current plasma nicotine concentration; - estimated contribution from the active session, if one exists; - estimated accumulated contribution from previous sessions; - estimated time until the configured baseline concentration is reached; - rolling 24-hour oral/mucosal pouch-contact exposure. The model must account for the pharmacokinetic effects that materially affect repeated nicotine-pouch use, including: - nicotine extraction during pouch contact; - systemic absorption or bioavailability; - absorption over time rather than assuming the complete dose is immediately systemic unless the evidence supports that approximation; - nicotine elimination; - accumulation from repeated doses; - overlapping sessions; - partially completed active sessions; - decay of historical sessions over time. Research the model before implementing it. The research should determine the equations, parameters, assumptions, and limitations used by the final engine rather than merely justify a predetermined model. Research guide: Prioritize evidence in this order: 1. peer-reviewed human nicotine-pouch pharmacokinetic studies; 2. human oral nicotine or snus studies when nicotine-pouch evidence is insufficient; 3. systematic reviews, regulatory assessments, and authoritative pharmacology sources; 4. established human nicotine pharmacokinetic literature for parameters that are not adequately measured in pouch-specific studies. Prefer primary human studies for numerical pharmacokinetic parameters. Use current evidence available at the time of the task. Prefer direct measurements in nicotine-pouch users when they exist. For each material model component or parameter, investigate: - what was directly measured; - study population; - nicotine product and formulation; - nominal nicotine content; - pouch contact duration; - nicotine extracted from the pouch; - systemic nicotine exposure; - bioavailability where available; - Cmax; - Tmax; - AUC; - elimination half-life; - concentration-time behavior; - between-subject variability; - dose proportionality; - repeated-dose behavior; - whether the evidence is directly applicable to nicotine pouches or transferred from another nicotine product. Explicitly investigate: - the relationship between pouch contact duration and nicotine extraction; - whether extraction is adequately represented as linear, saturating, piecewise, or by another function; - whether extraction and systemic absorption should be modeled as separate processes; - the evidence for oral/systemic nicotine bioavailability; - absorption timing and whether instantaneous systemic input is defensible; - nicotine distribution assumptions needed to estimate plasma concentration; - nicotine elimination kinetics and half-life; - whether first-order elimination is adequate for the intended exposure range; - repeated-dose accumulation; - applicability of superposition; - active and overlapping sessions; - how far historical sessions remain materially relevant; - whether plasma concentration can be estimated defensibly from pouch history alone; - what population-level assumptions are required to do so; - evidence supporting any baseline concentration; - evidence supporting any oral/mucosal exposure threshold. When studies disagree, compare them rather than selecting a convenient value. Explain why the final parameter, range, or approximation was selected. Classify important model decisions as one of: - directly supported by nicotine-pouch evidence; - supported by broader human nicotine evidence; - inferred from available evidence; - modeling assumption; - product heuristic. Do not convert an uncertain population estimate into false individual precision. If published evidence does not support an individually accurate value, use the least speculative defensible population-level approximation and state the limitation clearly. If an output cannot be supported at all from the available evidence, identify that limitation rather than inventing a formula. Do not treat a configurable baseline, oral-exposure threshold, or other application rule as a medically validated safety threshold unless appropriate clinical evidence actually establishes it. Record the source and rationale for every material pharmacokinetic constant or assumption used by the final model. The implementation must be in TypeScript and suitable for use as a standalone calculation library. Engineering quality is part of the task. The completed engine should be: - strongly type-safe; - deterministic for identical inputs; - explicit and internally consistent about physical units; - numerically stable; - well-defined for valid, invalid, boundary, and extreme-valid inputs; - independent of hidden wall-clock state; - independent of input ordering where session order should not affect the result; - free from mutation of caller-owned session data; - small enough that another engineer can audit the pharmacokinetic calculations directly; - free of unnecessary framework or infrastructure dependencies. Use third-party libraries only when they materially improve correctness, validation, numerical reliability, or maintainability. Dependencies should have a clear reason to exist and must not obscure the pharmacokinetic model. The public API should expose the information needed by an application without exposing misleading medical semantics such as "safe to use", "safe dose", or equivalent conclusions that the model cannot establish. Validate the final model and implementation. Validation must cover at least: - no-session baseline behavior; - a single completed session; - a partially completed active session; - extraction as contact duration changes; - absorption behavior over time; - elimination behavior; - expected half-life behavior; - repeated-dose accumulation; - two or more closely spaced sessions; - overlapping sessions; - contributions from both active and historical sessions; - long session histories; - sessions outside the relevant historical window; - time-to-baseline calculations; - rolling 24-hour contact-time boundaries; - sessions crossing the start of the rolling window; - exact boundary values; - input-order independence; - reproducibility; - invalid input; - numerical stability; - finite and physically meaningful results for valid inputs. Where an equation has an analytical result, test against the analytical result rather than against another copy of the implementation. Where published studies provide usable concentration-time or exposure data, compare the model against those observations and report how closely the model reproduces them. Do not optimize solely for matching one study if doing so reduces general validity across the evidence base. Definition of success: The task is complete when: - the pharmacokinetic model is based on credible human evidence; - the important equations and parameters have traceable provenance; - dimensions and units are internally correct; - extraction, absorption, elimination, accumulation, overlapping sessions, and active sessions behave consistently with the declared model; - the model produces reproducible results for equivalent inputs; - time-to-baseline is based on the complete modeled exposure state; - rolling 24-hour contact exposure is correct at temporal boundaries; - valid inputs do not produce NaN, Infinity, negative exposure, or other physically invalid states; - important assumptions and uncertainties are explicit; - heuristics are distinguishable from pharmacokinetic evidence; - tests can detect meaningful mathematical or implementation errors; - the implementation has no known material scientific, mathematical, numerical, type-safety, or determinism defect within the stated model; - another engineer can independently audit how each output is derived and why the model uses its chosen assumptions. The objective is not to create the most complicated model. The objective is to create the smallest model that best explains the available evidence and produces defensible deterministic estimates for this use case.

Answer guidance

A strong response should deliver a complete working nicotine-pouch pharmacokinetic engine together with enough research and validation to determine whether its outputs are scientifically defensible. Review the response primarily on scientific validity, mathematical correctness, implementation quality, and verification. Scientific quality: - Uses relevant peer-reviewed human evidence, with nicotine-pouch studies preferred where available. - Uses primary evidence for important numerical parameters when practical. - Does not rely on a single convenient study when credible studies materially disagree. - Distinguishes nicotine content in the pouch from nicotine extracted, systemically absorbed nicotine, and plasma nicotine concentration. - Distinguishes extraction from absorption when the evidence requires it. - Accounts for absorption timing rather than automatically treating the full dose as instantaneous. - Uses a defensible elimination model. - Handles repeated dosing and accumulation correctly. - Handles overlapping and active sessions correctly. - Identifies assumptions required to convert dose history into plasma concentration. - Represents population-level uncertainty appropriately. - Does not claim individualized clinical accuracy that the evidence cannot support. - Clearly distinguishes evidence-backed parameters, transferred evidence, assumptions, approximations, and application heuristics. - Provides traceable sources for material pharmacokinetic decisions. Mathematical quality: - Equations are dimensionally consistent. - Units are explicit and correctly converted. - Single-dose concentration-time behavior is coherent. - Half-life and decay behavior are correct for the selected model. - Repeated-dose accumulation follows correctly from the model. - Independent dose contributions combine correctly when superposition is assumed. - Active sessions contribute only exposure that has occurred by the query time. - Historical exposure decays correctly. - Time-to-baseline is based on total modeled exposure rather than only the latest session. - Rolling 24-hour contact exposure handles partial window overlap correctly. - Results are finite and physically meaningful for valid inputs. Validation quality: - Includes meaningful tests rather than only happy-path examples. - Tests equations independently where analytical expectations exist. - Includes single-dose, repeated-dose, overlapping, active-session, historical, and boundary cases. - Includes invalid and extreme-valid inputs. - Checks order independence and reproducibility. - Checks numerical stability. - Uses published pharmacokinetic observations for external validation where feasible. - Reports meaningful disagreements between the model and published observations rather than hiding them. Implementation quality: - Produces usable TypeScript rather than pseudocode. - Maintains strong type safety. - Makes physical units difficult to confuse. - Has a coherent and appropriately small public API. - Is deterministic from explicit inputs. - Does not mutate caller-owned data. - Avoids unnecessary global state and implicit time dependencies. - Keeps the scientific calculations understandable and auditable. - Uses dependencies only where they provide material value. - Avoids unnecessary frameworks, architectural layers, boilerplate, and speculative abstraction. - Includes clear handling of invalid states and boundary behavior. A weaker response would: - invent pharmacokinetic constants; - cite sources that do not actually support the parameter being used; - treat nominal pouch nicotine as fully absorbed nicotine; - confuse extracted nicotine with systemic dose; - derive plasma concentration without stating the necessary distribution assumptions; - assume instantaneous absorption without examining whether it is justified; - ignore repeated-dose accumulation; - model only the most recent pouch; - mishandle an active pouch; - mishandle overlapping sessions; - mix mg, ng, mL, L, minutes, or hours; - use arbitrary thresholds and describe them as medically safe; - provide false precision despite large biological uncertainty; - produce invalid numeric states for valid inputs; - depend on session ordering without a pharmacokinetic reason; - provide tests that simply reproduce the same formulas as the implementation; - produce only a design document or pseudocode instead of a working engine; - add substantial unrelated application architecture. An excellent response should make it possible for a reviewer to answer all three questions: 1. Why is this pharmacokinetic model scientifically defensible? 2. Can the mathematics and implementation be independently verified? 3. What can and cannot legitimately be inferred from the engine's outputs?

Drag to resize
Drag to resize

Response not available

Drag to resize
Drag to resize