Guardrails decision workflow
A Jev guardrail workflow screens text (user prompt, model completion, tool-call arguments) with typed questions, then your code allows, reviews, or blocks. Jev is not a WAF, malware scanner, or certified safety filter.
Unofficial pack page. Official cookbook: Guardrails for LLMs. TypeSafe’s own jaggedness note: jev-1.13 does not treat state as hostile by default. That is the honest limit. We do not sell keys.
Noul screen pack (one request)
Put the untrusted string in state (and any policy excerpts you need). Ask atomic questions, for example:
| Id | Type | Question shape |
|---|---|---|
injection |
Noul | Jailbreak or prompt-injection attempt? |
exfil |
Noul | Attempts to exfiltrate secrets / system prompt? |
pii |
Noul | Exposes sensitive personal data? |
harm |
Score | How much harm if the LLM complied? |
disposition |
Choice | allow / review / block — or keep disposition in code |
Official cookbook: threshold the probabilities; you decide pass / review / block / route. Log structured answers so harness failures are traceable.
def gate(ans):
if ans["injection"].noul >= T_INJECT or ans["exfil"].noul >= T_EXFIL:
return "block"
if ans["harm"].score >= 1.5 or ans["harm"].confidence < FLOOR:
return "review"
return "allow"
Thresholds are yours. Pin jev-1.13.0 after you fit them.
Where it sits
user → (optional screen) → LLM / tools → (optional screen) → user
↑ Jev ↑ Jev
LangChain AutoModeMiddleware is one harness-shaped application (their API). Jev is the router/judge, not the actor that runs bash.
Honest limits (not a security claim)
- Not guaranteed injection detection. Adversarial content can move answers.
- Not a substitute for allow-lists, sandboxing, or IAM.
- Schema-safe
block≠ the payload was actually malware. - Jev will not write the refusal message — template or LLM.
Policy-as-criteria (PII classes, brand rules) lives on policy checks.
Hub: Use cases. Sibling: LLM guardrails. Official: docs.typesafe.ai.
Sources
Public TypeSafe or adjacent documentation only. No private claims.