Schrödinger’s AI: Genius Until You Check the Sources
Your research agent returns a polished answer, a bibliography and a high-scoring retrieval result. The integration test passes because the citations are valid URLs. But does any cited passage support the sentence? That
Your research agent returns a polished answer, a bibliography and a high-scoring retrieval result. The integration test passes because the citations are valid URLs.
But does any cited passage support the sentence?
That is the test that matters when your users are writing research proposals, reviewing clinical evidence or preparing investment committee memos. A link checker cannot tell you whether an adult trial supports a pediatric claim.
A financial filing can contain the right number without supporting the agent's explanation for it.
Call this Schrödinger’s AI: genius or confidently wrong until someone opens the evidence. The metaphor describes our uncertainty, not literal quantum behavior. An answer is already right, wrong or mixed. Verification changes what we know about it.
TL;DR
- Treat claim verification as a pipeline stage, not a citation-formatting feature.
- Search finds information and sources. DeepResearch investigates, checks claims against evidence and returns a cited report. Neither makes every conclusion infallible.
- Preserve the exact passage, scope, source version and review reason behind each verdict.
- The two completed examples below use deliberately false synthetic claims, not real chatbot transcripts. Implementation snippets illustrate the recorded HTTP contract; they were not separately executed end to end.
Why citations and RAG relevance are not truth tests
AI hallucinations are generated claims presented as factual that are false, fabricated or unsupported by the evidence the system purports to use. A missing citation alone does not make a statement a hallucination.
Retrieval-augmented generation can supply evidence to an answer, but relevance is not truth. A highly relevant passage might contradict the question's premise. A real paper might study a different population. Several retrieved pages might all repeat one press release rather than independently confirm it.
Source provenance means preserving where evidence originated, which version you inspected and how it entered the answer. Without that trail, a list of links leaves the next researcher to reconstruct the argument.
Confidence is not evidence. Checking original sources reveals whether a claim is supported; unsupported does not necessarily mean false. This is a metaphor for uncertainty, not quantum physics.
Five real citation failures, 2025–2026
These are documented failures involving confirmed or suspected AI use, not five conclusively traced instances of the same model behavior.
Medical publishing. Marie Atallah's From Surgery to Strength: The Case for Mental Health Integration in Ileostomy Care appeared online May 22, 2025. Librarian Jessica Waite found 12 of 14 references nonexistent, according to Retraction Watch. Atallah acknowledged AI-assisted drafting and said the wrong draft was submitted, her account rather than independently established history. The April 2, 2026 retraction notice cites unverifiable references and lost editorial confidence, and records her disagreement. No patient injury or treatment change is established.
Legal research. Sullivan & Cromwell's April 9, 2026 Prince Global Holdings Chapter 15 motion contained inaccurate citations, including AI hallucinations. Boies Schiller Flexner flagged problems; the firm corrected the motion and apologized to Chief Bankruptcy Judge Martin Glenn. Its April 18 letter said AI policies were not followed and attributed some errors wholly or partly to apparent manual error. This was a mixed review failure, not evidence identifying a particular model.
Government policy. South Africa's AI policy draft, published for consultation April 10, 2026, was withdrawn April 26 after inquiries confirmed fictitious references. The official announcement described unverified AI-generated citations as “the most plausible explanation,” not conclusively traced provenance. It was a draft, not enacted law; the announcement promised consequence management rather than reporting completed disciplinary action.
Consulting. Deloitte Australia's 2025 Targeted Compliance Framework review contained incorrect references, nonexistent research and a fabricated judicial quotation. It agreed to repay the final instalment under an approximately A$440,000 contract, AP reported. That was not a whole-contract refund or proof of completed repayment. A revision disclosed Azure OpenAI use, not proof every error was generated. The department said substance and recommendations remained unchanged, according to Guardian reporting.
Media. The Chicago Sun-Times' May 18, 2025 summer supplement attributed books to authors who had not written them. Its official response said the circulation department licensed it from Hearst's King Features without newsroom review. According to King Features, a freelancer used AI without disclosure. The paper removed the e-paper section, said subscribers would not be charged for the premium edition and announced stronger oversight; King Features said it was terminating its freelancer relationship.
The engineering lesson is narrower than “never use generated text.” Do not let generated authority bypass evidence review.
Design the pipeline around claims, not documents
Use an explicit sequence:
claim -> retrieve -> compare passage and scope -> cross-check
-> report citations, verdict and unresolved gaps
First split compound statements. “Operating income increased” and “a price change caused the increase” are different claims. Then locate the evidence and record the passage that supports or contradicts each one.
Four checks belong between retrieval and reporting: source existence, exact support, context match and comparison with relevant competing evidence. Finding a real document clears only the first hurdle.
A real reference can fail the support test. Read the relevant passage, check its scope and caveats, and compare it with other evidence.
Here is a proposed application-owned schema, not a Valyu API response. One record represents one claim-source comparison; a claim can have several records.
type EvidenceRecord = {
claim: string;
sourceUrl: string;
passage: string | null;
sourceVersion: string | null;
asOf: string;
reviewStatus:
| "supported" | "contradicted"
| "partly_supported" | "unresolved";
reason: string;
checkMethod: "human" | "automated" | "hybrid";
};
Do not turn sourceUrl into an implied true flag. An inaccessible passage should leave the relevant check unresolved. Keep automated assessments distinguishable from human review, and preserve disagreement rather than silently overwriting it.
Choose retrieval or investigation deliberately
Valyu Search finds information and sources. DeepResearch investigates the question, cross-checks claims against evidence and returns a report with citations.
Use Search to locate a particular paper or passage. Use DeepResearch when the task is an investigation across sources, not simply finding documents. A cited report remains an inspectable research output, not a guarantee that every claim or citation is correct.
Search finds information and sources. DeepResearch investigates, cross-checks evidence and returns a cited report. Human review provides accountability for how the findings are used.
The following historical 2015 and 2024 sources are test material, not additional recent incidents. The claims are deliberately constructed errors, not customer stories.
Example 1: a real trial, the wrong population
Synthetic claim: “The SPRINT trial proves intensive blood-pressure treatment reduces cardiovascular events in children.”
The actual Search query was:
SPRINT A Randomized Trial of Intensive versus Standard Blood-Pressure Control NEJMoa1511939 eligibility age at least 50 years
The recorded request restricted Search to valyu/valyu-pubmed, enabled abstracts and requested at most three results. It returned two. The first matched A Randomized Trial of Intensive versus Standard Blood-Pressure Control, DOI 10.1056/NEJMoa1511939. The second was later correspondence, not the original trial.
The matching trial abstract's Methods section stated:
We randomly assigned 9361 persons with a systolic blood pressure of 130 mm Hg or higher and an increased cardiovascular risk, but without diabetes, to a systolic blood-pressure target of less than 120 mm Hg (intensive treatment) or a target of less than 140 mm Hg (standard treatment).
That returned passage does not establish age eligibility. Separately reading the original Study Population section established the requirement “an age of at least 50 years”.
Verdict: Search found the paper; checking the original established the population mismatch. The trial does not support the children's claim. This does not establish that treatment is unsafe or ineffective in children.
For a literature-review tool, save the narrower wording: “SPRINT studied participants aged at least 50 years; its findings do not establish a treatment benefit in children.” Do not present the age as a finding from the returned abstract.
Search with the official TypeScript and Python SDKs
These new SDK examples use the historical Search query and documented options. They were not executed end to end and should not be confused with the completed HTTP run above. Install the pinned packages in your own project:
pnpm add [email protected]
python -m pip install 'valyu==2.13.8'
Set VALYU_API_KEY in the server process environment. The TypeScript example assumes Node ESM with top-level await; neither example belongs in a browser bundle. Calls can incur charges, so apply your own authorization and budget checks before invoking them.
TypeScript
import { Valyu } from 'valyu-js';
const apiKey = process.env.VALYU_API_KEY;
if (!apiKey) throw new Error('Missing API configuration');
const valyu = new Valyu(apiKey);
const query = 'SPRINT A Randomized Trial of Intensive versus Standard Blood-Pressure Control NEJMoa1511939 eligibility age at least 50 years';
const searchResult = await valyu.search(query, {
searchType: 'proprietary',
includedSources: ['valyu/valyu-pubmed'],
includeAbstracts: true,
maxNumResults: 3,
responseLength: 'short',
includeImageLinks: false,
});
if (!searchResult.success) throw new Error('Search did not succeed');
const candidates = searchResult.results;
Python
import os
from valyu import Valyu
valyu = Valyu(api_key=os.environ['VALYU_API_KEY'])
query = 'SPRINT A Randomized Trial of Intensive versus Standard Blood-Pressure Control NEJMoa1511939 eligibility age at least 50 years'
search_result = valyu.search(
query,
search_type='proprietary',
included_sources=['valyu/valyu-pubmed'],
include_abstracts=True,
max_num_results=3,
response_length='short',
include_image_links=False,
)
if not search_result.success:
raise RuntimeError('Search did not succeed')
candidates = search_result.results
The result limit is a maximum, not a promise of three matches. Use results as candidate evidence and preserve identifiers, URL and passage; do not equate relevance_score with verification. The TypeScript Search documentation and Python Search documentation describe the language-specific interfaces.
For scientific and clinical users, your next comparison should cover study design, participants, comparator and outcome or endpoint. Distinguish primary studies from review interpretations and record preprint or peer-review status without treating either as a complete quality score. Check corrections, retractions and conflicting findings. Those are proposed workflow checks, not all observed results of this run or automated systematic-review compliance.
Example 2: a correct figure, an unsupported earnings story
Synthetic claim: “Costco fiscal 2024 operating income rose solely because of membership fee increases.”
This is an exact excerpt from the actual DeepResearch request:
Check this synthetic claim, not a real chatbot transcript: Costco fiscal 2024 operating income rose solely because of membership fee increases. Verify against Costco fiscal 2024 Form 10-K, September 26 2024 earnings release, and original 2024 membership fee announcement.
One fast-mode task completed. Independent checks retrieved the earnings release and original fee announcement.
- FY2024 ended September 1, 2024. The U.S. and Canada membership fee price increase took effect on that same final day.
- Operating income was $9,285 million versus $8,114 million in FY2023.
- Membership fee revenue was $4,828 million versus $4,580 million.
- FY2024 had 52 weeks; FY2023 had 53.
The full operating-income bridge, in millions, is 11,915 + 248 - 9,772 - 1,220 = 1,171: increased net sales, plus increased membership fees, minus increased merchandise costs and selling, general and administrative costs. This is an accounting reconciliation, not a causal decomposition. Fee revenue growth is not the same as a fee price increase.
Original SEC retrieval failed and two fallback Searches returned HTTP 400. A subsequent fact-check opened the 2024 Form 10-K, confirming deferred, ratable recognition over a year. Management attributed fee revenue growth to new member sign-ups and Executive upgrades, partly offset by one fewer week of fee income.
Verdict: The verified timing and statements do not support the sole-price-increase explanation. They do not quantify the exact contribution of the price change. Do not turn the accounting bridge into causal percentages.
Investigate with DeepResearch
Each example below reuses its language's initialized valyu client from the Search section. The shortened synthetic query illustrates the SDK contract; it is not the full historical request or a new completed run. These samples omit tool configuration and do not reproduce every setting of the original task.
TypeScript
const task = await valyu.deepresearch.create({
query: 'Check this synthetic claim: Costco fiscal 2024 operating income rose solely because of membership fee increases. Verify against primary filings and announcements.',
mode: 'fast',
outputFormats: ['markdown'],
search: {
searchType: 'web',
includedSources: ['investor.costco.com', 'sec.gov'],
},
});
if (!task.success || !task.deepresearch_id) {
throw new Error('Task creation was not confirmed');
}
const taskId = task.deepresearch_id;
// Persist taskId in your service before additional work.
const status = await valyu.deepresearch.status(taskId);
if (!status.success) throw new Error('Status check did not succeed');
if (status.status === 'completed') {
const report = { output: status.output, sources: status.sources };
// Store report with the claim-level evidence records for review.
}
Python
task = valyu.deepresearch.create(
query='Check this synthetic claim: Costco fiscal 2024 operating income rose solely because of membership fee increases. Verify against primary filings and announcements.',
mode='fast',
output_formats=['markdown'],
search={
'search_type': 'web',
'included_sources': ['investor.costco.com', 'sec.gov'],
},
)
if not task.success or not task.deepresearch_id:
raise RuntimeError('Task creation was not confirmed')
task_id = task.deepresearch_id
# Persist task_id in your service before additional work.
status = valyu.deepresearch.status(task_id)
if not status.success:
raise RuntimeError('Status check did not succeed')
if status.status == 'completed':
report = {'output': status.output, 'sources': status.sources}
# Store report with the claim-level evidence records for review.
The actual creation response exposed deepresearch_id and an initial queued status; the saved completed response exposed status: completed. Completion is a task state, not a claim-level accuracy verdict. Preserve the report and its citations alongside the reviewed evidence records.
These snippets perform one status check, not a full polling loop, and do not implement persistence or exactly-once creation. A new task may still be queued or running when checked. Persist its ID before additional work and check that same task later; calling create on every poll or rerunning the creation sample can start another paid task. A local timeout does not cancel the remote job. The SDKs have retry behavior, including default retries for 429 responses, so review their settings rather than assuming one method invocation means one HTTP attempt.
For investment research, separate management-reported facts, analyst inference and open diligence questions. Record fiscal period, currency, units, reported versus adjusted metrics, as-of date and filing amendments. The goal is a reviewable investment memo, not an investment recommendation or a promise of improved returns.
Failure handling and the trust boundary
Keep the API key server-side in VALYU_API_KEY, never in browser bundles or logs. Check SDK success flags and handle exceptions at your service boundary; return sanitized application errors rather than upstream details that may expose request context.
- 401: stop and check authentication configuration; do not retry the same bad credentials indefinitely.
- 402: stop paid work and resolve billing or access before resubmitting.
- 429: reduce concurrency and honor retry guidance when supplied. Separate retry policy for reads from potentially paid creation requests.
- 5xx or network timeout: use bounded backoff where safe, but do not blindly recreate an ambiguously accepted task. Record the uncertainty and reconcile it.
Those are integration recommendations, not error paths exercised by these snippets. The original fallback 400 responses returned no evidence; they were not successful verification attempts.
Retrieved text is untrusted data. Do not execute instructions inside a paper, webpage or filing, or let that text override tool permissions and system policy. Limit tool authority, validate destinations before any additional fetching and preserve evidence separately from executable instructions. This reduces exposure; it is not a complete prompt-injection defense.
Minimize logging and unnecessary transmission of clinical, patient or confidential investment information. Establish privacy and retention rules before sending sensitive material to any external service. Keep an access-controlled audit trail of claims, source versions, check methods and reviewer decisions, not an indiscriminate dump of private documents.
Finally, do not auto-submit a generated research conclusion because its JSON validates. Clinical summaries still require critical appraisal and clinical judgment; investment conclusions require responsible diligence. Neither the snippets nor the evidence schema solves those obligations.
Ship a verdict someone can inspect
The useful output is not “five links found.” It is: this source supports this part of the claim, contradicts that part, and leaves this question open.
Try the DeepResearch workflow on one consequential claim, then make the cited passage and review reason first-class fields in your application. Test whether a second researcher can reconstruct the decision without trusting the generated prose.
The cat can keep its nine lives. Your pipeline needs an evidence trail.
Frequently asked questions
Can RAG eliminate hallucinations?
Retrieval can supply evidence, but an answer can still misinterpret a passage or apply it outside its scope. Build claim-level comparisons into the pipeline and retain unresolved findings rather than treating retrieved documents as automatic confirmation.
Is relevance_score a truth score?
No. It indicates a result's match to a request. A highly relevant source may contradict the premise, which makes it useful evidence without making the original claim correct.
What should a research agent store beyond a URL?
Preserve the supporting passage, source version or date, claim-level verdict and reason, and whether checking was human or automated. The EvidenceRecord shown here is a proposed application-owned schema, not a Valyu API response.
How does DeepResearch differ from Search?
Search finds information and sources. DeepResearch investigates the question, cross-checks claims against evidence and returns a cited report. Choose according to whether the application needs focused retrieval or an investigation across sources.
Does a completed task mean its claims are verified?
Completion is a task state, not an accuracy verdict for every claim. Review the report's cited support and preserve gaps or disagreements in the evidence records. The tutorial's status check also does not establish exactly-once creation or implement a complete polling loop.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.

