Production ranking is constrained relevance. Mandatory predicates enforce tenant, authorization, lifecycle, region, and safety. Optional ranking features can prefer freshness, source authority, inventory, or diversity. Keep hard policy separate from soft relevance, type important metadata, make rules observable, and evaluate whether a boost improves user outcomes instead of hiding weak semantic retrieval.
Hard filters are non-negotiable: caller authorization, tenant, published state, deletion, legal region, product availability, or time validity. Apply them in every retrieval branch. Soft signals reorder eligible candidates: freshness, popularity, source tier, or preferred language.
Do not encode a mandatory rule only as text and hope embeddings learn it.
Options include a time predicate, freshness tiers, post-retrieval reranking, or calibrated score blend. Avoid a simple decay that always makes a recent blog outrank an older canonical policy. Model source authority and validity dates separately.
Diversity must not introduce irrelevant or unauthorized content.
Build fixtures where recency conflicts with authority, inventory changes, two documents duplicate each other, and one tenant has sparse data. Evaluate base relevance and business outcomes. Log eligibility reasons and stage scores under a stable explanation schema.
Classify these ranking requirements [paste] into authorization, lifecycle, hard product filters, soft boosts, and diversity. Propose SQL or reranking placement, conflict rules, observable reason codes, fixtures, and evaluation metrics. Identify any rule incorrectly delegated to embeddings.
Verification contract: Every hard rule gets an adversarial denial test; every soft rule gets an outcome experiment and a rollback switch.