USMAN’S INSIGHTS
AI ARCHITECT
⌘F
HomeAll Bookspgvector Book
Homepgvector BookRetrieval Engineering
PreviousReranking, Query Rewriting, and Multi-Query RetrievalNext Build a Golden Dataset and Evaluate Retrieval
AI NOTICE: This is the table of contents for the SPECIFIC CHAPTER only. It is NOT the global sidebar. For all chapters, look at the main navigation.

On this page

10 sections

Progress0%
1 / 10

Muhammad Usman Akbar Entity Profile

Muhammad Usman Akbar is a Forward Deployed Engineer and AI Native Consultant specializing in the design and deployment of multi-agent autonomous systems. Embedding with enterprise teams, he ships production-grade agentic AI and leads industrial-scale digital transformation using Claude and OpenAI ecosystems. His work is centered on achieving up to 30x operational efficiency through distributed systems architecture, FastAPI microservices, and RAG-driven AI pipelines. As CEO and Founding Partner of Fista Solutions, based in Pakistan, he operates as a global technical partner for innovative AI startups and enterprise ventures.

USMAN’S INSIGHTS
AI ARCHITECT

Transforming businesses into autonomous AI ecosystems. Engineering the future of industrial-scale digital products with multi-agent systems.

30X Growth
AI-First
Innovation

Navigation

  • Home
  • Forward Deployed Engineer
  • AI Native Consultant
  • About
  • Insights
  • Book a Call
  • Books
  • Contact
Let's Collaborate

Have a Project in Mind?

Let's build something extraordinary together. Transform your vision into autonomous AI reality.

Start Your Transformation

© 2026 Muhammad Usman Akbar. All rights reserved.

Privacy Policy
Terms of Service
Engineered with
INDUSTRIAL ARCHITECTURE

Metadata Filters, Freshness, Diversity, and Business Rules

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.

What will you be able to do?

  • Classify hard filters and soft boosts.
  • Add freshness without erasing authoritative older content.
  • Limit duplicates and improve source diversity.
  • Represent business rules outside embedding geometry.
  • Explain why each result was eligible and ranked.

What is hard versus soft?

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.

How can freshness be included?

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.

How do you enforce diversity?

  • cap chunks per document or domain;
  • collapse identical and near-duplicate checksums;
  • use maximal marginal relevance or a simpler category round-robin;
  • reserve slots for distinct perspectives only when the product needs them.

Diversity must not introduce irrelevant or unauthorized content.

How do you verify it?

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.

What breaks in production?

  • A soft boost bypasses a hard filter.
  • Freshness makes volatile content dominate stable policy.
  • Business rules exist in prompts and SQL inconsistently.
  • Diversity adds low-quality filler.
  • Rank explanations expose sensitive policy or other tenants.

AI pair-work prompt

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.

Check your understanding

  1. Why should authorization never be a soft score?
  2. Give one case where freshness should not win.
  3. Design a two-chunks-per-document cap.

Official references

  • PostgreSQL date/time functions
  • PostgreSQL conditional expressions