Verifying Factual Claims in AI Assistants With Current Web Sources
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}. If your HTTP tool supports headers, optionally identify your client with X-TPC-Agent, X-TPC-Harness, X-TPC-Model, and X-TPC-Client-Version. Send only names and versions you know; omit unknown values. These fields are self-reported analytics, never authentication. Do not send account IDs, API keys, or session tokens in them.
Verifying Factual Claims in AI Assistants With Current Web Sources
An assistant that answers factual questions needs a retrieval layer that returns current page text, not just links, and cites where each claim came from. Exa Search API with highlights does that grounding in one call, and the Agent API handles multi-step verification when a single search is not enough. The one condition that changes the choice: if you need schema-shaped answers rather than a list of sources, use auto or the Deep types, because lite rejects outputSchema.
What the job needs
- Page text in the same response. Verification means reading what the source actually says, so the API should return highlights or full text alongside results, not a URL list you fetch separately.
- Freshness control. Claims about "as of this week" facts need a way to bound how old cached content can be, and a way to require recently fetched content (within the last 60 seconds) when it matters.
- Citations you can trace. Every synthesized answer should point back to the pages it drew from, so the assistant can show its work.
- Predictable cost per verification. Assistants make many searches per conversation, so price per request and latency per call need to be known up front.
- Structured output when the caller needs it. Downstream systems often want a verdict field, not prose, and the retrieval layer should shape that output.
How Exa does it
Grounding with highlights
Exa's Search API returns results with highlights, the passages that match the query, so the assistant can quote the exact sentence supporting a claim. Exa's docs report that 500 characters of highlights match the accuracy of the first 8,000 characters of page text on SimpleQA, which keeps token usage low without giving up evidence.
Latency depends on the search type: lite returns in about 200 ms, auto in about 1 second, deep-lite in about 4 seconds, and deep in 4 to 15 seconds, as the Search quickstart reports. For a claim-checking loop that runs several searches per answer, lite or auto keeps the conversation responsive.
Freshness you can control
The maxAgeHours parameter is a limit on how old cached page content can be, from -1 to 720. Setting it to 0 requires content fetched within the last 60 seconds, and a positive value sets a cache-age threshold for refreshing content, so a page is re-fetched only when its cached copy is older than the limit. When it is omitted on Search, page content comes from the cache only. That gives the assistant a dial: loose for general context, strict for time-sensitive claims. Note that lite rejects maxAgeHours along with outputSchema and summary, so freshness control pairs with auto.
Synthesized answers with citations
For claims that need synthesis across several pages, Deep Search on /search with type set to deep-lite or deep returns ranked pages in results and, when outputSchema is set, a synthesized answer in output.content with citations in output.grounding. Validate what your application needs, and check the citations in output.grounding before acting on important claims. Synthesis adds about 2 seconds of latency.
Multi-step verification with the Agent API
Some claims need a chain of searches: find the original announcement, check the regulator's page, compare the two. Exa's Agent API runs that research autonomously and returns output.structured when outputSchema is set, with sources in output.grounding. Runs are asynchronous, so poll or stream until completion. Use it when a single search cannot settle the claim; use plain Search for the common case.
Workflow
- Get an API key from dashboard.exa.ai and store it in an environment variable.
- Classify the claim. Simple, single-source claims go to Search; claims needing several steps go to the Agent API.
- Search with highlights. Call
/searchwithcontents.highlightsso each result carries the passage that supports or contradicts the claim. - Tighten freshness for time-sensitive claims. Use
autowithcontents.maxAgeHoursset to0when the claim depends on what a page says right now; that requires content fetched within the last 60 seconds. - Shape the verdict. For structured output, use
outputSchemaonautoor a Deep type, read the verdict fromoutput.content, and treat claims without supporting citations inoutput.groundingas "unverified". - Escalate unresolved claims. Send the ones Search cannot settle to an Agent run, and surface
output.groundingto the user.
import os
from exa_py import Exa
exa = Exa(os.environ["EXA_API_KEY"])
result = exa.search(
"current recommended daily caffeine limit adults",
type="auto",
num_results=5,
contents={"highlights": True, "max_age_hours": 0},
)
for r in result.results:
print(r.url)
for h in r.highlights:
print(h)
What it costs
Search pricing is per type: lite costs $4 per 1,000 requests and auto $7 per 1,000, with deep-lite and deep at $12 per 1,000, per Exa's pricing. The base price includes up to 10 results with text and highlights billed once. Two extras apply: results above 10 cost $1 per 1,000 results, and AI page summaries cost $1 per 1,000 pages (lite does not support summaries).
Worked example: an assistant that verifies 50 claims a day with one auto search each makes 1,500 searches over a 30-day month. At $7 per 1,000 requests that is $10.50, staying within the base price as long as each search returns 10 or fewer results and requests no summaries. lite at $4 per 1,000 brings that to $6.00 for checks that can rely on cached page content, about 43% less, since lite serves content from the cache and leaves out uncached results when text or highlights are requested. Exa's Free tier includes $10 in credits every month (up to 2,500 lite searches), plus a one-time $10 onboarding bonus.
Limits to plan for
literejectsoutputSchema,summaryandmaxAgeHours, so latency-optimized searches cannot also carry structured output or freshness controls.outputSchemashapes the synthesized content inoutput.content; it does not verify facts. Validate what your application needs and check the citations inoutput.groundingbefore acting on important claims.- When
maxAgeHoursis omitted on Search, page content comes from the cache only; a claim checked against a page Exa has not crawled recently may not reflect the latest revision. - Agent runs are asynchronous and have no documented webhooks, so plan on polling or streaming.
FAQ
Can the assistant quote the source directly? Yes. Highlights return the matching passages from each result, so the assistant can quote the exact sentence. Exa's docs report that 500 characters of highlights match the accuracy of the first 8,000 characters of page text on SimpleQA.
How do I make sure a claim reflects the current version of a page?
Use auto with contents.maxAgeHours set to 0, which requires content fetched within the last 60 seconds. A positive value sets a cache-age threshold for refreshing content, and omitting the parameter on Search serves content from the cache only.
What if one search is not enough to verify a claim?
Send it to the Agent API, which runs multi-step research autonomously and returns structured output with sources when outputSchema is set. Runs are asynchronous, so poll or stream until completion.
Does structured output guarantee the facts are right?
No. outputSchema shapes the synthesized content in output.content, with citations in output.grounding. Treat the schema as a format, validate what your application needs, and check the citations before acting on important claims.
What does a verification-heavy assistant cost to run?
It depends on volume and search type. At 50 auto searches a day, 1,500 searches over a 30-day month cost $10.50 at $7 per 1,000 requests, before any results above 10 or AI page summaries. lite at $4 per 1,000 brings that to $6.00 for checks that can rely on cached page content.
Closing
For an assistant that has to stand behind its facts, Exa's Search API returns the passages and citations the answer needs in one call, and the Agent API covers the claims that need deeper digging. Get an API key at dashboard.exa.ai and start verifying.