Citation and Source Attribution Support Across Search APIs

Recording sources at retrieval, not afterward, makes answers verifiable.

· 8 min read
Cover illustration for “Citation and Source Attribution Support Across Search APIs”
Search API Selection · November 19, 2026 · 8 min read · 1,841 words

Citation support across search APIs depends less on how references look than on when sources enter the system. Recording provenance at retrieval time gives an agent a traceable basis for its answer, while attaching sources afterward may only give it the appearance of grounding. That architectural choice is the foundation of verifiable output, though developers still need to test whether each claim matches its cited evidence.

Why citation quality is an architectural problem, not a formatting problem

A citation can serve two very different purposes. It can identify the evidence that informed an answer, or it can point to material found afterward that seems to support it. Both may look identical on the page. Yet only the first preserves a connection between the generator’s input and its output, making it possible to inspect what the model actually received.

Retrieval-time attribution establishes that connection when content is fetched. The system records the source and passes its text to the generator, so the answer can refer to known evidence. Post-hoc attribution reverses the sequence, generating an answer before seeking supporting sources. A third failure occurs when a model recalls a reference from training data without fetching any specific, current page. These differences begin with a data-layer decision made before the LLM is invoked.

What the research reveals about how often current systems get this wrong

The arXiv study Cited but Not Verified evaluated deep research agents on three separate dimensions. Link Works tests whether a URL opens, Relevant Content tests whether the page is on the right topic, and Fact Check tests whether the facts match the source content. Even the strongest frontier models achieved high link validity and relevance while factual accuracy lagged behind both, and fewer than half of open-source models successfully generated cited reports in a one-shot setting.

The study also found that deeper research could worsen factual synthesis. As the models went from 2 to 150 tool calls, Fact Check accuracy fell by roughly 42% on average across two frontier models. Link Works and Relevant Content remained stable over that increase. The links were not the central problem. Instead, claims diverged from the content of accessible, relevant sources, showing why an agent needs both a traceable evidence path and verification of what it says about that evidence.

Diagram: More Research, Less Accuracy: The Fact-Check Drop. Visualizes: Show how citation quality changes as research depth increases from 2 to 150 tool calls across three dimensions: Link Works, Relevant Content, and Fact Check.

How retrieval-time attribution works at the API layer

OpenAI’s citation formatting guide describes the building blocks of a citable source unit, including a stable Source ID, readable text, and optional metadata such as URLs, timestamps, and titles. These units make provenance part of the retrieval output. An agent first calls a search or content API, then places the returned documents and their identifiers into the LLM’s grounding context. The model generates an answer referencing those identifiers.

A Source ID such as block1 identifies the material the model can cite, while a locator specifies a more precise position when needed. The surrounding system resolves the identifier to a URL or page reference. Keeping these roles separate cuts the formatting errors that occur when the model must track both which source it cites and how to display it. It also gives citation validation a concrete target, namely the set of source units supplied for that query.

The guide’s marker format uses CITATION_START and CITATION_STOP around a citation family, a source ID, and an optional locator. Formats the model knows well lead to fewer citation errors, especially when reasoning effort is low or the task is complex. But the marker alone is not a safeguard. Validation must establish that an emitted identifier maps to retrieved material rather than treating any citation-shaped text as valid. When that material was fetched at query time, the citation also has a clearer temporal basis, limiting the drift between an answer and a changing web page.

Where the RAG faithfulness gap still appears even with live retrieval

A valid source identifier answers one question, which is whether the referenced material was available to the model. It does not answer whether the material supports the claim. A generator can still contradict the retrieved text or extend beyond it, even when every citation points to a real source. Attribution preserves the evidence path, while faithfulness concerns what the model does with the evidence.

For developers, the implication is to evaluate those properties separately. A URL that opens should pass Link Works, but it still needs to pass the separate tests for Relevant Content and Fact Check. The latter requires comparison between the specific claim and the cited content. More retrieval is not a substitute for that comparison. The drop in accuracy as research went deeper shows why developers should check whether synthesis stays accurate as they add tool calls and gather more evidence.

What search API design choices determine citation quality downstream

Source identification is the first API-level constraint on downstream verification. Every result needs a stable, unique identifier that survives the passage from retrieval through generation to citation emission. Without that continuity, even a well-formatted reference may be difficult to connect to the input. Freshness adds another constraint because a cached page may no longer represent the current source. A timestamp can provide context, but it does not turn cached material into a live fetch.

Content extraction determines what evidence the model can read. Clean, parseable text gives the generator a clearer basis for citation than raw HTML, while poor extraction increases the risk of faithfulness failures. Conflicting evidence creates a different challenge. Research-grade APIs can reconcile mismatched figures, fiscal years, or currency bases before returning an answer, with each figure attributed to its primary source. That evidence arbitration is more useful than handing conflicting values to a generator without documenting their differences.

A retrieval bottleneck can force a system to reduce useful evidence gathering to meet its latency budget, even though deeper retrieval itself is no guarantee of accuracy. Public benchmarks such as DeepSearchQA give developers a way to evaluate research quality beyond citation appearance or vendor descriptions, provided rankings are read in their stated context. Developers also need to check what data is kept when sources include proprietary research or customer data. Zero data retention at the infrastructure layer addresses the risk of keeping an extra copy when source material is processed, but other compliance questions about the application remain.

How span-level and block-level citation granularity affects what developers can build

The citable unit determines what a reviewer can inspect. A document-level reference shows which source was used, so it helps with transparency disclosures but is too broad to let a reviewer check a claim directly. A block-level reference narrows the evidence to a passage or retrieved chunk. The guide recommends this as the default because it is usually easier for the model than line-level citation and more useful than document-level citation.

A fact-checking pipeline can retrieve the cited chunk and compare its content with the generated statement, providing a workable unit for the study’s three-dimensional evaluation framework. A whole document makes that comparison less targeted. At the other end of the scale, span-level attribution lets a human reviewer move directly to the supporting sentence. That precision helps when a compliance workflow calls for sign-off on specific claims, though it takes more work to build.

Anthropic’s Citations API illustrates why granularity must be assessed by content type. It returns character-index ranges for plain text documents, page-number ranges for PDFs, and block-index ranges for custom content. These are not interchangeable levels of precision. The developer’s choice should therefore follow the verification workflow and the model’s reliable capabilities. Block-level is the default, span-level is appropriate when auditing requires it, and line-level should be reserved for systems configured to produce it reliably.

How financial and enterprise research APIs extend citation requirements beyond general search

Financial research raises a question that general web attribution may leave unresolved. Which source is authoritative for this particular figure? A web citation can establish that a claim appeared on a page at query time, but a financial citation must trace a figure to a primary source such as a filing, licensed dataset entry, or data provider record. The distinction affects decisions because an unverifiable or misattributed figure can lead to a financial decision failure or a compliance problem.

Two values may refer to different fiscal-year definitions or currency bases, so citing both does not by itself explain which one supports the answer. A research API’s evidence arbitration capability addresses that problem by reconciling the differences and attributing each figure to its primary source. Here, provenance also records why the evidence was chosen.

FinSearchComp is a benchmark for testing how well a system does financial research, but readers need to check what each result covers. A historical lookup sub-task measures a narrower capability than the whole of financial research, and a launch comparison does not establish an enduring lead over subsequent independent runs. Enterprise applications also need rules for what data is kept because the evidence may include proprietary or customer material.

Practical steps for building agents that produce verifiably grounded outputs

Developers should choose the evidence contract before writing generation instructions. Developers should select a search or content API that returns structured, live-fetched content with stable source identifiers, then decide how narrowly that content must be cited. Block-level attribution is the default for general research, while compliance and financial workflows may need block- or span-level precision. Latency needs testing at this stage too. The aim is to avoid an infrastructure choice that forces useful retrieval to be cut merely to keep the application responsive.

During generation, the retrieved text and its identifiers should enter the prompt together. The model should cite that supplied material rather than recall sources from training data, using a marker format close to patterns it can reliably produce. Instructions also need to state when citations are required, how multiple sources should be cited, and what to do when no retrieved source supports a claim. Unsupported claims need an explicit handling rule. Otherwise, a precise citation format leaves an unresolved question about what the model is allowed to assert.

After generation, validation should distinguish accessible links, relevant pages, and supported claims. The pipeline can check facts by automatically comparing claims with cited chunks, so human reviewers can do less of that work. Retrieval depth needs its own test because the study shows that more tool calls can weaken synthesis even when links still work and pages stay relevant. Limits should be based on measured accuracy, with less weight given to intuition. Public benchmark results can help developers choose infrastructure, but internal reviewers and enterprise customers should be able to see which tasks were tested, how the comparison was set up, and when it took place.

The output is auditable only if these stages connect. A reviewer must be able to move from a claim to its cited unit and assess whether that evidence supports the statement. That capability begins with what the search API returns, how it identifies the material, and whether the system preserves those relationships through generation and verification. Trust depends on architectural decisions made long before the user sees the answer.

Sources

  1. Cited but Not Verified: Parsing and Evaluating Source Attribution in LLM Deep Research Agents

More in Search API Selection