PageSourceSearch

https://vllm-sr.ai/assets/js/0227c9cd.971189b7.js

js vllm-sr.ai collected 2026-10-04 01:32:15 UTC 8,860 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunksemantic_router_docs=self.webpackChunksemantic_router_docs||[]).push([[16861],{2531(e,n,i){i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>d,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"tutorials/signal/heuristic/event","title":"Event Signal","description":"Overview","source":"@site/versioned_docs/version-v0.3/tutorials/signal/heuristic/event.md","sourceDirName":"tutorials/signal/heuristic","slug":"/tutorials/signal/heuristic/event","permalink":"/docs/v0.3/tutorials/signal/heuristic/event","draft":false,"unlisted":false,"editUrl":"https://github.com/vllm-project/semantic-router/edit/main/website/docs/tutorials/signal/heuristic/event.md","tags":[],"version":"v0.3","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"Language Signal","permalink":"/docs/v0.3/tutorials/signal/heuristic/language"},"next":{"title":"Structure Signal","permalink":"/docs/v0.3/tutorials/signal/heuristic/structure"}}');var s=i(74848),r=i(28453);const d={},l="Event Signal",c={},o=[{value:"Overview",id:"overview",level:2},{value:"Key Advantages",id:"key-advantages",level:2},{value:"What Problem Does It Solve?",id:"what-problem-does-it-solve",level:2},{value:"When to Use",id:"when-to-use",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Fields",id:"fields",level:3},{value:"Example Decision",id:"example-decision",level:2}];function a(e){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"event-signal",children:"Event Signal"})}),"\n",(0,s.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"event"})," is a heuristic routing signal family for ",(0,s.jsx)(n.strong,{children:"structured event metadata"})," extracted from request text: event type, severity level, temporal urgency, and domain-specific action codes."]}),"\n",(0,s.jsxs)(n.p,{children:["It maps to ",(0,s.jsx)(n.code,{children:"config/fragments/signal/event/"})," and is declared under ",(0,s.jsx)(n.code,{children:"routing.signals.events"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"key-advantages",children:"Key Advantages"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Zero ML inference \u2014 all matching is regex-based, running in sub-millisecond time."}),"\n",(0,s.jsx)(n.li,{children:"Routes enterprise event-driven payloads (error alerts, audit logs, incident reports) to specialized model pools without requiring a domain classifier."}),"\n",(0,s.jsx)(n.li,{children:"Confidence is proportional to the number of matched criteria, giving the decision engine a graded signal."}),"\n",(0,s.jsxs)(n.li,{children:["Temporal urgency detection (",(0,s.jsx)(n.code,{children:"urgent"}),", ",(0,s.jsx)(n.code,{children:"immediate"}),", ",(0,s.jsx)(n.code,{children:"asap"}),", ",(0,s.jsx)(n.code,{children:"deadline"}),", ",(0,s.jsx)(n.code,{children:"time-sensitive"}),", ",(0,s.jsx)(n.code,{children:"now"}),", ",(0,s.jsx)(n.code,{children:"critical.window"}),") routes time-sensitive events independently of event type."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"what-problem-does-it-solve",children:"What Problem Does It Solve?"}),"\n",(0,s.jsxs)(n.p,{children:["Keyword and embedding signals are tuned for natural-language queries. Structured event payloads \u2014 JSON fragments, alert messages, transaction error codes \u2014 contain well-defined fields that keyword matching cannot model cleanly. ",(0,s.jsx)(n.code,{children:"event"})," provides a named, composable signal for each class of event without forcing operators to write fragile regex keyword rules."]}),"\n",(0,s.jsx)(n.h2,{id:"when-to-use",children:"When to Use"}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.code,{children:"event"})," when:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"requests contain machine-generated event payloads (error alerts, audit logs, transaction failures)"}),"\n",(0,s.jsx)(n.li,{children:"you want to route by severity tier independently of event type"}),"\n",(0,s.jsxs)(n.li,{children:["domain-specific action codes (e.g. ",(0,s.jsx)(n.code,{children:"TXN_DECLINE"}),", ",(0,s.jsx)(n.code,{children:"AUTH_FAIL"}),") should deterministically select a model pool"]}),"\n",(0,s.jsx)(n.li,{children:"time-sensitive events need to bypass standard latency-tolerant queues"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"routing:\n  signals:\n    events:\n      - name: critical_payment_event\n        description: Critical payment or transaction events that need incident-grade routing.\n        event_types:\n          - payment_failed\n          - transaction_declined\n        severities:\n          - critical\n          - high\n        action_codes:\n          - TXN_DECLINE\n        temporal: true\n"})}),"\n",(0,s.jsx)(n.h3,{id:"fields",children:"Fields"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Field"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"name"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsxs)(n.td,{children:["Rule name referenced in ",(0,s.jsx)(n.code,{children:"routing.decisions[].rules"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"description"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"Optional human-readable explanation of when the rule should match"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"event_types"})}),(0,s.jsx)(n.td,{children:"list of strings"}),(0,s.jsx)(n.td,{children:"Event type patterns to match (case-insensitive word boundary)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"severities"})}),(0,s.jsx)(n.td,{children:"list of strings"}),(0,s.jsxs)(n.td,{children:["Severity keywords: ",(0,s.jsx)(n.code,{children:"critical"}),", ",(0,s.jsx)(n.code,{children:"high"}),", ",(0,s.jsx)(n.code,{children:"medium"}),", ",(0,s.jsx)(n.code,{children:"low"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"action_codes"})}),(0,s.jsx)(n.td,{children:"list of strings"}),(0,s.jsx)(n.td,{children:"Domain-specific action codes (case-insensitive word boundary)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"temporal"})}),(0,s.jsx)(n.td,{children:"bool"}),(0,s.jsxs)(n.td,{children:["When ",(0,s.jsx)(n.code,{children:"true"}),", matches urgency markers: ",(0,s.jsx)(n.code,{children:"urgent"}),", ",(0,s.jsx)(n.code,{children:"immediate"}),", ",(0,s.jsx)(n.code,{children:"asap"}),", ",(0,s.jsx)(n.code,{children:"deadline"}),", ",(0,s.jsx)(n.code,{children:"time-sensitive"}),", ",(0,s.jsx)(n.code,{children:"now"}),", ",(0,s.jsx)(n.code,{children:"critical.window"})]})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["A rule matches when at least one configured criterion is satisfied. ",(0,s.jsx)(n.strong,{children:"Confidence"})," is ",(0,s.jsx)(n.code,{children:"0.5 + 0.5 \xd7 (matched_criteria / total_criteria)"}),". With up to four criteria (",(0,s.jsx)(n.code,{children:"event_types"}),", ",(0,s.jsx)(n.code,{children:"severities"}),", ",(0,s.jsx)(n.code,{children:"action_codes"}),", ",(0,s.jsx)(n.code,{children:"temporal"}),"), a single-criterion match on a four-criterion rule yields ",(0,s.jsx)(n.code,{children:"0.625"}),"; a full match always yields ",(0,s.jsx)(n.code,{children:"1.0"}),". A rule with only one configured criterion that matches also yields ",(0,s.jsx)(n.code,{children:"1.0"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"example-decision",children:"Example Decision"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"routing:\n  decisions:\n    - name: route_critical_event\n      rules:\n        type: event\n        name: critical_payment_event\n      modelRefs:\n        - model: fast-response-model\n"})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},28453(e,n,i){i.d(n,{R:()=>d,x:()=>l});var t=i(96540);const s={},r=t.createContext(s);function d(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.