LLM guardrails with Jev
TypeSafe’s guardrails cookbook: put semantic checks on inputs, outputs, and tool calls at a fraction of the cost of the LLM call you wrap (their cost framing — confirm current list price on the models page). This unofficial page adds a two-layer pack and limits. Not a security product claim. No keys from jev.pro.
Layer A — Noul screen
Jailbreak / injection, PII, harm Score. Details: decision workflow.
Layer B — policy checks
One Noul per written rule; AND in code. Details: policy checks.
Typical questions (you write criteria):
- Noul: jailbreak or prompt-injection?
- Noul: sensitive personal data?
- Score: harm if we comply?
- Choice: allow / review / block — or keep those outcomes in code
You decide thresholds. Log structured results.
The use-case map also lists jailbreak detection, citation errors, tool-call mistakes, and response-quality failures under Universal Verification.
LangChain’s AutoModeMiddleware checks risky tool calls before execution — LangChain harness. Those APIs are LangChain’s.
Worked sketch: calendar create_event tool
A scheduling agent proposes create_event. Layer A screens the user turn and the tool args. Layer B ANDs written calendar policy. Domain is calendar tools, not a ticket queue.
{
"stage": "tool_args",
"user": "Book a 2-hour 'offsite' on Saturday and invite finance@ and the whole company list.",
"args": { "title": "offsite", "attendees": ["finance@", "all@"], "hours": 2 },
"policy": {
"no_all_hands": "Do not invite company-wide lists without an exec sponsor.",
"work_hours": "Weekend holds need a human."
}
}
| Id | Type | Layer |
|---|---|---|
injection |
Noul | A — jailbreak / instruction override in user? |
pii |
Noul | A — unexpected personal data in args? |
harm |
Score | A — harm if we execute (2–4 levels) |
all_hands |
Noul | B — invites a company-wide list vs policy.no_all_hands? |
weekend |
Noul | B — weekend hold vs policy.work_hours? |
if answers["injection"].noul >= T_INJECT:
return "block"
if answers["all_hands"].noul >= T_POL or answers["weekend"].noul >= T_POL:
return "review"
if answers["harm"].score >= 1.5 or answers["harm"].confidence < FLOOR:
return "review"
return "allow"
Hours and attendee counts are extracted in code (jaggedness: no math). Jev does not write the refusal; a template does. Official cookbook: threshold probabilities; you decide pass / review / block / route. Cite Guardrails for LLMs; do not clone their prompt set.
Pin jev-1.13.0. Vendor price $0.042 / M input (claim). POST https://api.typesafe.ai/v1/systemone.
Honest limits
Jev is not a generative safety filter that rewrites the user. It will not sandbox bash. Official jaggedness: adversarial content can steer jev-1.13. If you need a refusal message, another model (or a template) writes it.
This pack is not a security appliance: no WAF, no malware scan, no certified safety filter. Schema-safe block ≠ the payload was malware. Compare content filters when a dedicated filter is the real job.
FAQ
Two layers or one request?
Both layers can share one questions map. Split only if the second layer needs new state (fetched policy, extracted hours).
Is AutoModeMiddleware official TypeSafe? No. LangChain owns that API. Jev is the judge on the tool-call text.
Does a low injection Noul mean the prompt is safe? No. It is a probability on the text you sent. Adversarial content is a documented jagged edge.
Where is the rest of the guardrails pack? Workflow, policy checks, glossary. Hub: Use cases.
Hub: Use cases. Official: docs.typesafe.ai.
Disclaimer
This is an independent unofficial site and is not affiliated with TypeSafe AI; official documentation is available at https://docs.typesafe.ai. Never treat jev.pro as TypeSafe official documentation. We do not sell, issue, or proxy API keys.