Real-Time Monitoring
Validate production interactions the moment they happen, watch results live, and alert when violation rates climb.
Real-time monitoring is oversight on live traffic. Instead of validating a dataset after the fact, Prisma validates each interaction as it arrives — server-side, at full-population coverage — so a policy breach surfaces in seconds, not at the next review cycle. Projects that ingest live traffic show a Real-time badge in the dashboard (as opposed to Dataset).
This guide covers watching validations as they land, alerting when rates move, and tightening policy without redeploying. Authoring the metrics themselves lives in Policy Metrics; for a full end-to-end build, see the Real-Time Production Evaluation cookbook.
Before you start
- A project with at least one policy metric attached — see Validations.
- Interactions reaching Prisma continuously — traced from a live app or logged from a human workflow. See how interactions reach Prisma.
- A Prisma API key sent as
X-API-Key: pq_prisma_sk_…and your workspace ID for the analytics calls below.
How real-time validation works
You don't poll and you don't run validation in your request path. Once evaluators are attached to a run, every interaction Prisma receives is validated asynchronously, server-side, on arrival — the same engine and the same policy metrics whether the interaction was traced, logged, or batched. A definitive result is recorded; an ambiguous one is routed to human review. Nothing is sampled.
That means "going real-time" is just keeping interactions flowing. A long-running service that traces or logs continuously produces a live stream of validations with no extra monitoring code.
Watch validations live
In the dashboard, the project Overview carries the live counters — TOTAL RUNS, VALIDATIONS ("across N metrics"), and HITL REQUESTS ("awaiting expert review") — and the Validation Runs table shows each run's STATUS, METRICS, VALIDATIONS, and AMBIGUOUS count as it fills.
For your own dashboards, pull the same figures from the analytics API:
import os, httpx
client = httpx.Client(
base_url=os.environ["PALQEE_PRISMA_BASE_URL"],
headers={"X-API-Key": os.environ["PALQEE_PRISMA_API_KEY"]},
)
overview = client.get(
"/api/v1/analytics/overview",
params={
"workspace_id": os.environ["PALQEE_PRISMA_WORKSPACE_ID"],
"project_id": "your-project-id",
"timeRange": "24h",
},
).json()
print(overview["data"])Break results down by outcome with GET /api/v1/analytics/classifications/metrics, or pull cost and latency with /api/v1/analytics/costs/breakdown and /api/v1/analytics/traces/performance. See the API reference for the full analytics surface.
Alert when violation rates climb
Register an organization webhook so Prisma pushes events to your systems (an incident channel, a pager, an internal service) instead of you polling:
ORG_ID = "your-organization-id"
resp = client.post(
f"/api/v1/organizations/{ORG_ID}/webhooks",
json={
"name": "compliance-alerts",
"url": "https://hooks.your-company.com/prisma",
"events": ["..."], # subscribe to the events you care about
"is_active": True,
},
)
hook = resp.json()
# Store hook["generated_secret"] now — it is returned only once.
# Verify it against the signature on every delivery to confirm the call is from Prisma.
print(hook["id"], "secret_last4:", hook["secret_last4"])List the event types you can subscribe to with GET /api/v1/organizations/{ORG_ID}/webhooks/events, send a test delivery with POST /api/v1/organizations/{ORG_ID}/webhooks/{webhook_id}/test, and manage existing hooks via the {webhook_id} routes. In-app alerts also surface in the dashboard notification center.
Alert on the rate, not every event
Webhook every ambiguous case and you'll train your team to ignore the channel. Prefer alerting when a rate crosses a threshold — e.g. the violation rate over the last hour exceeds your baseline — by polling analytics/overview on a schedule and pushing only when it trips.
Tighten policy without redeploying
init() returns a PrismaSession. When you need to adjust the evaluators on a running service — add a metric, swap a rubric — build a new config and apply it; subsequent interactions are validated against the update with no restart:
import palqee_prisma_ai
from palqee_prisma_ai import EvaluationConfig
session = palqee_prisma_ai.init("support-bot", evaluators=["correctness"])
# … later, while the service keeps running …
session.update_evaluation_config(
EvaluationConfig(evaluators=["correctness", "hallucination", billing_policy])
)Route high-risk cases to people
Real-time monitoring isn't only about dashboards — it's about getting the cases that matter in front of a human fast. Every ambiguous result becomes a HITL request the moment it's produced, and each expert decision becomes a control that sharpens future validations automatically. Set that loop up in Human Review.
Troubleshooting
| Symptom | Cause |
|---|---|
| Validations aren't appearing | Interactions aren't arriving — confirm tracing/logging is live (see Instrumentation). |
| Project shows Dataset, not Real-time | It's only seen a batch upload. Real-time appears once it ingests live traces/logs. |
401 / 403 on analytics or webhooks | Missing/invalid X-API-Key, or the key isn't scoped to this workspace/org. |
| Webhook never fires | Confirm it's is_active, the event is in your subscription, and the endpoint is reachable — send a test delivery. |
Next steps
- Real-Time Production Evaluation — the full end-to-end monitoring service
- API Reference — the analytics, webhook, and HITL endpoints in full
- Human Review — route ambiguous cases to experts

