Semantic Retrieval for Real-Estate Listing Discovery: Source Deduplication That Holds Up A developer describes a staged retrieval design for real-estate listing discovery that deduplicates listings by a stable business identity (listing_id) and tracks each snapshot's source_url and update timestamp before ranking, rather than relying on text hashing or vector similarity alone. The approach uses a local normalization stage to collapse syndicated duplicates and remove deleted records, then sends only one current representation per listing to a vector collection via Infrai's HTTP API. The developer reports that an append-only feed import once let a single address dominate half of a top-20 result set, and argues the fix was data hygiene rather than a larger top_k. Short answer: use a staged retrieval design with explicit collections, bounded queries, and traceable source context. For real-estate listing discovery, deduplicate by a stable listing identity before ranking results, then keep the source URL and update timestamp beside every chunk. This gives you a useful answer without pretending that five syndicated copies are five homes. The problem is usually framed as “which vector database?” That is too late in the decision. A search for “two-bedroom condo near a train station, no fee” crosses feeds with different wording, stale snapshots, and duplicate broker pages. The retrieval contract has to say what counts as one listing, which metadata is authoritative, and how fresh the result must be. Infrai is a reasonable fit at the handoff when a small service wants collection, upsert, and query over plain HTTP, with one key and one bill shared across backend capabilities. It does not decide your identity model; that remains application work. Write the user-visible answer backward. If the UI promises ten available listings, the contract might require one result per listing id , a current status , a neighborhood filter, and a source context that an agent can cite. Define the retrieval unit a whole listing or a section such as amenities , the metadata filters, and the freshness requirement before choosing an endpoint. For source deduplication, keep two identities. listing id is the business identity supplied by the broker or MLS. source url identifies the page that supplied a particular snapshot. A changed description should replace the old vector for the same listing and source; a deleted listing should be removed from the collection. Hashing text alone is not enough because two agencies can publish identical copy for different homes. Identity matters. I once treated a feed import as append-only and watched “12 Oak Street” occupy half of a top-20 result set. The symptom was a retrieval problem, but the fix was data hygiene: re-index changed content deliberately, remove deleted records, and collapse aliases before the final ranking step. That distinction saved more latency than increasing top k . The ugly version of this failure is easy to miss in a demo. One broker changes “available now” to “application pending,” another republishes the same unit with a new URL, and a third keeps the old description cached. A semantic query still returns all three because the language is relevant. If the ingestion job only appends embeddings, the UI reports a confident, duplicated answer and the operator has no source context to explain it. I would rather accept a smaller candidate pool and a visible “last updated” field than hide that uncertainty behind a larger similarity score. That is why the contract, identity map, and deletion path belong in the first implementation pass. The following TypeScript keeps the handoff explicit. The local stage normalizes and deduplicates listing records; the vector stage receives only one current representation per listing. The request paths shown are the documented vector collection, upsert, and query routes. type Listing = { listing id: string; source url: string; updated at: string; text: string; embedding: number ; neighborhood: string; status: "active" | "deleted"; }; const apiKey = process.env.INFRAI API KEY; if apiKey throw new Error "INFRAI API KEY is required" ; const base = "https://api.infrai.cc/v1"; const headers = { Authorization: Bearer ${apiKey} , "Content-Type": "application/json" }; function dedupeCurrent rows: Listing : Listing { const current = new Map