Skip to content

Examples

Install the CLI, then download the examples. Keep the paths shown so the commands below work.

Example Workflow Input
Support routing support-triage.yaml support-ticket.json
Support routing on Jev jev-support-triage.yaml support-ticket.json
Warranty triage warranty-claim.yaml warranty-claim.json
Terminal window
mkdir -p examples/inputs
for f in support-triage.yaml jev-support-triage.yaml warranty-claim.yaml \
inputs/support-ticket.json inputs/warranty-claim.json; do
curl -fL "https://docs.banh.dev/examples/$f" -o "examples/$f"
done

Asks for department, urgency and severity. Urgent tickets go first, then billing and sales; support is the fallback.

Terminal window
banh run examples/support-triage.yaml --input examples/inputs/support-ticket.json --json

The input is a duplicate-charge complaint. Check the actual decisions and output; predictions aren’t fixed.

Same workflow with model: { provider: jev, model: jev-1.13.0 } added. Set BANH_INFERENCE_TOKEN to your TypeSafe key, then:

Terminal window
banh run examples/jev-support-triage.yaml --input examples/inputs/support-ticket.json --json

Or keep the original file and add --model jev. See Jev model selection.

Terminal window
banh run examples/warranty-claim.yaml --input examples/inputs/warranty-claim.json --json
  1. Rewrite questions and options in your own terms.
  2. Keep input within the model’s context window.
  3. Put high-priority rules first and end with else.
  4. Run banh validate before banh run.
  5. Pick thresholds from representative inputs.

For a text-input workflow, see the quickstart.