- Name the ticket it repeats. The judgment chooses among the open tickets of the queue and names one, or
none_of_the_above, in the shape of a payment matched to its invoice. - Count the queue as a feature. The engine reads only the ticket, while a count of the queue’s recent tickets is a feature that the fit on your outcomes weighs beside the engine’s answer.
Put each ticket in its queue
Write the queue’s name on each ticket as an attribute (such asattributes.queue set to support), so a judgment can read the other open tickets with the same value. Each queue is one block of a candidates relation, with the queue’s name as its key.
The ticket reads the newest other open tickets in support, and never sees a closed ticket or a ticket in another queue such as billing.
Write the queue’s name as a valid document id: up to 128 bytes of letters, digits, ., _, -, : and /. A ticket with no queue, or with a value that is not a valid id, is in no queue, and Brussle judges it with no other tickets shown.
Name the ticket it repeats
This judgment asks, for each open ticket, which other open ticket in its queue reports the same failure:POST /v1/namespaces/acme%2Fhelpdesk/judgments
- Each ticket read is an option.
options.fromnames the relation, each option’svalueis theidof an open ticket, andnone_of_the_abovecomes last. - At most 10 tickets. A choice reads at most 10 documents of its relation, so
last_nis 10 or less. - A ticket alone in its queue gets
none_of_the_above, with no engine call and no bill. - List one problem’s tickets with the query
["answers.repeats.value", "Eq", "t_4410"].
escape_p, dist and a threshold on none_of_the_above. Record it as the outcome when your team ties a ticket to the one it repeats, as in record the match.
Count the queue as a feature
This judgment asks a narrow question about the ticket itself, while a second relation counts the open tickets created in the queue in the 2 hours before its newest ticket:- The engine never reads the count.
"render": falsekeeps it out of the context. The answer still shows it asfeatures.queue_recent.count, and a query or a subscription can filter on it. - The count stops at
last_n. A count of 254 means 254 or more. - A new ticket in the queue costs no engine call. It moves only the count, so Brussle keeps the engine’s answer with the new count and bills nothing. The re-judge still counts toward the rolling limit.
- The fit weighs the count. Post as outcomes whether each ticket turned out to belong to an incident. From 100 outcomes with 20 of each kind, the fit can weigh the count with the engine’s answer, and it is applied only when it beats the engine on your held-out outcomes (see your own numbers as features).
Try the relation with the starter
Thetriage.against_queue starter sets up the queue relation in one request. It asks one yes-or-no question about the ticket and the newest 10 open tickets together and does not name the ticket it repeats. Use it to see the relation work, and prefer one of the two shapes for answers you act on.
POST /v1/namespaces/acme%2Fhelpdesk/judgments
- Only open tickets. It judges the documents whose
kindisticketand whosestatusisopen. A ticket that closes leaves the judgment, so Brussle stops judging it and the other tickets in its queue stop seeing it. - From the ticket, it reads the subject and the first 1,000 characters of the body.
- From the queue, it reads the newest 10 other open tickets created within 14 days before the queue’s newest open ticket: when each was created, its subject, and the first 200 characters of its body. An edit past either cut changes nothing it reads, so Brussle does not judge again (see cut a long field).
- A ticket in no queue repeats nothing, by the starter’s criteria.
- The answer is yes or no. Its evaluation lists each ticket it read in
related_documents, so you can see what the ticket was compared with. - Thresholds.
repeatis 0.8 andreviewis 0.5. Group a ticket aboverepeatwith the problem it repeats, and send the tickets between the two to a person. Both are starting values (see thresholds). - Your own wording. Send
dry_run: trueto get the filled definition, change its question or criteria, and create the judgment from that. - The dashboard. “Add: Queue as context” in the relation editor fills the same relation, and you set the judgment’s Applies to to your open tickets.
attributes.queue, unless the namespace has one. The create response lists it as a reference_index job in job_ids, and the answers are unavailable until the job is done.
A max_tokens of 1,500 keeps each judgment standard in size. Over it, Brussle removes the queue’s oldest tickets before it cuts any text of the ticket itself. The starter reads no images. If you add image paths on an engine that reads them, Brussle leaves out whole images before it cuts any text. The evaluation then records context_truncated: true.
Which tickets the judgment sees
- Only the newest. It shows the newest 10 open tickets created within 14 days before the queue’s newest open ticket. An older open ticket, or one after the newest 10, is never shown, however important. The 14 days count back from the newest ticket rather than from now, so a quiet queue still shows its last tickets. To show more, raise
last_n(up to 254) orwindow. Each ticket shown is in every judgment’s context, so the size class grows with it, and a choice still reads 10 at most. - Newest by creation. Newest means created most recently. An edit, a higher priority or a new assignee does not move a ticket up, so the tickets shown are not the ones your team works on next.
- Only their text. It reads the other tickets’ fields, never their answers to this judgment or any other.
What a busy queue costs
A write to a ticket judges that ticket again, as for any judgment, and Brussle judges a new ticket within seconds against its queue at that time. A judgment with features (such as the count) waits until the ticket has had no write for 10 minutes by default (see debounce). The cost to plan for runs the other way. Every open ticket reads the same newest tickets, so a change to them judges the whole queue again:re-judgments a month = queue changes a month × open tickets per queue inside the re-judge scopeA write to a ticket that is open before or after the write makes every open ticket in its queue
pending. Once the queue settles, Brussle reads it once and compares what it shows with what it showed before (how fan-out works covers the quiet period and its 1-hour ceiling). A burst of tickets costs one read, and Brussle reads a queue that is never quiet for 10 minutes once an hour.
- Nothing shown changed: a new assignee, a tag, an edit past a cut, or a closed ticket that was not among those shown. The open tickets are
freshagain, with no engine call, and nothing counts. - Something shown changed: a new ticket, or a shown ticket that closed or whose subject changed. Brussle judges each open ticket in scope again. Almost every context changes, so almost every one is billed. A ticket whose context did not change keeps its answer unbilled, although it still counts toward the rolling limit.
pending with their last answers for much of the time. answers: "fresh_only" leaves pending answers out, so do not use it to list a busy queue.
Worked numbers
Each starter ticket is about 1,300 tokens of context and question, a standard row, which on Jev counts 2 at $0.125 per 1,000, or $0.25 for each 1,000 re-judgments.- A is well inside the default rolling limit of 300,000 re-judgments in any 30 days.
- B is almost twice the limit, so the first 300,000 run ($75 of judging), and the rest are deferred until the window has room (see the rolling limit).
- C trades freshness for cost. The other open tickets see a new ticket up to 4 hours later and read
pendinguntil then, although Brussle still judges the new ticket itself within seconds. - D judges again only the newest open tickets, and the older ones keep their answers and read
stale.
Set the limits for your queues
Each control is a setting infreshness.fanout that you send at create or change with a PATCH. The controls, in order of effect explains each one. For a queue:
block_cap(1,000 by default) is the most open tickets one queue can hold. Closed tickets do not count, because they are outside Applies to. Brussle refuses a create where a queue already holds more withinvalid_request, naming the queue indetails.key. A queue that grows past it later waits, its open tickets readingstalewithstale_reasonlimit_reached, until tickets close or aPATCHraises the cap.rolling_limitis 300,000 by default. When it runs short, the queues that used the most of it wait first, so one busy queue cannot make every other queue stale.scope.created_withinis 30 days by default. An open ticket created longer before a change keeps its answer and readsstalewithstale_reasonreferenced_changeduntil its own next write. If tickets stay open for weeks and their answers matter, send"scope": {"created_within": null}, since Applies to on open tickets already keeps closed ones out.
Confirm the cost before you create it
Withoutconfirm: true, the create returns its cost estimate and creates nothing:
lower_bound: true). In a queue where most tickets close within days, the real figure can be several times the estimate (see what the replay estimate cannot count).
fanout.cost_usd_at_limit is the most that queue changes can cost in any 30 days. confirm: true agrees to both amounts, and after that no queue change waits for a person.