Skip to content

Choose the independent recognition and follow-up state model #125

Closed

Description

@Atrium0804

Question

Which independent input-recognition and follow-up state model should the second implementation use to satisfy the agreed requirements reliably?

Decide the representation and boundaries for primary inputs, explicit filters, conflicting/unsupported input, follow-up replacement, standalone new questions, and context reset. Explain how rejected deterministic input remains rejected through the intake-assisted path, and how recognized bypasses avoid unexpected model calls. Compare reasonable alternatives and stress-test concrete conversation edge cases with the human.

Consult grilling, domain-modeling and codebase-design. Base this decision on the prerequisite's findings and the current main interfaces, not on copying the preserved implementation. Resolve the design only; do not build it. Record invariants and alternatives sufficient for integration planning.

Prerequisite: Establish failure modes and clarify requirement ambiguities.

Activity

  1. added
    wayfinder:grilling
    on Nov 16, 2026
  2. self-assigned this
    on Nov 16, 2026
  3. Atrium0804 commented on Nov 16, 2026

    @Atrium0804
    OwnerAuthor

    Resolution: Python recognition with explicit per-conversation lookup state

    Confirmed with the human after concrete input/follow-up examples. This decides the model and its invariants, not the feature implementation.

    1. Recognition and routing

    Use Python to recognize supported factual input and short follow-ups, normalize supplied parameters, merge permitted follow-up changes, and validate the whole request. One module owns these rules; chat and intake must use the same recognition rules rather than independent reinterpretations.

    Return three distinguishable outcomes:

    • Ready: a validated request can be answered by the deterministic bypass, using either the combined overview or an applicable existing standalone lookup.
    • Needs information: this is a recognized eligible lookup, but required input is missing. This is the only outcome that permits the existing intake-assisted lookup path to supplement input.
    • Not eligible for bypass: unsupported, conflicting, explanatory, unrelated or otherwise rejected input goes to the existing inhoudelijke route. Intake classification must not rescue it into a bypass.

    Positively recognize supported factual forms. Finding a year/category and failing to find a forbidden word is not sufficient. Recognized complete lookups and supported short follow-ups require zero model calls. Intake assistance must not override explicit input, invent missing facts or bypass validation. No new model-first parameter extractor is introduced.

    2. State and calculation

    Each conversation has explicit lookup state: none, a recognized pending incomplete lookup, or a completed validated lookup profile. Keep this separate from feedback history. The profile stores validated inputs and the selector information needed to interpret them, not answer text or calculated season rows. Never reconstruct it from agent answer text or by scanning feedback history.

    Recalculate each answer using the current app date and source data. Keep the date injectable. Do not add a temporal-validity engine. The overview's existing source, season, gender-specific gearing, licence and display requirements remain unchanged.

    A valid standalone lookup remains available outside the combined overview's applicability, as already required. It must not turn conflicting, unknown or otherwise rejected input into a partial success.

    3. Follow-up transitions

    • A recognized short follow-up may use the current unambiguous pending/completed profile; arbitrary prose is not interpreted by a model to decide whether to inherit it.
    • A new primary input in such a follow-up replaces previous birth-year/category constraints, while gender and discipline remain unless explicitly changed. Example: after jongen uit 2015, U12, weg, either en voor 2017? or 2017 uses 2017, boys and road, without the previous U12 constraint.
    • A gender-only or discipline-only correction changes that field rather than conflicting with an earlier turn.
    • A complete standalone question inherits nothing. Welke categorie voor geboortejaar 2017? starts with 2017 and no inherited gender/discipline filters.
    • A rejected/unrelated message or a substantive question such as Waarom? ends profile reuse, including same-topic substantive questions. A later fragment cannot reach back past that turn. A complete new lookup may establish new state.
    • A recognized incomplete lookup is the explicit exception to clearing on a substantive route: retain only its validated pending input so a short reply can complete it. Example: Welk verzet? followed by 2012 produces the complete overview for both disciplines, because discipline is optional in the new requirements; do not retain the old behavior of requiring another discipline clarification.
    • Never promote contradictory details within the same message into a correction across messages.

    4. Category/gender pair semantics

    Preserve category/gender pairings rather than forming a Cartesian product of separate category and gender lists. JO11/MO12 means boys U11 and girls U12, not boys U12 or girls U11. Other explicit filters must match the supplied pairs; unsupported/conflicting combinations go to the inhoudelijke route.

    The human explicitly chose these distinct follow-up cases:

    • JO11 -> alleen meisjes: girls U11. The later turn replaces the gender of the single-category selector.
    • JO11/MO12 -> alleen meisjes: girls U12 only. It filters the combined selector, rather than relabelling its boys member.
    • Old-category selectors retain their mapping semantics: selecting girls keeps the mapped girls category or categories.
    • JO11 meisjes within one message remains contradictory and is not a bypass.

    The representation must preserve enough selector identity to distinguish a single-category correction from filtering a combined/old-category selector.

    5. Alternatives and rationale

    • Model-first extraction: rejected because it adds latency/model dependence and violates the zero-call requirement for supported bypasses.
    • Reconstructing lookup state from history: rejected because inheritance then depends on unrelated history storage and text interpretation.
    • One generic no-match result: rejected because missing information cannot safely be distinguished from explicit rejection when intake is considered.
    • Reusing answer rows: rejected because current date/source calculation must remain authoritative.

    No existing feature-specific flakiness is assumed; the prerequisite Establish failure modes and clarify requirement ambiguities corrected that attribution.

    6. Handoff

    Choose integration boundaries and implementation slices decides exact typed interfaces, function names, state storage/lifecycle and update ordering, intake/chat/eval wiring, and implementation slices/tests. In particular, choose how asynchronous intake completion cannot overwrite a newer turn's lookup state. This resolution establishes the invariants, not a particular locking/versioning mechanism.

    Validate the above conversation cases through the real chat flow as well as the module interface; preserve existing regression guardrails and update legacy expectations that intentionally change under the combined-overview requirements. Follow the established route-contract and flat-format checks.

    No new cycling-domain term was introduced; profile/outcome types are implementation concepts, not glossary entries. No repository files changed, feature code was built, tests were newly run or comparison conducted for this design-only ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

wayfinder:grilling

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions