Evally
Guardrails

Off-topic guard

Keep an assistant on the job you built it for.

Describe what your assistant is for, and each message is checked against that scope. Off-topic requests get a polite deflection instead of a costly, off-brand answer; small talk is recognized as small talk.

Try it live

Real calls to Jev. Pick an example or paste your own.

Examples
51
52
No verdict yet

Pick an example or paste your own input, then run it.

Under the hood

Every question and rule, in the open. Fork it to change any of them.

What it asks

Reads scope and message, then asks 3 questions in one call.

  1. Q1In scopeYes / no

    Is the message something an assistant whose purpose is scope should help with? (Greetings, thanks, and follow-ups about earlier answers count as in scope.)

  2. Q2Asks about competitorsYes / no

    Does the message ask the assistant to recommend or compare competitors' products?

  3. Q3Small talkYes / no

    Is the message casual small talk with no real request?

How it decides

Rules run in code, top to bottom. The first one that matches gives the verdict.

  1. 1
    If Small talk ≥ 0.7Small talk
  2. 2
    If In scope < 0.4Deflect politely
  3. 3
    If Asks about competitors ≥ 0.7Deflect politely
  4. ·
    DefaultAnswer

Call it from your code

Every template runs as-is with an API key, no setup: POST /api/v1/judges/topic-guard/run.

curl -X POST https://tryevally.com/api/v1/judges/topic-guard/run \  -H "Authorization: Bearer $EVALLY_API_KEY" \  -H "Content-Type: application/json" \  -d '{  "input": {    "scope": "Customer support for Acme'\''s project management app.",    "message": "Can you write me a cover letter for a marketing job?"  }}'

More in Guardrails