An insurance claims intake system has two clocks: the policy and event clock, and the search index clock. The operational constraint is that a claim can change while an adjuster is reading it. My choice is to make freshness an explicit retrieval policy, measured per source and enforced before reranking, instead of pretending one global SLA fits every document.
Short answer: use a freshness window that matches the business risk of each claim field, retrieve only documents whose indexed version is inside that window, and fall back to a slower authoritative read when the window is missed.
I've been paged for missed jobs and duplicate deliveries in production. The same failure pattern appears in claims search: a queue retry can leave a new medical bill or coverage endorsement absent from the candidate set, while a duplicate event can make the newest version look older. The fix is procedural. Every event carries a stable claim ID, source version, and event time; the index stores those values; and the query path records which version it actually used.
Why freshness windows change the retrieval design
Claims intake is not one corpus. A policy endorsement may be authoritative for months, a first notice of loss may change several times in an hour, and a provider attachment can arrive after the initial claim packet. Treating all three as “recent” or “stale” loses useful signal. Define a window as a maximum acceptable age between the source version's event time and its indexed time. For example, a 15-minute window for newly submitted loss details is a policy decision, not a promise that every write is searchable in exactly 15 minutes. A stricter window increases read load and queue pressure; a wider one lowers latency but raises the chance that a reranker sees obsolete facts. The retrieval record should expose this trade-off instead of hiding it in a vector database setting. Store source_version, event_time, indexed_at, and authority beside the text and embedding. At query time, filter or annotate candidates by age before semantic scoring. A high similarity score cannot rescue a document that is outside the allowed window. In one postmortem-style replay, an endorsement event arrived after a claim narrative had already been embedded; the narrative ranked first because its wording matched the adjuster's question, while the newer endorsement sat outside the candidate set. The useful diagnostic was not “the model hallucinated.” It was that the freshness decision happened after candidate generation, when it was already too late to recover a missing document. Moving the check ahead of reranking made the behavior inspectable and gave the application a deterministic fallback path.
That ordering matters for RAG. The original retrieval-augmented generation paper describes combining parametric generation with non-parametric memory; in claims intake, the non-parametric memory must also be temporally bounded. Otherwise a fluent answer can cite a superseded deductible with complete confidence.
How should freshness windows shape retrieval for insurance claims intake?
Start with a small policy table owned by the claims domain team. Keep it versioned like code, because changing a window changes user-visible behavior.
| Source class | Example field | Starting window | Authoritative fallback |
|---|---|---|---|
| Loss intake events | date, location, narrative edits | 15 minutes | claims transaction store |
| Coverage documents | endorsement, deductible | 24 hours | policy administration system |
| Attachments | invoice, estimate, medical record | 60 minutes | document service |
| Fraud signals | watchlist or score update | 10 minutes | risk service |
These values are starting points for a design review, not universal benchmarks. Measure the arrival distribution and the cost of a stale answer, then adjust. Your mileage may vary, especially where regulators require a particular record to be current at decision time.
The query service should return freshness metadata with every passage. A reranker can then prefer a slightly less similar passage that is current, while the application can refuse to draft a coverage decision when no candidate meets the window. That refusal is a useful control: it sends the case to an authoritative read or a human queue rather than silently widening the window.
A small, boring ingestion contract prevents big incidents
Queues are where freshness bugs become operational incidents. Make delivery idempotent and make ordering observable. The consumer below rejects an older version, upserts the newer one, and records lag for monitoring. It uses a generic index interface so the same contract works with a self-hosted search service or a managed one.
package freshness
import (
"context"
"fmt"
"time"
)
type Event struct {
ClaimID string
Source string
Version int64
EventTime time.Time
Text string
}
type Index interface {
CurrentVersion(ctx context.Context, claimID, source string) (int64, error)
Upsert(ctx context.Context, e Event) error
}
func Consume(ctx context.Context, idx Index, e Event, now time.Time) error {
current, err := idx.CurrentVersion(ctx, e.ClaimID, e.Source)
if err != nil {
return fmt.Errorf("read current version: %w", err)
}
if e.Version <= current {
return nil // duplicate or late delivery; safe to acknowledge
}
if err := idx.Upsert(ctx, e); err != nil {
return fmt.Errorf("upsert claim %s: %w", e.ClaimID, err)
}
_ = now.Sub(e.EventTime) // export as an ingestion-lag metric in production
return nil
}
The important property is not the language. It is the monotonic version check. A retry of version 7 cannot overwrite version 8, and a dashboard can show when event time to indexed time exceeds the source's window. Alert on that lag and on the percentage of searches forced to authoritative fallback; both are closer to user impact than queue depth alone.
Comparing quality, latency, and operating cost
A dense vector index can improve recall for paraphrased narratives, while lexical search is often faster and easier to audit for policy identifiers, dates, and limits. A hybrid candidate stage followed by a bounded reranker is a practical compromise: use lexical constraints for exact fields, retrieve a small semantic set, then rerank only candidates that pass freshness and access-control filters.
Latency budgets need a hard ceiling. Set separate targets for candidate retrieval, reranking, and fallback. If the fallback consumes the entire request budget, return a clearly marked “freshness unavailable” state and queue the case for review. Do not quietly serve an old passage just to keep a percentile chart green.
The catch is that freshness enforcement can be unsuitable for exploratory analytics, historical litigation review, or training-data preparation, where old versions are the point. Stick with a versioned snapshot or time-travel query for those workloads; do not reuse the intake window policy. Likewise, a strict window is a poor fit when the authoritative system itself updates in daily batches. In that case, document the batch boundary and make the staleness visible to the user.
Test the policy like a runbook, not a demo
Build replay tests from real event shapes with identifiers removed. Include out-of-order delivery, duplicate events, clock skew, a document that misses its window during reranking, and a source outage. Verify that the system chooses the expected path: current index, authoritative fallback, or human review. A passing relevance sample is not enough if the answer used the wrong version.
During deployment, canary the policy by source class. Track recall on labeled claim questions, p50 and p95 latency, fallback rate, and stale-candidate rate. Keep an audit record of query time, source version, freshness decision, and model or reranker revision. When an adjuster disputes an answer, that record should explain the selection without requiring a forensic search through logs.
The durable design is simple to state: freshness is metadata, policy, and an operational signal. It is not a hidden index parameter. Make the window explicit, enforce it before reranking, and preserve a slower authoritative path for decisions that cannot tolerate uncertainty.
Top comments (0)