---
title: "Comment by Kartik N V J K on \" How to Build a More Responsible Retrieval Layer for AI Agents\" | Hashnode"
description: "Separating retrievedAt from publishedAt is a small schema choice that quietly kills a lot of staleness bugs, so I'm glad you made it explicit. The coalescing po"
url: "https://hashnode.com/posts/how-to-build-a-more-responsible-retrieval-layer-for-ai-agents/6a96458ab8b26beb36d22f76/comment/6a9719693a094433cce38724"
---

[Discussion](https://hashnode.com/posts/how-to-build-a-more-responsible-retrieval-layer-for-ai-agents/6a96458ab8b26beb36d22f76)

Comment [How to Build a More Responsible Retrieval Layer for AI Agents](https://hashnode.com/posts/how-to-build-a-more-responsible-retrieval-layer-for-ai-agents/6a96458ab8b26beb36d22f76)

[Kartik N V J K](https://hashnode.com/@kartik-nvj)

[Sep 1](https://hashnode.com/posts/how-to-build-a-more-responsible-retrieval-layer-for-ai-agents/6a96458ab8b26beb36d22f76/comment/6a9719693a094433cce38724)

Separating retrievedAt from publishedAt is a small schema choice that quietly kills a lot of staleness bugs, so I'm glad you made it explicit. The coalescing point matters more than people think: parallel agents refetching the same doc five times is both a cost and a politeness problem, as that kernel.org core-usage number shows. Do you coalesce on canonical URL or on content hash when one page serves two URLs?

[ma michael](https://hashnode.com/@miachaelma)

[Sep 2](https://hashnode.com/posts/how-to-build-a-more-responsible-retrieval-layer-for-ai-agents/6a96458ab8b26beb36d22f76/comment/6a9719693a094433cce38724#reply-6a977f00e046e2059549a57a)

Great question. I’d use a two-stage approach: canonicalize the URL first—following redirects, removing tracking parameters, and checking `rel="canonical"`—then fall back to a normalized content hash when different URLs still serve the same page.

I’d also keep the original URLs as aliases and preserve `retrievedAt` for each fetch, so deduplication doesn’t remove provenance or freshness information. The canonical URL is the cheaper first check, while the content hash catches mirrors and unreliable canonical tags.
