| name | flavor-structure-analyzer |
|---|---|
| description | Analyze a food, beverage, tea, coffee, cocoa, fermented product, or aroma product as a time-dependent flavor structure. Use when Codex needs to convert sensory descriptions, aroma-identification features, raw materials, processing, brewing or serving conditions into a Flavor Atlas; rank associated molecule or chemical-family candidates; or display a flavor interaction network showing reinforcement, synergy, suppression, and masking with explicit evidence status, without overstating molecule-level causality. |
Flavor Structure Analyzer
Build an evidence-aware translation layer between material science, processing language, sensory measurement, and human flavor experience. Preserve what was sensed, what is chemically plausible, and what remains unverified as separate layers.
Use this state stack:
raw-material state -> process state -> chemical/matrix state -> release state -> sensory signal -> interpreted Flavor Object -> experience curve
Treat the middle states as latent until measured. A sensory label is a projection of the system, not direct proof of its molecular state.
Load references
- Read references/framework.md before every analysis.
- Read references/output-template.md when producing the final atlas or when the user asks for a reusable schema.
- Read references/aroma-network.md when the user supplies an aroma-identification feature, asks for associated molecules, or wants a reinforcement/synergy/masking network.
- Read references/state-model.md when defining Flavor Objects, modeling process variables, producing JSON fingerprints, diagnosing a flavor state, designing a target state, or matching products/preferences.
- Read references/oolong-example.md only for tea or when a worked example is useful. Do not copy its conclusions into another product.
Non-negotiable rules
- Start from sensory observation; do not start from a molecule list.
- Separate orthonasal aroma, retronasal aroma, taste, chemesthesis, mouthfeel, and after-effect. Do not collapse them into one overall score.
- Keep perceptual space separate from time. “Front/middle/back” is ambiguous; state whether it means oral location or chronological phase.
- Treat a descriptor-to-molecule link as a candidate association unless sample-specific analytical and causal evidence exists.
- Do not infer exact compounds, concentrations, process reactions, cultivar contributions, or release times from prose alone.
- Do not invent absent descriptors. If “mineral” is not in the input, do not add mineral character as an observation.
- Model the whole path:
raw-material boundary -> transformation -> retention/fixation -> release -> perception. - Show alternative explanations for every important mechanism claim.
- Preserve negative evidence and missing information. Unknown is a valid output.
- Use descriptive, observable language. Avoid claiming that one compound “creates” a complex flavor unless causal evidence supports it.
- Respond in the user's language and preserve the user's original sensory terms beside normalized vocabulary.
- Do not call co-occurrence “synergy.” Reserve verified synergy, reinforcement, suppression, and masking for relations supported by an explicit mixture or sensory comparison; otherwise label them
[HYP]. - Separate latent material/process/chemical states from measured signals and interpreted Flavor Objects.
- Do not output normalized decimal scores unless the scale, anchors, protocol, and data source are defined. Use qualitative bands or
nullfor unknown values. - Do not prescribe exact process setpoints from a sensory description alone. Present a candidate variable, expected direction, boundary conditions, risk, and controlled test.
Evidence labels
Attach one label to each nontrivial statement:
[OBS]directly supplied sensory observation or measured fact.[ASSOC]established general association, not verified in this sample.[HYP]product-specific hypothesis consistent with the inputs.[VER]sample-specific result supported by named analytical, sensory, or intervention evidence.[UNK]missing, ambiguous, or contradictory information.
Never upgrade [ASSOC] or [HYP] to [VER] because the language sounds plausible.
Workflow
1. Normalize the input
Extract:
- product and product state;
- sensory words and who observed them;
- raw materials, cultivar/species, ratios, origin, and provenance status;
- process sequence and stated conditions;
- preparation, brewing, serving, temperature, dose, and matrix;
- time anchor (
t=0) and observation method; - available analytical or panel evidence;
- user objective and desired depth.
If important context is absent, continue with a qualitative atlas and mark the gaps [UNK]. Do not fabricate numeric intensity or precision.
2. Build Flavor Objects and state boundaries
Define each target as a Flavor Object rather than only an aroma name:
Flavor Object = modality + perceptual space + time behavior + intensity + quality/structure + context + uncertainty
Separate the observed object from hypothesized process, chemical, and release states. Follow references/state-model.md.
3. Decompose the sensory signal
Convert each input phrase into one or more modalities:
- aroma object or quality;
- basic taste;
- chemesthetic sensation;
- mouthfeel/body;
- aftertaste/returning sweetness;
- persistence, onset, peak, decay, and recurrence.
Keep the user's original words visible beside any normalized term.
4. Map perceptual space
Map observations to the smallest defensible location:
- orthonasal/headspace;
- front, middle, or rear oral cavity;
- retronasal passage;
- throat/pharyngeal after-effect;
- whole-mouth or location unknown.
If location was not observed, write [UNK], not a guessed anatomy.
5. Map temporal release
Declare the time anchor. Build phases from observed timing. If timing is not measured, use qualitative phases—onset, peak, body, finish, after-effect—or clearly label proposed numeric windows [HYP].
Track each modality independently; aroma, sweetness, cooling, body, and aftertaste may peak at different times.
6. Build candidate chemical logic
For every important sensory feature, map:
sensory clue -> candidate chemical family or physical mechanism -> possible precursor/matrix -> relevant process node -> retention/release mechanism -> competing explanation -> verification route
Prefer families and mechanisms over single molecules. Include exact molecules only when they improve a test plan, and label their status.
7. Match an aroma fingerprint and build the interaction network
When the user supplies an aroma-identification feature or asks for molecule matching:
- normalize the aroma fingerprint without discarding negative identifiers;
- rank a short candidate list using sensory fit, temporal/release fit, product context, process plausibility, matrix fit, and contradictions;
- state the source tier for every candidate;
- map candidate molecules or families to observed sensory nodes;
- add only defensible reinforcement, synergy, suppression, masking, contrast, and carryover relations;
- render a compact Mermaid network plus an edge ledger.
Follow references/aroma-network.md. Treat ranking as search prioritization, not identification or probability.
8. Model process state and choose an inference direction
Represent temperature, humidity or water activity, oxygen availability, time, pressure, tissue state, mechanical disruption, pH, and other relevant variables as a process-state vector with units, trajectory, provenance, and uncertainty.
Choose one mode:
- describe: map observations without backward or forward prescription;
- diagnose: reason backward from an observed deviation to ranked candidate state variables and discriminating tests;
- design: reason forward from a target Flavor Object to candidate material/process/release states and controlled trials;
- match: compare aligned fingerprints or map a preference vector to compatible products.
Do not reverse a correlation into a diagnosis or a setpoint recommendation.
9. Build the formation path
Write a branched pathway rather than a decorative arrow chain. Show:
- what raw material makes possible;
- what processing could transform;
- what the matrix could retain, bind, suppress, or protect;
- what preparation and oral conditions could release;
- what the sensory system reports.
Do not assign a blend component to a flavor feature without comparative or omission evidence.
10. Stress-test the atlas
Check:
- Was any new sensory word introduced?
- Was space confused with time?
- Was a candidate molecule presented as detected?
- Was correlation presented as process causation?
- Were sweetness aroma, sugar taste, viscosity, and returning sweetness conflated?
- Were cultivar and process contributions separated?
- Is every important hypothesis paired with an alternative explanation and a feasible test?
- Did any network edge imply synergy or masking without a stated condition, comparison, or evidence level?
- Did any numeric fingerprint value lack a scale, anchor, protocol, or source?
- Did diagnosis or design jump from a sensory label to an exact process setpoint?
Revise until all answers are defensible.
Output modes
- Atlas Card: default; concise, decision-useful, about one to two pages.
- Comparative Atlas: compare samples on aligned sensory, time, mechanism, and uncertainty axes.
- Aroma Network: match an aroma fingerprint to ranked molecule/family candidates and render interaction edges for reinforcement, synergy, suppression, masking, contrast, and carryover.
- State Fingerprint: output a machine-readable JSON record conforming to references/flavor-fingerprint.schema.json.
- Diagnosis: rank candidate state/process causes for an observed deviation and propose the smallest discriminating tests.
- Design: translate a target Flavor Object into candidate material, process, matrix, and release states with risks and controlled trials.
- Preference Match: align a user's preferred state vector with comparable product fingerprints; do not compare fingerprints built under incompatible protocols silently.
- Research Atlas: add source citations, analytical targets, sampling plan, counter-evidence, and claim-by-claim evidence grading. Browse or inspect supplied sources before making literature-dependent claims.
Always finish with:
- the most important supported structure;
- the formation-path hypothesis;
- the weakest link in the reasoning;
- the smallest next test that could discriminate between explanations.
