Developer maps four AI APIs' incompatible citation formats after weekend of data wrangling
A developer running a monthly study on AI-generated source citations found that OpenAI, Anthropic, Gemini, and Perplexity each return cited URLs in structurally different formats with inconsistent naming conventions. Extracting comparable data required writing a separate adapter for each provider to normalize outputs into a uniform structure. A key pitfall discovered was that Gemini returns Google redirect URLs rather than publisher URLs, making all citations falsely appear to originate from a single domain unless resolved via HTTP HEAD requests. Further normalization is also needed to deduplicate URL variants of the same page that differ by protocol, trailing slash, query parameters, or capitalization. The developer recommends building sanity checks for domain-diversity collapses, which typically signal extraction bugs rather than genuine findings.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in