Needlepath · Decision replay

Watch Needlepath decide.

One support agent, one refund ticket, and a pile of records that will not all fit. Below are five real calls to the context selection API. The requests and the responses are baked into this page exactly as they came back: which records survived, what each one scored, why it was kept, and the tokens before and after.

5 calls, replayed unedited API responses
The setup

The 32 records the agent sent.

Invoice INV-4471. The customer paid for two chairs with expedited shipping, the parcel is late, and they want their money back. Every card below is one record the agent handed to Needlepath, labelled with the kind it carries on the wire. Each one is sent with the same importance, so nothing on this page is explained away by a thumb on the scale.

  1. tool result get_invoice(INV-4471) billing-api
  2. document Damaged on arrival policy v3 handbook
  3. document Refund policy v4 handbook
  4. tool result get_invoice(INV-4468) billing-api
  5. document Shipping and delivery policy v2 handbook
  6. document Warranty terms v2 handbook
  7. document Data retention policy v7 handbook
  8. tool result get_shipment(SHP-77120) logistics-api
  9. tool result get_shipment(SHP-77081) logistics-api
  10. document Gift card terms v1 handbook
  11. tool result get_account(acct-2213) billing-api
  12. document Changing a delivery address knowledge-base
  13. user input Customer, message 1 chat
  14. model reply Agent, message 1 chat
  15. user input Customer, message 2 chat
  16. document Tax exemption certificates knowledge-base
  17. error record gateway timeout on refund preview payments-api A failed tool call from earlier in the session, sent to Needlepath like any other record. Recent errors earn their place: a model about to promise a refund needs to know the first refund preview timed out before the retry came back.
  18. document Bulk order discounts knowledge-base
  19. tool result refund_preview(INV-4471), attempt 2 payments-api
  20. tool schema issue_refund tools
  21. document Downloading an invoice PDF knowledge-base
  22. tool result get_account(acct-1180) billing-api
  23. document Loyalty points knowledge-base
  24. document Warehouse notice, July 15 ops-updates
  25. tool result get_catalog_item(HV-CHAIR-04) catalog-api
  26. document Price match policy v1 handbook
  27. tool result get_carrier_alerts(Corvane Freight) logistics-api
  28. document Cancelling an order before it ships knowledge-base
  29. tool result get_open_tickets(acct-2213) support-api
  30. document Returns for unwanted items v5 handbook
  31. document Business workspace plans knowledge-base
  32. document SSO and SCIM provisioning guide, revision 12 knowledge-base

The knowledge base article is the interesting one: a long guide about single sign-on that has nothing to do with a refund. It is there because it is there in real systems, and it is what makes the arithmetic below worth looking at.

The calls

Five decisions. Five real responses.

Step through them. Four of the five calls send the same 32 records, so the question and the budget are the only things that move. The pass through is the one call with a different, smaller set.

DECISION 1 OF 5 · THE PILE

A pile of records, one question.

An AI support agent is handling a refund ticket with a few dozen items available as context: tool call results like the invoice, shipment and refund preview lookups, handbook policies and knowledge base articles, the conversation so far, one failed tool call and one tool schema. Only a few of them belong in front of the model. Needlepath reads the pile and the question, keeps three items, and drops the rest before they go through expensive LLM processing.

Task prompt

Can invoice INV-4471 for account acct-2213 still be refunded, and for how much?

Budget

200 tokens

32 records sent
The records the agent sent 3 of 32 kept
  • get_invoice(INV-4471) tool result not selected
  • Damaged on arrival policy v3 document not selected
  • Refund policy v4 document not selected
  • get_invoice(INV-4468) tool result not selected
  • Shipping and delivery policy v2 document not selected
  • Warranty terms v2 document not selected
  • Data retention policy v7 document not selected
  • get_shipment(SHP-77120) tool result not selected
  • get_shipment(SHP-77081) tool result not selected
  • Gift card terms v1 document not selected
  • get_account(acct-2213) tool result not selected
  • Changing a delivery address document not selected
  • Customer, message 1 user input 13 tok
    score 65.44 kept: covers the question, matches the current request, keyword overlap, topic overlap

    Hi, I paid for two chairs on invoice INV-4471 with

  • Agent, message 1 model reply not selected
  • Customer, message 2 user input not selected
  • Tax exemption certificates document not selected
  • gateway timeout on refund preview error record 39 tok

    A failed tool call from earlier in the session, sent to Needlepath like any other record. Recent errors earn their place: a model about to promise a refund needs to know the first refund preview timed out before the retry came back.

    score 17.52 kept: keyword overlap, a recent error

    {"error": "upstream_timeout", "operation": "refund_preview", "invoice_id": "INV-4471", "attempt": 1, "retryable": true}

  • Bulk order discounts document not selected
  • refund_preview(INV-4471), attempt 2 tool result 108 tok
    score 31.23 kept: covers the question, keyword overlap

    {"operation": "refund_preview", "invoice_id": "INV-4471", "account_id": "acct-2213", "attempt": 2, "refundable": true, "refundable_cents": 128400, "reason_code": "late_delivery", "result": "Invoice INV-4471 for account acct-2213 can still be refunded in full: the 30 day refund window closes 2026-08-08 and the refundable amount is 128400 cents, including the expedited shipping charge, under reason code late_delivery."}

  • issue_refund tool schema not selected
  • Downloading an invoice PDF document not selected
  • get_account(acct-1180) tool result not selected
  • Loyalty points document not selected
  • Warehouse notice, July 15 document not selected
  • get_catalog_item(HV-CHAIR-04) tool result not selected
  • Price match policy v1 document not selected
  • get_carrier_alerts(Corvane Freight) tool result not selected
  • Cancelling an order before it ships document not selected
  • get_open_tickets(acct-2213) tool result not selected
  • Returns for unwanted items v5 document not selected
  • Business workspace plans document not selected
  • SSO and SCIM provisioning guide, revision 12 document not selected
Tokens
before
2,928
after
160
saved
2,768
94.5% of the packet removed decided in 5.89 ms
The verdict, on the wire

The engine selected. The packet above is what the model reads, assembled from your own records.

fallback_used
false
tokens_saved
2,768
gate.engaged
true
gate.reason
engage:delivered_support_complete
usage.outcome
engaged
usage.charge_multiplier
1.0
Read the raw request and response for decision 1, with the wire reason strings
request · task and budget
{
  "request_id": "nm-demo-2026-09-m1",
  "task": {
    "prompt": "Can invoice INV-4471 for account acct-2213 still be refunded, and for how much?"
  },
  "budget": {
    "max_context_tokens": 200,
    "operating_point": "np-2026-08-r4"
  }
}
response
{
  "request_id": "nm-demo-2026-09-m1",
  "policy_version": "np-2026-08-r4",
  "rendered_context": "Relevant State\n\n1. gateway timeout on refund preview (payments-api)\n{\"error\": \"upstream_timeout\", \"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"attempt\": 1, \"retryable\": true}\n\n2. refund_preview(INV-4471), attempt 2 (payments-api)\n{\"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"attempt\": 2, \"refundable\": true, \"refundable_cents\": 128400, \"reason_code\": \"late_delivery\", \"result\": \"Invoice INV-4471 for account acct-2213 can still be refunded in full: the 30 day refund window closes 2026-08-08 and the refundable amount is 128400 cents, including the expedited shipping charge, under reason code late_delivery.\"}\n\n3. Customer, message 1 (chat)\nHi, I paid for two chairs on invoice INV-4471 with",
  "selected": [
    {
      "record_id": "r-payment-error",
      "kind": "error",
      "title": "gateway timeout on refund preview",
      "source": "payments-api",
      "score": 17.518097412411166,
      "reason": "hard context: keyword overlap; recent error",
      "excerpt": "{\"error\": \"upstream_timeout\", \"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"attempt\": 1, \"retryable\": true}",
      "excerpt_format": "plain",
      "selected_tokens": 39
    },
    {
      "record_id": "r-refund-preview",
      "kind": "tool_result",
      "title": "refund_preview(INV-4471), attempt 2",
      "source": "payments-api",
      "score": 31.23293515126317,
      "reason": "hard context: weighted evidence coverage: keyword overlap",
      "excerpt": "{\"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"attempt\": 2, \"refundable\": true, \"refundable_cents\": 128400, \"reason_code\": \"late_delivery\", \"result\": \"Invoice INV-4471 for account acct-2213 can still be refunded in full: the 30 day refund window closes 2026-08-08 and the refundable amount is 128400 cents, including the expedited shipping charge, under reason code late_delivery.\"}",
      "excerpt_format": "plain",
      "selected_tokens": 108
    },
    {
      "record_id": "r-turn-1",
      "kind": "user_input",
      "title": "Customer, message 1",
      "source": "chat",
      "score": 65.43995127285388,
      "reason": "hard context: weighted evidence coverage: current request; keyword overlap; semantic tag overlap",
      "excerpt": "Hi, I paid for two chairs on invoice INV-4471 with",
      "excerpt_format": "plain",
      "selected_tokens": 13
    }
  ],
  "tokens_before": 2928,
  "tokens_after": 160,
  "tokens_saved": 2768,
  "records_available": 32,
  "records_selected": 3,
  "fallback_used": false,
  "selection_error": null,
  "reduction_ratio": 0.9453551912568307,
  "engine_latency_ms": 5.886490000193589,
  "gate": {
    "engaged": true,
    "reason": "engage:delivered_support_complete"
  },
  "usage": {
    "outcome": "engaged",
    "charge_multiplier": "1.0",
    "currency": "USD"
  }
}
DECISION 2 OF 5 · NEW QUESTION

Same pile. Different question. Different answer.

Nothing about the pile changed, but the agent now needs the tracking number and the last scan. The shipment lookup suddenly matters and the refund preview does not, so the kept set changes with the question. There is no stored ranking to go stale: the context rides in on every call, and every call is decided from scratch.

Task prompt

What is the carrier tracking number on shipment SHP-77120 for invoice INV-4471, and where was the parcel last scanned?

Budget

200 tokens

32 records sent
The records the agent sent 3 of 32 kept
  • get_invoice(INV-4471) tool result not selected
  • Damaged on arrival policy v3 document not selected
  • Refund policy v4 document not selected
  • get_invoice(INV-4468) tool result not selected
  • Shipping and delivery policy v2 document not selected
  • Warranty terms v2 document not selected
  • Data retention policy v7 document not selected
  • get_shipment(SHP-77120) tool result 107 tok
    score 20.79 kept: covers the question, keyword overlap

    {"shipment_id": "SHP-77120", "invoice_id": "INV-4471", "carrier": "Corvane Freight", "tracking": "CF889210043US", "service": "expedited", "commitment_date": "2026-07-14", "status": "in_transit", "last_scan": {"at": "2026-07-16T04:10:00Z", "location": "Reno NV", "event": "departed sort facility"}}

  • get_shipment(SHP-77081) tool result not selected
  • Gift card terms v1 document not selected
  • get_account(acct-2213) tool result not selected
  • Changing a delivery address document 20 tok
    score 25.89 kept: covers the question, keyword overlap

    Changing a delivery address. An address can be changed from the order page until

  • Customer, message 1 user input not selected
  • Agent, message 1 model reply not selected
  • Customer, message 2 user input not selected
  • Tax exemption certificates document not selected
  • gateway timeout on refund preview error record 39 tok

    A failed tool call from earlier in the session, sent to Needlepath like any other record. Recent errors earn their place: a model about to promise a refund needs to know the first refund preview timed out before the retry came back.

    score 17.52 kept: keyword overlap, a recent error

    {"error": "upstream_timeout", "operation": "refund_preview", "invoice_id": "INV-4471", "attempt": 1, "retryable": true}

  • Bulk order discounts document not selected
  • refund_preview(INV-4471), attempt 2 tool result not selected
  • issue_refund tool schema not selected
  • Downloading an invoice PDF document not selected
  • get_account(acct-1180) tool result not selected
  • Loyalty points document not selected
  • Warehouse notice, July 15 document not selected
  • get_catalog_item(HV-CHAIR-04) tool result not selected
  • Price match policy v1 document not selected
  • get_carrier_alerts(Corvane Freight) tool result not selected
  • Cancelling an order before it ships document not selected
  • get_open_tickets(acct-2213) tool result not selected
  • Returns for unwanted items v5 document not selected
  • Business workspace plans document not selected
  • SSO and SCIM provisioning guide, revision 12 document not selected
Tokens
before
2,928
after
166
saved
2,762
94.3% of the packet removed decided in 5.25 ms
The verdict, on the wire

The engine selected. The packet above is what the model reads, assembled from your own records.

fallback_used
false
tokens_saved
2,762
gate.engaged
true
gate.reason
engage:delivered_support_complete
usage.outcome
engaged
usage.charge_multiplier
1.0
Read the raw request and response for decision 2, with the wire reason strings
request · task and budget
{
  "request_id": "nm-demo-2026-09-m2",
  "task": {
    "prompt": "What is the carrier tracking number on shipment SHP-77120 for invoice INV-4471, and where was the parcel last scanned?"
  },
  "budget": {
    "max_context_tokens": 200,
    "operating_point": "np-2026-08-r4"
  }
}
response
{
  "request_id": "nm-demo-2026-09-m2",
  "policy_version": "np-2026-08-r4",
  "rendered_context": "Relevant State\n\n1. gateway timeout on refund preview (payments-api)\n{\"error\": \"upstream_timeout\", \"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"attempt\": 1, \"retryable\": true}\n\n2. get_shipment(SHP-77120) (logistics-api)\n{\"shipment_id\": \"SHP-77120\", \"invoice_id\": \"INV-4471\", \"carrier\": \"Corvane Freight\", \"tracking\": \"CF889210043US\", \"service\": \"expedited\", \"commitment_date\": \"2026-07-14\", \"status\": \"in_transit\", \"last_scan\": {\"at\": \"2026-07-16T04:10:00Z\", \"location\": \"Reno NV\", \"event\": \"departed sort facility\"}}\n\n3. Changing a delivery address (knowledge-base)\nChanging a delivery address. An address can be changed from the order page until",
  "selected": [
    {
      "record_id": "r-payment-error",
      "kind": "error",
      "title": "gateway timeout on refund preview",
      "source": "payments-api",
      "score": 17.518097412411166,
      "reason": "hard context: keyword overlap; recent error",
      "excerpt": "{\"error\": \"upstream_timeout\", \"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"attempt\": 1, \"retryable\": true}",
      "excerpt_format": "plain",
      "selected_tokens": 39
    },
    {
      "record_id": "r-shipment",
      "kind": "tool_result",
      "title": "get_shipment(SHP-77120)",
      "source": "logistics-api",
      "score": 20.792070346784268,
      "reason": "hard context: weighted evidence coverage: keyword overlap",
      "excerpt": "{\"shipment_id\": \"SHP-77120\", \"invoice_id\": \"INV-4471\", \"carrier\": \"Corvane Freight\", \"tracking\": \"CF889210043US\", \"service\": \"expedited\", \"commitment_date\": \"2026-07-14\", \"status\": \"in_transit\", \"last_scan\": {\"at\": \"2026-07-16T04:10:00Z\", \"location\": \"Reno NV\", \"event\": \"departed sort facility\"}}",
      "excerpt_format": "plain",
      "selected_tokens": 107
    },
    {
      "record_id": "r-kb-address",
      "kind": "external_data",
      "title": "Changing a delivery address",
      "source": "knowledge-base",
      "score": 25.88572492065572,
      "reason": "hard context: weighted evidence coverage: keyword overlap",
      "excerpt": "Changing a delivery address. An address can be changed from the order page until",
      "excerpt_format": "plain",
      "selected_tokens": 20
    }
  ],
  "tokens_before": 2928,
  "tokens_after": 166,
  "tokens_saved": 2762,
  "records_available": 32,
  "records_selected": 3,
  "fallback_used": false,
  "selection_error": null,
  "reduction_ratio": 0.9433060109289617,
  "engine_latency_ms": 5.2466870001808275,
  "gate": {
    "engaged": true,
    "reason": "engage:delivered_support_complete"
  },
  "usage": {
    "outcome": "engaged",
    "charge_multiplier": "1.0",
    "currency": "USD"
  }
}
DECISION 3 OF 5 · ROOM TO SPARE

A budget is a ceiling, not a target.

The refund question again, with a budget forty times bigger. A method that spends what it is given would fill the room with policy documents. Compare this packet with the first decision: the three records selected at 200 tokens are still here, the extra room admitted a handful of supporting records, and more than nine tenths of the budget went unused. A budget is a ceiling, not a target, so more headroom never means the whole pile through the model.

Task prompt

Can invoice INV-4471 for account acct-2213 still be refunded, and for how much?

Budget

8,000 tokens

32 records sent
The records the agent sent 10 of 32 kept
  • get_invoice(INV-4471) tool result 139 tok
    score 10.32 kept: keyword overlap

    {"invoice_id": "INV-4471", "account_id": "acct-2213", "issued": "2026-07-09", "total_cents": 128400, "currency": "USD", "status": "paid", "paid_at": "2026-07-09T18:22:04Z", "payment_method": "visa-4242", "items": [{"sku": "HV-CHAIR-04", "qty": 2, "cents": 118400}, {"sku": "HV-SHIP-EXP", "qty": 1, "cents": 10000}]}

  • Damaged on arrival policy v3 document not selected
  • Refund policy v4 document 85 tok
    score 12.45 kept: a recent relevant result, keyword overlap

    Refund policy v4. A paid order may be refunded within 30 days of the invoice date. Refunds are issued to the original payment method and settle within 10 business days. Expedited shipping charges are refundable only when the order is refunded in full. Partial refunds are permitted on individual line items and leave shipping charges in place.

  • get_invoice(INV-4468) tool result not selected
  • Shipping and delivery policy v2 document not selected
  • Warranty terms v2 document not selected
  • Data retention policy v7 document 76 tok
    score 10.20 kept: keyword overlap

    Data retention policy v7. Support transcripts are retained for 24 months and then deleted. Account records are retained for the term of the subscription plus seven years for tax purposes. Deletion requests are honoured within 30 days except where a legal hold applies. Backups roll off on a 35 day cycle.

  • get_shipment(SHP-77120) tool result not selected
  • get_shipment(SHP-77081) tool result not selected
  • Gift card terms v1 document not selected
  • get_account(acct-2213) tool result not selected
  • Changing a delivery address document not selected
  • Customer, message 1 user input 37 tok
    score 65.44 kept: covers the question, matches the current request, keyword overlap, topic overlap

    Hi, I paid for two chairs on invoice INV-4471 with expedited shipping and they still are not here. I do not want them anymore. Can I get my money back?

  • Agent, message 1 model reply 27 tok
    score 14.24 kept: keyword overlap

    I am sorry about the delay. Let me pull up invoice INV-4471 and check both the order and the shipment for you.

  • Customer, message 2 user input 22 tok
    score 42.38 kept: matches the current request, topic overlap

    Thank you. If the refund goes through, does the expedited shipping I paid come back too?

  • Tax exemption certificates document not selected
  • gateway timeout on refund preview error record 39 tok

    A failed tool call from earlier in the session, sent to Needlepath like any other record. Recent errors earn their place: a model about to promise a refund needs to know the first refund preview timed out before the retry came back.

    score 17.52 kept: keyword overlap, a recent error

    {"error": "upstream_timeout", "operation": "refund_preview", "invoice_id": "INV-4471", "attempt": 1, "retryable": true}

  • Bulk order discounts document not selected
  • refund_preview(INV-4471), attempt 2 tool result 108 tok
    score 31.23 kept: covers the question, keyword overlap

    {"operation": "refund_preview", "invoice_id": "INV-4471", "account_id": "acct-2213", "attempt": 2, "refundable": true, "refundable_cents": 128400, "reason_code": "late_delivery", "result": "Invoice INV-4471 for account acct-2213 can still be refunded in full: the 30 day refund window closes 2026-08-08 and the refundable amount is 128400 cents, including the expedited shipping charge, under reason code late_delivery."}

  • issue_refund tool schema not selected
  • Downloading an invoice PDF document 49 tok
    score 9.93 kept: keyword overlap

    Downloading an invoice PDF. Every paid order has a PDF invoice on the order page. Business workspaces can also pull invoices through the billing API or have them emailed monthly to a finance address.

  • get_account(acct-1180) tool result not selected
  • Loyalty points document 49 tok
    score 12.34 kept: keyword overlap

    Loyalty points. Business workspaces earn one point per dollar on paid orders. Points post 14 days after delivery and can be applied to future orders. Refunded orders forfeit the points they earned.

  • Warehouse notice, July 15 document not selected
  • get_catalog_item(HV-CHAIR-04) tool result not selected
  • Price match policy v1 document not selected
  • get_carrier_alerts(Corvane Freight) tool result not selected
  • Cancelling an order before it ships document not selected
  • get_open_tickets(acct-2213) tool result not selected
  • Returns for unwanted items v5 document not selected
  • Business workspace plans document not selected
  • SSO and SCIM provisioning guide, revision 12 document not selected
Tokens
before
2,928
after
631
saved
2,297
78.4% of the packet removed decided in 5.2 ms
The verdict, on the wire

The engine selected. The packet above is what the model reads, assembled from your own records.

fallback_used
false
tokens_saved
2,297
gate.engaged
true
gate.reason
engage:delivered_support_complete
usage.outcome
engaged
usage.charge_multiplier
1.0
Read the raw request and response for decision 3, with the wire reason strings
request · task and budget
{
  "request_id": "nm-demo-2026-09-m4",
  "task": {
    "prompt": "Can invoice INV-4471 for account acct-2213 still be refunded, and for how much?"
  },
  "budget": {
    "max_context_tokens": 8000,
    "operating_point": "np-2026-08-r4"
  }
}
response
{
  "request_id": "nm-demo-2026-09-m4",
  "policy_version": "np-2026-08-r4",
  "rendered_context": "Relevant State\n\n1. gateway timeout on refund preview (payments-api)\n{\"error\": \"upstream_timeout\", \"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"attempt\": 1, \"retryable\": true}\n\n2. refund_preview(INV-4471), attempt 2 (payments-api)\n{\"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"attempt\": 2, \"refundable\": true, \"refundable_cents\": 128400, \"reason_code\": \"late_delivery\", \"result\": \"Invoice INV-4471 for account acct-2213 can still be refunded in full: the 30 day refund window closes 2026-08-08 and the refundable amount is 128400 cents, including the expedited shipping charge, under reason code late_delivery.\"}\n\n3. Customer, message 1 (chat)\nHi, I paid for two chairs on invoice INV-4471 with expedited shipping and they still are not here. I do not want them anymore. Can I get my money back?\n\n4. Customer, message 2 (chat)\nThank you. If the refund goes through, does the expedited shipping I paid come back too?\n\n5. Refund policy v4 (handbook)\nRefund policy v4. A paid order may be refunded within 30 days of the invoice date. Refunds are issued to the original payment method and settle within 10 business days. Expedited shipping charges are refundable only when the order is refunded in full. Partial refunds are permitted on individual line items and leave shipping charges in place.\n\n6. Agent, message 1 (chat)\nI am sorry about the delay. Let me pull up invoice INV-4471 and check both the order and the shipment for you.\n\n7. Loyalty points (knowledge-base)\nLoyalty points. Business workspaces earn one point per dollar on paid orders. Points post 14 days after delivery and can be applied to future orders. Refunded orders forfeit the points they earned.\n\n8. get_invoice(INV-4471) (billing-api)\n{\"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"issued\": \"2026-07-09\", \"total_cents\": 128400, \"currency\": \"USD\", \"status\": \"paid\", \"paid_at\": \"2026-07-09T18:22:04Z\", \"payment_method\": \"visa-4242\", \"items\": [{\"sku\": \"HV-CHAIR-04\", \"qty\": 2, \"cents\": 118400}, {\"sku\": \"HV-SHIP-EXP\", \"qty\": 1, \"cents\": 10000}]}\n\n9. Data retention policy v7 (handbook)\nData retention policy v7. Support transcripts are retained for 24 months and then deleted. Account records are retained for the term of the subscription plus seven years for tax purposes. Deletion requests are honoured within 30 days except where a legal hold applies. Backups roll off on a 35 day cycle.\n\n10. Downloading an invoice PDF (knowledge-base)\nDownloading an invoice PDF. Every paid order has a PDF invoice on the order page. Business workspaces can also pull invoices through the billing API or have them emailed monthly to a finance address.",
  "selected": [
    {
      "record_id": "r-payment-error",
      "kind": "error",
      "title": "gateway timeout on refund preview",
      "source": "payments-api",
      "score": 17.518097412411166,
      "reason": "hard context: keyword overlap; recent error",
      "excerpt": "{\"error\": \"upstream_timeout\", \"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"attempt\": 1, \"retryable\": true}",
      "excerpt_format": "plain",
      "selected_tokens": 39
    },
    {
      "record_id": "r-refund-preview",
      "kind": "tool_result",
      "title": "refund_preview(INV-4471), attempt 2",
      "source": "payments-api",
      "score": 31.23293515126317,
      "reason": "hard context: weighted evidence coverage: keyword overlap",
      "excerpt": "{\"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"attempt\": 2, \"refundable\": true, \"refundable_cents\": 128400, \"reason_code\": \"late_delivery\", \"result\": \"Invoice INV-4471 for account acct-2213 can still be refunded in full: the 30 day refund window closes 2026-08-08 and the refundable amount is 128400 cents, including the expedited shipping charge, under reason code late_delivery.\"}",
      "excerpt_format": "plain",
      "selected_tokens": 108
    },
    {
      "record_id": "r-turn-1",
      "kind": "user_input",
      "title": "Customer, message 1",
      "source": "chat",
      "score": 65.43995127285388,
      "reason": "hard context: weighted evidence coverage: current request; keyword overlap; semantic tag overlap",
      "excerpt": "Hi, I paid for two chairs on invoice INV-4471 with expedited shipping and they still are not here. I do not want them anymore. Can I get my money back?",
      "excerpt_format": "plain",
      "selected_tokens": 37
    },
    {
      "record_id": "r-turn-3",
      "kind": "user_input",
      "title": "Customer, message 2",
      "source": "chat",
      "score": 42.37956193946504,
      "reason": "hard context: current request: semantic tag overlap",
      "excerpt": "Thank you. If the refund goes through, does the expedited shipping I paid come back too?",
      "excerpt_format": "plain",
      "selected_tokens": 22
    },
    {
      "record_id": "r-refund-policy",
      "kind": "external_data",
      "title": "Refund policy v4",
      "source": "handbook",
      "score": 12.447427511275645,
      "reason": "hard context: recent relevant result: keyword overlap",
      "excerpt": "Refund policy v4. A paid order may be refunded within 30 days of the invoice date. Refunds are issued to the original payment method and settle within 10 business days. Expedited shipping charges are refundable only when the order is refunded in full. Partial refunds are permitted on individual line items and leave shipping charges in place.",
      "excerpt_format": "plain",
      "selected_tokens": 85
    },
    {
      "record_id": "r-turn-2",
      "kind": "llm_response",
      "title": "Agent, message 1",
      "source": "chat",
      "score": 14.235428040803818,
      "reason": "soft context: keyword overlap",
      "excerpt": "I am sorry about the delay. Let me pull up invoice INV-4471 and check both the order and the shipment for you.",
      "excerpt_format": "plain",
      "selected_tokens": 27
    },
    {
      "record_id": "r-kb-loyalty",
      "kind": "external_data",
      "title": "Loyalty points",
      "source": "knowledge-base",
      "score": 12.343896118651122,
      "reason": "hard context: keyword overlap",
      "excerpt": "Loyalty points. Business workspaces earn one point per dollar on paid orders. Points post 14 days after delivery and can be applied to future orders. Refunded orders forfeit the points they earned.",
      "excerpt_format": "plain",
      "selected_tokens": 49
    },
    {
      "record_id": "r-invoice",
      "kind": "tool_result",
      "title": "get_invoice(INV-4471)",
      "source": "billing-api",
      "score": 10.321833728110214,
      "reason": "hard context: keyword overlap",
      "excerpt": "{\"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"issued\": \"2026-07-09\", \"total_cents\": 128400, \"currency\": \"USD\", \"status\": \"paid\", \"paid_at\": \"2026-07-09T18:22:04Z\", \"payment_method\": \"visa-4242\", \"items\": [{\"sku\": \"HV-CHAIR-04\", \"qty\": 2, \"cents\": 118400}, {\"sku\": \"HV-SHIP-EXP\", \"qty\": 1, \"cents\": 10000}]}",
      "excerpt_format": "plain",
      "selected_tokens": 139
    },
    {
      "record_id": "r-privacy-policy",
      "kind": "external_data",
      "title": "Data retention policy v7",
      "source": "handbook",
      "score": 10.203613082994739,
      "reason": "hard context: keyword overlap",
      "excerpt": "Data retention policy v7. Support transcripts are retained for 24 months and then deleted. Account records are retained for the term of the subscription plus seven years for tax purposes. Deletion requests are honoured within 30 days except where a legal hold applies. Backups roll off on a 35 day cycle.",
      "excerpt_format": "plain",
      "selected_tokens": 76
    },
    {
      "record_id": "r-kb-invoice-pdf",
      "kind": "external_data",
      "title": "Downloading an invoice PDF",
      "source": "knowledge-base",
      "score": 9.926830098864478,
      "reason": "hard context: keyword overlap",
      "excerpt": "Downloading an invoice PDF. Every paid order has a PDF invoice on the order page. Business workspaces can also pull invoices through the billing API or have them emailed monthly to a finance address.",
      "excerpt_format": "plain",
      "selected_tokens": 49
    }
  ],
  "tokens_before": 2928,
  "tokens_after": 631,
  "tokens_saved": 2297,
  "records_available": 32,
  "records_selected": 10,
  "fallback_used": false,
  "selection_error": null,
  "reduction_ratio": 0.7844945355191257,
  "engine_latency_ms": 5.199360000005981,
  "gate": {
    "engaged": true,
    "reason": "engage:delivered_support_complete"
  },
  "usage": {
    "outcome": "engaged",
    "charge_multiplier": "1.0",
    "currency": "USD"
  }
}
DECISION 4 OF 5 · PASS THROUGH

When trimming would not pay, it steps aside.

A different, smaller call: three tool results and nothing else. The engine cannot point to a record that answers the question, so it declines to narrow and hands all three straight back, and you send what you were going to send. Look at the receipt in the response: the charge multiplier is zero. When it cannot help, it says so on the wire, and it costs nothing.

Task prompt

Pull the numbers we need to answer the customer on invoice INV-4471.

Budget

4,000 tokens

3 records sent
The records the agent sent 3 of 3 handed back
  • get_invoice(INV-4471) tool result handed back
  • get_shipment(SHP-77120) tool result handed back
  • get_account(acct-2213) tool result handed back
Tokens
before
305
after
305
saved
0
0% of the packet removed decided in 4.67 ms

The engine handed the whole pile back, so the after figure is the before figure. Your own context goes through whole.

The verdict, on the wire

The engine declined to narrow. Every record came back unchanged, so you send the context you already had.

fallback_used
true
tokens_saved
0
gate.engaged
false
gate.reason
standdown:source_support_missing
usage.outcome
pass_through
usage.charge_multiplier
0

A pass through is a 200 with a usable body: every record comes back, and the response carries a charge multiplier of 0 for that call. Wrong optimization is worse than no optimization, so when the engine cannot stand behind a smaller packet, it takes nothing.

Read the raw request and response for decision 4, with the wire reason strings
request · task and budget
{
  "request_id": "nm-demo-2026-09-m5",
  "task": {
    "prompt": "Pull the numbers we need to answer the customer on invoice INV-4471."
  },
  "budget": {
    "max_context_tokens": 4000,
    "operating_point": "np-2026-08-r4"
  }
}
response
{
  "request_id": "nm-demo-2026-09-m5",
  "policy_version": "np-2026-08-r4",
  "rendered_context": "{\"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"issued\": \"2026-07-09\", \"total_cents\": 128400, \"currency\": \"USD\", \"status\": \"paid\", \"paid_at\": \"2026-07-09T18:22:04Z\", \"payment_method\": \"visa-4242\", \"items\": [{\"sku\": \"HV-CHAIR-04\", \"qty\": 2, \"cents\": 118400}, {\"sku\": \"HV-SHIP-EXP\", \"qty\": 1, \"cents\": 10000}]}\n\n{\"shipment_id\": \"SHP-77120\", \"invoice_id\": \"INV-4471\", \"carrier\": \"Corvane Freight\", \"tracking\": \"CF889210043US\", \"service\": \"expedited\", \"commitment_date\": \"2026-07-14\", \"status\": \"in_transit\", \"last_scan\": {\"at\": \"2026-07-16T04:10:00Z\", \"location\": \"Reno NV\", \"event\": \"departed sort facility\"}}\n\n{\"account_id\": \"acct-2213\", \"name\": \"Mira K.\", \"plan\": \"business\", \"since\": \"2023-02-11\", \"lifetime_cents\": 1841200, \"open_tickets\": 1, \"refunds_last_12mo\": 0}",
  "selected": [
    {
      "record_id": "r-invoice",
      "kind": "tool_result",
      "title": "get_invoice(INV-4471)",
      "source": "billing-api",
      "score": 4.171848739118447,
      "reason": "full context fallback",
      "excerpt": "{\"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"issued\": \"2026-07-09\", \"total_cents\": 128400, \"currency\": \"USD\", \"status\": \"paid\", \"paid_at\": \"2026-07-09T18:22:04Z\", \"payment_method\": \"visa-4242\", \"items\": [{\"sku\": \"HV-CHAIR-04\", \"qty\": 2, \"cents\": 118400}, {\"sku\": \"HV-SHIP-EXP\", \"qty\": 1, \"cents\": 10000}]}",
      "excerpt_format": "plain",
      "selected_tokens": 139
    },
    {
      "record_id": "r-shipment",
      "kind": "tool_result",
      "title": "get_shipment(SHP-77120)",
      "source": "logistics-api",
      "score": 4.198515405785114,
      "reason": "full context fallback",
      "excerpt": "{\"shipment_id\": \"SHP-77120\", \"invoice_id\": \"INV-4471\", \"carrier\": \"Corvane Freight\", \"tracking\": \"CF889210043US\", \"service\": \"expedited\", \"commitment_date\": \"2026-07-14\", \"status\": \"in_transit\", \"last_scan\": {\"at\": \"2026-07-16T04:10:00Z\", \"location\": \"Reno NV\", \"event\": \"departed sort facility\"}}",
      "excerpt_format": "plain",
      "selected_tokens": 107
    },
    {
      "record_id": "r-account",
      "kind": "tool_result",
      "title": "get_account(acct-2213)",
      "source": "billing-api",
      "score": 0,
      "reason": "full context fallback",
      "excerpt": "{\"account_id\": \"acct-2213\", \"name\": \"Mira K.\", \"plan\": \"business\", \"since\": \"2023-02-11\", \"lifetime_cents\": 1841200, \"open_tickets\": 1, \"refunds_last_12mo\": 0}",
      "excerpt_format": "plain",
      "selected_tokens": 59
    }
  ],
  "tokens_before": 305,
  "tokens_after": 305,
  "tokens_saved": 0,
  "records_available": 3,
  "records_selected": 3,
  "fallback_used": true,
  "selection_error": null,
  "reduction_ratio": 0,
  "engine_latency_ms": 4.6731000002182554,
  "gate": {
    "engaged": false,
    "reason": "standdown:source_support_missing"
  },
  "usage": {
    "outcome": "pass_through",
    "charge_multiplier": "0",
    "currency": "USD"
  }
}
DECISION 5 OF 5 · THE SQUEEZE

Given room for one record, it declines rather than guess.

A stress test, not a configuration you would run: we cut the budget to forty tokens, room for about one record, to see what the engine does. It does not pick a favourite. The records that answer the question will not fit in that room, so it declines the whole call, hands every record back unchanged, and charges nothing for it. Under normal budgets you never make this trade; under an impossible one, the engine would rather send you everything than a packet it cannot stand behind.

Task prompt

Can invoice INV-4471 for account acct-2213 still be refunded, and for how much?

Budget

40 tokens

32 records sent
The records the agent sent 32 of 32 handed back
  • get_invoice(INV-4471) tool result handed back
  • Damaged on arrival policy v3 document handed back
  • Refund policy v4 document handed back
  • get_invoice(INV-4468) tool result handed back
  • Shipping and delivery policy v2 document handed back
  • Warranty terms v2 document handed back
  • Data retention policy v7 document handed back
  • get_shipment(SHP-77120) tool result handed back
  • get_shipment(SHP-77081) tool result handed back
  • Gift card terms v1 document handed back
  • get_account(acct-2213) tool result handed back
  • Changing a delivery address document handed back
  • Customer, message 1 user input handed back
  • Agent, message 1 model reply handed back
  • Customer, message 2 user input handed back
  • Tax exemption certificates document handed back
  • gateway timeout on refund preview error record handed back
  • Bulk order discounts document handed back
  • refund_preview(INV-4471), attempt 2 tool result handed back
  • issue_refund tool schema handed back
  • Downloading an invoice PDF document handed back
  • get_account(acct-1180) tool result handed back
  • Loyalty points document handed back
  • Warehouse notice, July 15 document handed back
  • get_catalog_item(HV-CHAIR-04) tool result handed back
  • Price match policy v1 document handed back
  • get_carrier_alerts(Corvane Freight) tool result handed back
  • Cancelling an order before it ships document handed back
  • get_open_tickets(acct-2213) tool result handed back
  • Returns for unwanted items v5 document handed back
  • Business workspace plans document handed back
  • SSO and SCIM provisioning guide, revision 12 document handed back
Tokens
before
2,620
after
2,620
saved
0
0% of the packet removed decided in 6.1 ms

The engine handed the whole pile back, so the after figure is the before figure. Your own context goes through whole.

The verdict, on the wire

The engine declined to narrow. Every record came back unchanged, so you send the context you already had.

fallback_used
true
tokens_saved
0
gate.engaged
false
gate.reason
standdown:mandatory_support_not_packed
usage.outcome
pass_through
usage.charge_multiplier
0

A pass through is a 200 with a usable body: every record comes back, and the response carries a charge multiplier of 0 for that call. Wrong optimization is worse than no optimization, so when the engine cannot stand behind a smaller packet, it takes nothing.

Read the raw request and response for decision 5, with the wire reason strings
request · task and budget
{
  "request_id": "nm-demo-2026-09-m3",
  "task": {
    "prompt": "Can invoice INV-4471 for account acct-2213 still be refunded, and for how much?"
  },
  "budget": {
    "max_context_tokens": 40,
    "operating_point": "np-2026-08-r4"
  }
}
response
{
  "request_id": "nm-demo-2026-09-m3",
  "policy_version": "np-2026-08-r4",
  "rendered_context": "{\"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"issued\": \"2026-07-09\", \"total_cents\": 128400, \"currency\": \"USD\", \"status\": \"paid\", \"paid_at\": \"2026-07-09T18:22:04Z\", \"payment_method\": \"visa-4242\", \"items\": [{\"sku\": \"HV-CHAIR-04\", \"qty\": 2, \"cents\": 118400}, {\"sku\": \"HV-SHIP-EXP\", \"qty\": 1, \"cents\": 10000}]}\n\nDamaged on arrival policy v3. Report damage within 7 days of delivery with photos of the item and the packaging. A replacement ships at no charge and the damaged item is collected by the carrier. Replacements do not restart the warranty period.\n\nRefund policy v4. A paid order may be refunded within 30 days of the invoice date. Refunds are issued to the original payment method and settle within 10 business days. Expedited shipping charges are refundable only when the order is refunded in full. Partial refunds are permitted on individual line items and leave shipping charges in place.\n\n{\"invoice_id\": \"INV-4468\", \"account_id\": \"acct-1180\", \"issued\": \"2026-07-08\", \"total_cents\": 84900, \"currency\": \"USD\", \"status\": \"paid\", \"paid_at\": \"2026-07-08T11:04:51Z\", \"payment_method\": \"mastercard-7710\", \"items\": [{\"sku\": \"HV-DESK-02\", \"qty\": 1, \"cents\": 79900}, {\"sku\": \"HV-SHIP-STD\", \"qty\": 1, \"cents\": 5000}]}\n\nShipping and delivery policy v2. Expedited orders ship the same business day when placed before 2pm local warehouse time. A delivery is considered late once it passes the carrier commitment date by two business days, at which point the expedited shipping charge is refunded automatically. Address changes are accepted until the carrier scans the parcel.\n\nWarranty terms v2. Office chairs carry a five year warranty on the frame and mechanism and two years on upholstery and gas lifts. Desks carry a ten year warranty on the frame. Warranty claims are opened from the order page and need the serial number from the underside label.\n\nData retention policy v7. Support transcripts are retained for 24 months and then deleted. Account records are retained for the term of the subscription plus seven years for tax purposes. Deletion requests are honoured within 30 days except where a legal hold applies. Backups roll off on a 35 day cycle.\n\n{\"shipment_id\": \"SHP-77120\", \"invoice_id\": \"INV-4471\", \"carrier\": \"Corvane Freight\", \"tracking\": \"CF889210043US\", \"service\": \"expedited\", \"commitment_date\": \"2026-07-14\", \"status\": \"in_transit\", \"last_scan\": {\"at\": \"2026-07-16T04:10:00Z\", \"location\": \"Reno NV\", \"event\": \"departed sort facility\"}}\n\n{\"shipment_id\": \"SHP-77081\", \"invoice_id\": \"INV-4468\", \"carrier\": \"Corvane Freight\", \"tracking\": \"CF889174420US\", \"service\": \"standard\", \"commitment_date\": \"2026-07-15\", \"status\": \"delivered\", \"delivered_at\": \"2026-07-13T15:42:00Z\"}\n\nGift card terms v1. Gift cards never expire and carry no fees. They can be applied to any order at checkout and combined with one promotional code. Gift card balances are not redeemable for cash except where the law requires it.\n\n{\"account_id\": \"acct-2213\", \"name\": \"Mira K.\", \"plan\": \"business\", \"since\": \"2023-02-11\", \"lifetime_cents\": 1841200, \"open_tickets\": 1, \"refunds_last_12mo\": 0}\n\nChanging a delivery address. An address can be changed from the order page until the carrier scans the parcel. After the first scan, contact the carrier directly with the tracking number; a reroute fee may apply for expedited services.\n\nHi, I paid for two chairs on invoice INV-4471 with expedited shipping and they still are not here. I do not want them anymore. Can I get my money back?\n\nI am sorry about the delay. Let me pull up invoice INV-4471 and check both the order and the shipment for you.\n\nThank you. If the refund goes through, does the expedited shipping I paid come back too?\n\nTax exemption certificates. Upload a valid certificate from the billing page; tax is removed from orders placed after the certificate is approved, usually within two business days. Certificates are reviewed yearly.\n\n{\"error\": \"upstream_timeout\", \"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"attempt\": 1, \"retryable\": true}\n\nBulk order discounts. Orders of 25 or more of the same item qualify for tiered pricing that is applied automatically at checkout. Bulk orders ship on pallets and cannot use expedited service.\n\n{\"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"attempt\": 2, \"refundable\": true, \"refundable_cents\": 128400, \"reason_code\": \"late_delivery\", \"result\": \"Invoice INV-4471 for account acct-2213 can still be refunded in full: the 30 day refund window closes 2026-08-08 and the refundable amount is 128400 cents, including the expedited shipping charge, under reason code late_delivery.\"}\n\n{\"name\": \"issue_refund\", \"description\": \"Refund an invoice in full or by line item to the original payment method.\", \"parameters\": {\"type\": \"object\", \"required\": [\"invoice_id\", \"amount_cents\", \"reason\"], \"properties\": {\"invoice_id\": {\"type\": \"string\"}, \"amount_cents\": {\"type\": \"integer\"}, \"reason\": {\"type\": \"string\", \"enum\": [\"late_delivery\", \"damaged\", \"customer_request\", \"duplicate\"]}, \"line_items\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}}}\n\nDownloading an invoice PDF. Every paid order has a PDF invoice on the order page. Business workspaces can also pull invoices through the billing API or have them emailed monthly to a finance address.\n\n{\"account_id\": \"acct-1180\", \"name\": \"Theo R.\", \"plan\": \"starter\", \"since\": \"2025-10-02\", \"lifetime_cents\": 84900, \"open_tickets\": 0, \"refunds_last_12mo\": 0}\n\nLoyalty points. Business workspaces earn one point per dollar on paid orders. Points post 14 days after delivery and can be applied to future orders. Refunded orders forfeit the points they earned.\n\nWarehouse notice, July 15. The Reno sort facility is running about a day behind after the July 14 storm. Expedited parcels routed through Reno may miss their commitment date this week; the carrier has been notified.\n\n{\"sku\": \"HV-CHAIR-04\", \"name\": \"Halverden task chair\", \"price_cents\": 59200, \"in_stock\": true, \"lead_time_days\": 3, \"weight_kg\": 14.2}\n\nPrice match policy v1. We match a lower advertised price from an authorised retailer within 14 days of purchase. The difference is issued as store credit. Clearance and bundle prices are excluded.\n\n{\"carrier\": \"Corvane Freight\", \"service_alerts\": [{\"region\": \"NV\", \"message\": \"sort facility delays of 24 to 48 hours\", \"since\": \"2026-07-15\"}]}\n\nCancelling an order before it ships. Orders can be cancelled from the order page until the warehouse picks them, usually within two hours of placing the order. Cancelled orders are not charged.\n\n{\"account_id\": \"acct-2213\", \"open_tickets\": [{\"id\": \"TCK-9031\", \"subject\": \"Chairs not delivered yet\", \"opened\": \"2026-07-17\", \"channel\": \"chat\"}]}\n\nReturns for unwanted items v5. Unopened items may be returned within 30 days of delivery. Return shipping is deducted from the amount returned unless the delivery was late or the item arrived damaged.\n\nBusiness workspace plans. Business workspaces get consolidated monthly invoicing, purchase order support and a dedicated account contact. Enterprise adds SSO enforcement, SCIM provisioning and custom payment terms.\n\nSSO and SCIM provisioning guide, revision 12.\n\nHalverden Supply supports SAML 2.0 single sign-on for Business and Enterprise workspaces. An identity provider is configured once per workspace by an owner. Any identity provider that can emit a signed SAML assertion with a persistent NameID is supported, including the widely used commercial and open source providers.\n\nTo begin, open Workspace settings, then Authentication, then Single sign-on. Copy the Assertion Consumer Service URL and the Service Provider Entity ID into your identity provider. The ACS URL is workspace specific and is regenerated whenever a workspace is renamed, so a rename requires a matching update on the provider side or sign-in will fail with a mismatched audience error.\n\nAttribute mapping. The assertion must carry an email attribute. Optional attributes are first_name, last_name, department, employee_id and manager_email. Attributes are read on every sign-in, so a change in the directory is reflected in the workspace on the next login rather than immediately.\n\nSCIM provisioning is available on Enterprise workspaces. A SCIM token is minted from the same Authentication panel and is shown once. The SCIM endpoint supports Users and Groups, create, update, patch and deactivate. Deactivation removes workspace access and retains the audit trail. Deletion through SCIM is treated as deactivation.\n\nGroup to role mapping. A group named workspace-admins grants the Admin role. A group named workspace-billing grants the Billing role. Unmapped groups are synchronised but grant nothing. Role changes take effect on the next sign-in.\n\nEnforcement. Once SSO enforcement is on, password sign-in is disabled for every member except break glass owners. At least one break glass owner must remain, and the system refuses to enforce SSO if enabling it would lock every owner out. Break glass owners are required to hold a second factor.\n\nTroubleshooting. A signature validation failure usually means the certificate was rotated at the provider without being updated here. An audience mismatch usually follows a workspace rename. A NameID mismatch means the provider is emitting a transient identifier where a persistent one is required. A loop between the provider and the workspace generally means clock skew above five minutes on the provider host.\n\nCertificate rotation. Provider certificates are pinned by fingerprint. Two certificates may be active at once so a rotation can be staged. Remove the retired certificate only after every member has signed in against the new one.\n\nSession length. Default session length is thirty days on trusted devices and twelve hours otherwise. Enterprise workspaces may set session length between one hour and thirty days. Shortening a session length does not revoke sessions already issued. Use Revoke all sessions for that.\n\nAudit. Every sign-in, provisioning event and role change writes an audit record with actor, target, source address and result. Audit records are exportable as CSV or JSON from the Audit panel and are also available through the audit API. Records are retained for the term of the subscription.\n\nKnown limits. Nested groups are flattened. Multi valued department attributes take the first value. A member who belongs to two role granting groups receives the higher role. Just in time provisioning creates members but never deletes them.",
  "selected": [
    {
      "record_id": "r-invoice",
      "kind": "tool_result",
      "title": "get_invoice(INV-4471)",
      "source": "billing-api",
      "score": 10.321833728110214,
      "reason": "full context fallback",
      "excerpt": "{\"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"issued\": \"2026-07-09\", \"total_cents\": 128400, \"currency\": \"USD\", \"status\": \"paid\", \"paid_at\": \"2026-07-09T18:22:04Z\", \"payment_method\": \"visa-4242\", \"items\": [{\"sku\": \"HV-CHAIR-04\", \"qty\": 2, \"cents\": 118400}, {\"sku\": \"HV-SHIP-EXP\", \"qty\": 1, \"cents\": 10000}]}",
      "excerpt_format": "plain",
      "selected_tokens": 139
    },
    {
      "record_id": "r-kb-damaged",
      "kind": "external_data",
      "title": "Damaged on arrival policy v3",
      "source": "handbook",
      "score": 2.8066168985178885,
      "reason": "full context fallback",
      "excerpt": "Damaged on arrival policy v3. Report damage within 7 days of delivery with photos of the item and the packaging. A replacement ships at no charge and the damaged item is collected by the carrier. Replacements do not restart the warranty period.",
      "excerpt_format": "plain",
      "selected_tokens": 61
    },
    {
      "record_id": "r-refund-policy",
      "kind": "external_data",
      "title": "Refund policy v4",
      "source": "handbook",
      "score": 12.447427511275645,
      "reason": "full context fallback",
      "excerpt": "Refund policy v4. A paid order may be refunded within 30 days of the invoice date. Refunds are issued to the original payment method and settle within 10 business days. Expedited shipping charges are refundable only when the order is refunded in full. Partial refunds are permitted on individual line items and leave shipping charges in place.",
      "excerpt_format": "plain",
      "selected_tokens": 85
    },
    {
      "record_id": "r-other-invoice",
      "kind": "tool_result",
      "title": "get_invoice(INV-4468)",
      "source": "billing-api",
      "score": 0,
      "reason": "full context fallback",
      "excerpt": "{\"invoice_id\": \"INV-4468\", \"account_id\": \"acct-1180\", \"issued\": \"2026-07-08\", \"total_cents\": 84900, \"currency\": \"USD\", \"status\": \"paid\", \"paid_at\": \"2026-07-08T11:04:51Z\", \"payment_method\": \"mastercard-7710\", \"items\": [{\"sku\": \"HV-DESK-02\", \"qty\": 1, \"cents\": 79900}, {\"sku\": \"HV-SHIP-STD\", \"qty\": 1, \"cents\": 5000}]}",
      "excerpt_format": "plain",
      "selected_tokens": 139
    },
    {
      "record_id": "r-shipping-policy",
      "kind": "external_data",
      "title": "Shipping and delivery policy v2",
      "source": "handbook",
      "score": 2.784116898517888,
      "reason": "full context fallback",
      "excerpt": "Shipping and delivery policy v2. Expedited orders ship the same business day when placed before 2pm local warehouse time. A delivery is considered late once it passes the carrier commitment date by two business days, at which point the expedited shipping charge is refunded automatically. Address changes are accepted until the carrier scans the parcel.",
      "excerpt_format": "plain",
      "selected_tokens": 88
    },
    {
      "record_id": "r-kb-warranty",
      "kind": "external_data",
      "title": "Warranty terms v2",
      "source": "handbook",
      "score": 2.800783565184555,
      "reason": "full context fallback",
      "excerpt": "Warranty terms v2. Office chairs carry a five year warranty on the frame and mechanism and two years on upholstery and gas lifts. Desks carry a ten year warranty on the frame. Warranty claims are opened from the order page and need the serial number from the underside label.",
      "excerpt_format": "plain",
      "selected_tokens": 68
    },
    {
      "record_id": "r-privacy-policy",
      "kind": "external_data",
      "title": "Data retention policy v7",
      "source": "handbook",
      "score": 10.203613082994739,
      "reason": "full context fallback",
      "excerpt": "Data retention policy v7. Support transcripts are retained for 24 months and then deleted. Account records are retained for the term of the subscription plus seven years for tax purposes. Deletion requests are honoured within 30 days except where a legal hold applies. Backups roll off on a 35 day cycle.",
      "excerpt_format": "plain",
      "selected_tokens": 76
    },
    {
      "record_id": "r-shipment",
      "kind": "tool_result",
      "title": "get_shipment(SHP-77120)",
      "source": "logistics-api",
      "score": 5.461430745744501,
      "reason": "full context fallback",
      "excerpt": "{\"shipment_id\": \"SHP-77120\", \"invoice_id\": \"INV-4471\", \"carrier\": \"Corvane Freight\", \"tracking\": \"CF889210043US\", \"service\": \"expedited\", \"commitment_date\": \"2026-07-14\", \"status\": \"in_transit\", \"last_scan\": {\"at\": \"2026-07-16T04:10:00Z\", \"location\": \"Reno NV\", \"event\": \"departed sort facility\"}}",
      "excerpt_format": "plain",
      "selected_tokens": 107
    },
    {
      "record_id": "r-other-shipment",
      "kind": "tool_result",
      "title": "get_shipment(SHP-77081)",
      "source": "logistics-api",
      "score": 0,
      "reason": "full context fallback",
      "excerpt": "{\"shipment_id\": \"SHP-77081\", \"invoice_id\": \"INV-4468\", \"carrier\": \"Corvane Freight\", \"tracking\": \"CF889174420US\", \"service\": \"standard\", \"commitment_date\": \"2026-07-15\", \"status\": \"delivered\", \"delivered_at\": \"2026-07-13T15:42:00Z\"}",
      "excerpt_format": "plain",
      "selected_tokens": 82
    },
    {
      "record_id": "r-kb-gift-cards",
      "kind": "external_data",
      "title": "Gift card terms v1",
      "source": "handbook",
      "score": 7.227016251637867,
      "reason": "full context fallback",
      "excerpt": "Gift card terms v1. Gift cards never expire and carry no fees. They can be applied to any order at checkout and combined with one promotional code. Gift card balances are not redeemable for cash except where the law requires it.",
      "excerpt_format": "plain",
      "selected_tokens": 57
    },
    {
      "record_id": "r-account",
      "kind": "tool_result",
      "title": "get_account(acct-2213)",
      "source": "billing-api",
      "score": 5.837902982365713,
      "reason": "full context fallback",
      "excerpt": "{\"account_id\": \"acct-2213\", \"name\": \"Mira K.\", \"plan\": \"business\", \"since\": \"2023-02-11\", \"lifetime_cents\": 1841200, \"open_tickets\": 1, \"refunds_last_12mo\": 0}",
      "excerpt_format": "plain",
      "selected_tokens": 59
    },
    {
      "record_id": "r-kb-address",
      "kind": "external_data",
      "title": "Changing a delivery address",
      "source": "knowledge-base",
      "score": 7.668015670583571,
      "reason": "full context fallback",
      "excerpt": "Changing a delivery address. An address can be changed from the order page until the carrier scans the parcel. After the first scan, contact the carrier directly with the tracking number; a reroute fee may apply for expedited services.",
      "excerpt_format": "plain",
      "selected_tokens": 58
    },
    {
      "record_id": "r-turn-1",
      "kind": "user_input",
      "title": "Customer, message 1",
      "source": "chat",
      "score": 65.43995127285388,
      "reason": "full context fallback",
      "excerpt": "Hi, I paid for two chairs on invoice INV-4471 with expedited shipping and they still are not here. I do not want them anymore. Can I get my money back?",
      "excerpt_format": "plain",
      "selected_tokens": 37
    },
    {
      "record_id": "r-turn-2",
      "kind": "llm_response",
      "title": "Agent, message 1",
      "source": "chat",
      "score": 14.235428040803818,
      "reason": "full context fallback",
      "excerpt": "I am sorry about the delay. Let me pull up invoice INV-4471 and check both the order and the shipment for you.",
      "excerpt_format": "plain",
      "selected_tokens": 27
    },
    {
      "record_id": "r-turn-3",
      "kind": "user_input",
      "title": "Customer, message 2",
      "source": "chat",
      "score": 42.37956193946504,
      "reason": "full context fallback",
      "excerpt": "Thank you. If the refund goes through, does the expedited shipping I paid come back too?",
      "excerpt_format": "plain",
      "selected_tokens": 22
    },
    {
      "record_id": "r-kb-tax",
      "kind": "external_data",
      "title": "Tax exemption certificates",
      "source": "knowledge-base",
      "score": 0,
      "reason": "full context fallback",
      "excerpt": "Tax exemption certificates. Upload a valid certificate from the billing page; tax is removed from orders placed after the certificate is approved, usually within two business days. Certificates are reviewed yearly.",
      "excerpt_format": "plain",
      "selected_tokens": 53
    },
    {
      "record_id": "r-payment-error",
      "kind": "error",
      "title": "gateway timeout on refund preview",
      "source": "payments-api",
      "score": 17.518097412411166,
      "reason": "full context fallback",
      "excerpt": "{\"error\": \"upstream_timeout\", \"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"attempt\": 1, \"retryable\": true}",
      "excerpt_format": "plain",
      "selected_tokens": 39
    },
    {
      "record_id": "r-kb-bulk",
      "kind": "external_data",
      "title": "Bulk order discounts",
      "source": "knowledge-base",
      "score": 5.117566549314816,
      "reason": "full context fallback",
      "excerpt": "Bulk order discounts. Orders of 25 or more of the same item qualify for tiered pricing that is applied automatically at checkout. Bulk orders ship on pallets and cannot use expedited service.",
      "excerpt_format": "plain",
      "selected_tokens": 47
    },
    {
      "record_id": "r-refund-preview",
      "kind": "tool_result",
      "title": "refund_preview(INV-4471), attempt 2",
      "source": "payments-api",
      "score": 31.23293515126317,
      "reason": "full context fallback",
      "excerpt": "{\"operation\": \"refund_preview\", \"invoice_id\": \"INV-4471\", \"account_id\": \"acct-2213\", \"attempt\": 2, \"refundable\": true, \"refundable_cents\": 128400, \"reason_code\": \"late_delivery\", \"result\": \"Invoice INV-4471 for account acct-2213 can still be refunded in full: the 30 day refund window closes 2026-08-08 and the refundable amount is 128400 cents, including the expedited shipping charge, under reason code late_delivery.\"}",
      "excerpt_format": "plain",
      "selected_tokens": 108
    },
    {
      "record_id": "r-refund-schema",
      "kind": "tool_schema",
      "title": "issue_refund",
      "source": "tools",
      "score": 5.416430745744501,
      "reason": "full context fallback",
      "excerpt": "{\"name\": \"issue_refund\", \"description\": \"Refund an invoice in full or by line item to the original payment method.\", \"parameters\": {\"type\": \"object\", \"required\": [\"invoice_id\", \"amount_cents\", \"reason\"], \"properties\": {\"invoice_id\": {\"type\": \"string\"}, \"amount_cents\": {\"type\": \"integer\"}, \"reason\": {\"type\": \"string\", \"enum\": [\"late_delivery\", \"damaged\", \"customer_request\", \"duplicate\"]}, \"line_items\": {\"type\": \"array\", \"items\": {\"type\": \"string\"}}}}}",
      "excerpt_format": "plain",
      "selected_tokens": 161
    },
    {
      "record_id": "r-kb-invoice-pdf",
      "kind": "external_data",
      "title": "Downloading an invoice PDF",
      "source": "knowledge-base",
      "score": 9.926830098864478,
      "reason": "full context fallback",
      "excerpt": "Downloading an invoice PDF. Every paid order has a PDF invoice on the order page. Business workspaces can also pull invoices through the billing API or have them emailed monthly to a finance address.",
      "excerpt_format": "plain",
      "selected_tokens": 49
    },
    {
      "record_id": "r-other-account",
      "kind": "tool_result",
      "title": "get_account(acct-1180)",
      "source": "billing-api",
      "score": 0,
      "reason": "full context fallback",
      "excerpt": "{\"account_id\": \"acct-1180\", \"name\": \"Theo R.\", \"plan\": \"starter\", \"since\": \"2025-10-02\", \"lifetime_cents\": 84900, \"open_tickets\": 0, \"refunds_last_12mo\": 0}",
      "excerpt_format": "plain",
      "selected_tokens": 59
    },
    {
      "record_id": "r-kb-loyalty",
      "kind": "external_data",
      "title": "Loyalty points",
      "source": "knowledge-base",
      "score": 12.343896118651122,
      "reason": "full context fallback",
      "excerpt": "Loyalty points. Business workspaces earn one point per dollar on paid orders. Points post 14 days after delivery and can be applied to future orders. Refunded orders forfeit the points they earned.",
      "excerpt_format": "plain",
      "selected_tokens": 49
    },
    {
      "record_id": "r-warehouse-notice",
      "kind": "external_data",
      "title": "Warehouse notice, July 15",
      "source": "ops-updates",
      "score": 0,
      "reason": "full context fallback",
      "excerpt": "Warehouse notice, July 15. The Reno sort facility is running about a day behind after the July 14 storm. Expedited parcels routed through Reno may miss their commitment date this week; the carrier has been notified.",
      "excerpt_format": "plain",
      "selected_tokens": 53
    },
    {
      "record_id": "r-catalog-chair",
      "kind": "tool_result",
      "title": "get_catalog_item(HV-CHAIR-04)",
      "source": "catalog-api",
      "score": 0,
      "reason": "full context fallback",
      "excerpt": "{\"sku\": \"HV-CHAIR-04\", \"name\": \"Halverden task chair\", \"price_cents\": 59200, \"in_stock\": true, \"lead_time_days\": 3, \"weight_kg\": 14.2}",
      "excerpt_format": "plain",
      "selected_tokens": 49
    },
    {
      "record_id": "r-kb-price-match",
      "kind": "external_data",
      "title": "Price match policy v1",
      "source": "handbook",
      "score": 2.8166168985178883,
      "reason": "full context fallback",
      "excerpt": "Price match policy v1. We match a lower advertised price from an authorised retailer within 14 days of purchase. The difference is issued as store credit. Clearance and bundle prices are excluded.",
      "excerpt_format": "plain",
      "selected_tokens": 49
    },
    {
      "record_id": "r-carrier-alerts",
      "kind": "tool_result",
      "title": "get_carrier_alerts(Corvane Freight)",
      "source": "logistics-api",
      "score": 0,
      "reason": "full context fallback",
      "excerpt": "{\"carrier\": \"Corvane Freight\", \"service_alerts\": [{\"region\": \"NV\", \"message\": \"sort facility delays of 24 to 48 hours\", \"since\": \"2026-07-15\"}]}",
      "excerpt_format": "plain",
      "selected_tokens": 53
    },
    {
      "record_id": "r-kb-cancel",
      "kind": "external_data",
      "title": "Cancelling an order before it ships",
      "source": "knowledge-base",
      "score": 5.3770660197866444,
      "reason": "full context fallback",
      "excerpt": "Cancelling an order before it ships. Orders can be cancelled from the order page until the warehouse picks them, usually within two hours of placing the order. Cancelled orders are not charged.",
      "excerpt_format": "plain",
      "selected_tokens": 48
    },
    {
      "record_id": "r-open-tickets",
      "kind": "tool_result",
      "title": "get_open_tickets(acct-2213)",
      "source": "support-api",
      "score": 5.8370696490323795,
      "reason": "full context fallback",
      "excerpt": "{\"account_id\": \"acct-2213\", \"open_tickets\": [{\"id\": \"TCK-9031\", \"subject\": \"Chairs not delivered yet\", \"opened\": \"2026-07-17\", \"channel\": \"chat\"}]}",
      "excerpt_format": "plain",
      "selected_tokens": 60
    },
    {
      "record_id": "r-kb-returns",
      "kind": "external_data",
      "title": "Returns for unwanted items v5",
      "source": "handbook",
      "score": 3.257616317463594,
      "reason": "full context fallback",
      "excerpt": "Returns for unwanted items v5. Unopened items may be returned within 30 days of delivery. Return shipping is deducted from the amount returned unless the delivery was late or the item arrived damaged.",
      "excerpt_format": "plain",
      "selected_tokens": 50
    },
    {
      "record_id": "r-kb-plans",
      "kind": "external_data",
      "title": "Business workspace plans",
      "source": "knowledge-base",
      "score": 7.923496765531144,
      "reason": "full context fallback",
      "excerpt": "Business workspace plans. Business workspaces get consolidated monthly invoicing, purchase order support and a dedicated account contact. Enterprise adds SSO enforcement, SCIM provisioning and custom payment terms.",
      "excerpt_format": "plain",
      "selected_tokens": 53
    },
    {
      "record_id": "r-kb-sso",
      "kind": "external_data",
      "title": "SSO and SCIM provisioning guide, revision 12",
      "source": "knowledge-base",
      "score": 4.454233215981483,
      "reason": "full context fallback",
      "excerpt": "SSO and SCIM provisioning guide, revision 12.\n\nHalverden Supply supports SAML 2.0 single sign-on for Business and Enterprise workspaces. An identity provider is configured once per workspace by an owner. Any identity provider that can emit a signed SAML assertion with a persistent NameID is supported, including the widely used commercial and open source providers.\n\nTo begin, open Workspace settings, then Authentication, then Single sign-on. Copy the Assertion Consumer Service URL and the Service Provider Entity ID into your identity provider. The ACS URL is workspace specific and is regenerated whenever a workspace is renamed, so a rename requires a matching update on the provider side or sign-in will fail with a mismatched audience error.\n\nAttribute mapping. The assertion must carry an email attribute. Optional attributes are first_name, last_name, department, employee_id and manager_email. Attributes are read on every sign-in, so a change in the directory is reflected in the workspace on the next login rather than immediately.\n\nSCIM provisioning is available on Enterprise workspaces. A SCIM token is minted from the same Authentication panel and is shown once. The SCIM endpoint supports Users and Groups, create, update, patch and deactivate. Deactivation removes workspace access and retains the audit trail. Deletion through SCIM is treated as deactivation.\n\nGroup to role mapping. A group named workspace-admins grants the Admin role. A group named workspace-billing grants the Billing role. Unmapped groups are synchronised but grant nothing. Role changes take effect on the next sign-in.\n\nEnforcement. Once SSO enforcement is on, password sign-in is disabled for every member except break glass owners. At least one break glass owner must remain, and the system refuses to enforce SSO if enabling it would lock every owner out. Break glass owners are required to hold a second factor.\n\nTroubleshooting. A signature validation failure usually means the certificate was rotated at the provider without being updated here. An audience mismatch usually follows a workspace rename. A NameID mismatch means the provider is emitting a transient identifier where a persistent one is required. A loop between the provider and the workspace generally means clock skew above five minutes on the provider host.\n\nCertificate rotation. Provider certificates are pinned by fingerprint. Two certificates may be active at once so a rotation can be staged. Remove the retired certificate only after every member has signed in against the new one.\n\nSession length. Default session length is thirty days on trusted devices and twelve hours otherwise. Enterprise workspaces may set session length between one hour and thirty days. Shortening a session length does not revoke sessions already issued. Use Revoke all sessions for that.\n\nAudit. Every sign-in, provisioning event and role change writes an audit record with actor, target, source address and result. Audit records are exportable as CSV or JSON from the Audit panel and are also available through the audit API. Records are retained for the term of the subscription.\n\nKnown limits. Nested groups are flattened. Multi valued department attributes take the first value. A member who belongs to two role granting groups receives the higher role. Just in time provisioning creates members but never deletes them.",
      "excerpt_format": "plain",
      "selected_tokens": 843
    }
  ],
  "tokens_before": 2620,
  "tokens_after": 2620,
  "tokens_saved": 0,
  "records_available": 32,
  "records_selected": 32,
  "fallback_used": true,
  "selection_error": null,
  "reduction_ratio": 0,
  "engine_latency_ms": 6.10054599974319,
  "gate": {
    "engaged": false,
    "reason": "standdown:mandatory_support_not_packed"
  },
  "usage": {
    "outcome": "pass_through",
    "charge_multiplier": "0",
    "currency": "USD"
  }
}
What you just watched

Three properties, visible in the responses above.

SELECTION, NOT REWRITING

Your own words survive

Every excerpt above is built from the record it came from. No second model writes replacement prose, so invoice numbers, tracking codes and policy wording arrive the way you sent them.

THE TASK DECIDES

No stored ranking to go stale

Decisions one and two send the same records and get different packets, because the question changed. Records ride in on the request. Nothing is stored between calls.

IT CAN DECLINE

Standing down is a result

Two of the five decisions come back intact, with a charge multiplier of zero on the call: the pass through and the squeeze. An engine that only ever trims is an engine that trims when it should not.

All responses on this page are unedited output from the live API at operating point np-2026-08-r4. Fields the page does not render were dropped from the stored copies, never changed, and every figure above is read out of those files at build time.

Now do it with your records.

This page replays a ticket we wrote. The interesting version is the one that runs on your traces, where the pile is yours and so is the number at the end.