Trustworthy web search for AI Agents: Sources, Grounding and Confidence
Source control, field-level grounding, and confidence scores the agent acts on while it works.
%20(1).png)
Trustworthy web search for AI Agents: Sources, Grounding and Confidence
Source control, field-level grounding, and confidence scores the agent acts on while it works.
%20(1).png)
AI agents can search the web, synthesize research, and return structured data at scale. The challenge is knowing which parts of that output are reliable enough to use.
A trustworthy result needs more than a source URL. You need to know whether the source actually supports the value, how strong the evidence is, and what the agent should do when that evidence is weak.
TL;DR
- Source control improves the quality of the evidence an agent works with. Prioritizing first-party or authoritative sources reduces the chance that weak sources become the basis for downstream answers.
- Grounding verifies that cited evidence actually supports the output. A valid URL or citation does not guarantee that the value returned by the agent is supported by that source.
- Confidence needs to be granular. Individual fields and claims can have very different levels of support, so one score for an entire response hides useful information.
- Confidence is most useful when the agent can act on it. Weakly supported values should trigger another search, additional corroboration, a revision, or a rejection while the task is still running.

A citation shows provenance. Grounding verifies the claim.
A trustworthy agent output needs three things to line up.
Source control determines which evidence the agent uses.
Grounding checks whether that evidence actually supports a specific claim or field.
Confidence describes how strong that support is.
Consider a company-discovery agent returning structured data like this:
A source URL tells you where the agent looked. Grounding goes one step further by checking whether that source actually supports the value the agent returned.
The funding stage may come from one source, the headquarters from another, and hiring status from a recent careers page or ATS listing. Each field needs to be evaluated against its own evidence.
A citation shows where information came from. Grounding checks whether the evidence actually supports the output.
This matters whenever agent-generated data feeds another workflow, rather than simply being read once by a human.

Choose the right sources for the task
Trust starts with the sources an agent chooses to use, and the right source depends on the claim being researched.
An SEC filing may be authoritative for a financial figure, a company careers page or ATS for active hiring, and a vendor’s own pricing page for current pricing.
Because those standards vary by task, the agent needs explicit guidance on which sources it should use, prioritize, avoid, or exclude. Nimble Web Search Agents let developers define those source rules directly.
For example, this agent is designed to discover AI companies while treating the user's filters as hard constraints and requiring actual evidence before marking a company as hiring:
from nimble_python import Nimble
nimble = Nimble(api_key="YOUR-API-KEY")
agent = nimble.agents.create(
template="company-discovery",
display_name="Discover Companies",
goals=[
"Treat location, vertical, size, and funding filters as hard constraints",
"Return both well-known and under-the-radar companies",
"Set `currently_hiring` to 'Yes' or 'No' based on recent public evidence"
],
output_schema={
"type": "array",
"items": {
"type": "object",
"properties": {
"company": {"type": "string"},
"domain": {"type": "string"},
"stage": {"type": "string"},
"hq_location": {"type": "string"},
"currently_hiring": {
"type": "string",
"enum": ["Yes", "No"]
}
}
}
}
)
run = nimble.agents.runs.create(
agent.id,
input=(
"Discover AI/ML companies in Silicon Valley, 50–500 employees, "
"Series A or later, and note which are actually hiring."
),
sources={
"block": [
{
"title": "Blocked sources",
"domains": ["example-aggregator.com"]
}
],
"prioritize": (
"Official company websites, careers pages, first-party "
"announcements, and current ATS listings."
),
"avoid": (
"SEO listicles, scraped directories, and stale company profiles."
)
},
enable_events=False,
)
print(run)The task instructions and source controls work together: the first defines what the agent needs to find, while the second defines where it should look and which evidence it should prefer.
Here, block creates a hard exclusion, while prioritize and avoid influence which evidence the agent should favor without limiting it to a fixed list of domains.
For workflows that require a strict source boundary, Nimble also supports allow. For example, a research task restricted to approved financial sources could use:
sources={
"allow": [
{
"title": "Approved financial sources",
"domains": [
"sec.gov",
"investor.example.com"
]
}
]
}Trust should be granular
One confidence score for an entire response is rarely enough.
The company-discovery agent can return a row like this:
{
"size": "201-500",
"stage": "Series E",
"domain": "perplexity.ai",
"company": "Perplexity AI",
"vertical": "AI/ML",
"description": "AI-powered answer engine that synthesizes responses with real-time web search and in-line citations.",
"hq_location": "San Francisco, United States",
"currently_hiring": "Yes"
}Those fields do not necessarily have the same evidence behind them.
currently_hiring may be based on recent careers or ATS listings. stage may come from funding announcements. size may rely on a different source again.
An overall confidence score would hide those differences.
Nimble's Trust model keeps trust granular. Structured output stays readable on its own, while a parallel trust object is keyed to the same fields:
{
"output": {
"company": "...",
"domain": "...",
"stage": "...",
"hq_location": "...",
"currently_hiring": "..."
},
"trust": {
"company": {
"citations": [...],
"sources": [...],
"confidence": "...",
"reasoning": "..."
},
"domain": {
"citations": [...],
"sources": [...],
"confidence": "...",
"reasoning": "..."
},
"stage": {
"citations": [...],
"sources": [...],
"confidence": "...",
"reasoning": "..."
},
"hq_location": {
"citations": [...],
"sources": [...],
"confidence": "...",
"reasoning": "..."
},
"currently_hiring": {
"citations": [...],
"sources": [...],
"confidence": "...",
"reasoning": "..."
}
}
}The same principle applies to research reports, where trust is attached at paragraph level instead of treating the entire report as one block.

Grounding works best as a layered process
Not every value needs an expensive model call to verify it. Many can be checked with simpler methods first.
1. Deterministic verification
The first check is straightforward: does the normalized value appear in the cited source?
This works well for numbers, dates, names, and units.
For example:
Source: "$12 million"
Output: 12000000
Normalization can establish that these represent the same value without additional model reasoning.
2. Semantic verification
Exact matching breaks down when the source and output express the same information differently.
A careers page might say:
We're growing our engineering and research teams across San Francisco.
The structured output may simply contain:
currently_hiring: Yes
Semantic verification checks whether the source meaning actually supports that structured value.
3. Model-based verification
Some outputs require interpretation rather than extraction.
A category such as AI/ML, a funding-stage conclusion assembled from several announcements, or another derived field may never appear exactly as returned.
A model-based verifier can evaluate whether the cited evidence supports the output when simpler checks cannot settle the question.
The useful pattern is to escalate only when necessary:
Use the simplest reliable verification method first, then move to more expensive reasoning for unresolved cases.
Confidence should describe the evidence
Grounding asks whether a source supports a value. Confidence describes how strong that support is.
Several signals can affect confidence:
- whether the source is appropriate for the task
- whether independent sources agree
- whether sources contradict one another
- whether the value is directly stated or inferred
- whether the evidence matches the source preferences defined for the task
Nimble expresses confidence as high, medium, or low, with reasoning that explains why the field received that grade.
A hiring status supported by a current company careers page and an active ATS listing may have stronger evidence than an employee-count estimate found on a single secondary site.
Confidence should reflect the strength of the evidence, not how confident the model sounds.
Granular confidence also makes the output easier to use programmatically. A workflow can accept strongly supported fields automatically while treating weaker fields differently.
Trust should influence the agent while it is working
Confidence becomes more useful when it is part of the agent’s workflow rather than a score added after the task has already finished.
Nimble evaluates trust while the agent is producing the output. When the agent writes a value, that value can be validated, grounded against its supporting evidence, and assigned a confidence level before the run is complete.
If grounding fails, the value can be rejected and returned to the agent with the reason. If a value is accepted with medium or low confidence, the agent can use that signal to search for another source, resolve conflicting evidence, or revise the value while it still has time and budget to continue.
The loop looks like this:
Research
↓
Write value
↓
Ground + score
↓
Is the evidence strong enough?
├── Yes → Accept
└── No → Search again → Corroborate or revise → RetryThis also allows partial acceptance on larger structured outputs. If a discovery task returns 100 companies and only three hiring-status fields fail verification, the other 97 rows do not need to be discarded.
97 verified rows → keep
3 weak rows → search again
→ corroborate
→ revise or rejectThe agent spends additional effort where the evidence needs work instead of repeating work that already passed verification.
Trust should not only describe an agent's output. It should help determine what the agent does next.

Example: trusted company discovery with Nimble
The company-discovery agent we configured above combines task-specific instructions, a structured output schema, and source controls in a single workflow.
For a request to discover AI/ML companies in Silicon Valley with 50 to 500 employees and Series A funding or later, the resulting dataset can look like this:
[
{
"size": "201-500",
"stage": "Series E",
"domain": "perplexity.ai",
"company": "Perplexity AI",
"vertical": "AI/ML",
"hq_location": "San Francisco, United States",
"currently_hiring": "Yes"
},
{
"size": "201-500",
"stage": "Series C",
"domain": "together.ai",
"company": "Together AI",
"vertical": "AI/ML",
"hq_location": "San Francisco, United States",
"currently_hiring": "Yes"
},
{
"size": "51-200",
"stage": "Series B",
"domain": "ambient.ai",
"company": "Ambient.ai",
"vertical": "AI/ML",
"hq_location": "San Jose, United States",
"currently_hiring": "No"
}
]The structured result can then be used alongside granular Trust metadata to determine which values are well supported and which need additional research, revision, or rejection.
From web results to evidence you can use
Trustworthy web data doesn’t come from finding one universally reliable source. It comes from making each important claim traceable to evidence, checking that the evidence actually supports it, and exposing confidence at a level where the agent or downstream application can act on it.
Source control improves the evidence going into the research process. Grounding verifies the resulting claims. Granular confidence makes uncertainty visible. Feeding those signals back into the agent gives it a chance to improve weak results before they move downstream.
The same pattern applies well beyond company discovery, including pricing intelligence, due diligence, market research, enrichment, and other workflows built on live web data.
Want to try it yourself? Try this Nimble cookbook to evaluate the confidence of different web-based claims.
FAQ
Answers to frequently asked questions





.avif)
.webp)
.webp)
.webp)