feat: add premise-driven schema selection#47
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds premise-driven schema selection to the generic
refund_intakeexamples in Python and TypeScript while preserving the existing policy-driven behavior.The examples now show two host-owned schema-selection paths:
use refund_intake/use technical_supportselects a schema from policy state.premiseselect a schema through a deterministic intake-context rule.The same ambiguous request,
I need help with order A-100., can now select different schemas based on authoritative state rather than model output or user wording.Why
Schema selection is a natural fit for premise because factual context can change how the same request should be interpreted.
This strengthens premise coverage outside prompt construction and shows:
authoritative premise -> host-owned intake context -> selected schemawithout adding provider, live-model, or directive-drafter complexity.
Example metadata
Checklist
Notes
Validation performed:
./scripts/validate_python.sh— passed,178 passed, 6 skipped./scripts/validate_typescript_fast.sh— passednpx --yes markdownlint-cli2 python/examples/schema_selection/refund_intake/README.md python/examples/schema_selection/README.md typescript/examples/schema_selection/refund_intake/README.md typescript/examples/schema_selection/README.md— passed,0 error(s)Ollama, LiteLLM, Vercel AI SDK, live-model paths, and directive-drafter behavior were intentionally left unchanged.