{
 "schema_version": 1,
 "generated": "2026-10-23",
 "id": "openlayer-ai-jevals--flag-unsupported-agent-claims",
 "repo": "openlayer-ai/jevals",
 "repo_url": "https://github.com/openlayer-ai/jevals",
 "repo_slug": "openlayer-ai-jevals",
 "title": "Flag agent answers that invent facts the tools never returned",
 "page_title": "How to flag agent answers that invent facts the tools never returned with Jevals",
 "summary": "Score each claim in an agent's final answer against its tool results in one request.",
 "who": "A developer whose agent answers questions from search or database tools and sometimes states things the tools did not return.",
 "problem": "Relevance-style metrics can pass an answer that is on-topic but partly invented, so the made-up claim goes unnoticed.",
 "outcome": "A per-claim support score and a list of unsupported claims for each trace, plus a check on whether the answer used the tool output at all.",
 "steps": [
  "`pip install jevals`",
  "`export AI_GATEWAY_API_KEY=...` (TYPESAFE_API_KEY or OPENROUTER_API_KEY also work)",
  "Save a script that calls `evaluate({\"messages\": messages, \"tools\": tools}, [UsedToolResult(), Grounded()])` with `from jevals.agent import UsedToolResult, Grounded` (inferred, check the README)",
  "Run the script on one saved trace and read `r.grounded.score` and `r.grounded.evidence` to see which claims failed"
 ],
 "agent_prompt": "Use the jevals repo to evaluate the agent trace in <trace_file>. Call evaluate() with UsedToolResult() and Grounded() on its messages and tools. Report the grounded score and every claim with a low support probability. Verify the report lists the claims in the order they appear in the final answer.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "The emulated chat LLM backend returns 0.00 or 1.00 instead of calibrated probabilities, so use a decision model backend for real scores.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "Python 3.10 or newer",
  "An API key for one backend: AI_GATEWAY_API_KEY (Jev through Vercel AI Gateway), TYPESAFE_API_KEY, or OPENROUTER_API_KEY",
  "A trace to evaluate: a messages list in the OpenAI chat format plus the tools you gave the model"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/openlayer-ai-jevals/flag-unsupported-agent-claims/",
 "md": "https://dedupedai.com/use-cases/openlayer-ai-jevals/flag-unsupported-agent-claims/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/openlayer-ai-jevals--flag-unsupported-agent-claims.json",
 "api_version": "v1"
}
