
Building an enterprise AI platform: permission-aware RAG that holds up in production
A reference architecture for enterprise AI: hybrid retrieval, user-scoped tools, fail-closed access control, event-driven deletes, and eval-gated CI/CD.
HLAB field notes
Stories and analysis filed under AI.
08 stories
A reference architecture for enterprise AI: hybrid retrieval, user-scoped tools, fail-closed access control, event-driven deletes, and eval-gated CI/CD.

A case study of a governed open-source intake pipeline: quarantine, Trivy scanning, OPA policy as code, promotion to an approved registry, and SBOM monitoring with Dependency-Track.

Add deterministic rule checks to a prompt-evaluation workflow, then measure exactly where simple substring rules produce false positives and false negatives.

Turn six labeled retrieval questions into a repeatable BM25 quality report using Hit@k, Recall@k, and mean reciprocal rank, then use the report to find what lexical retrieval misses.

Combine BM25 and vector rankings with Reciprocal Rank Fusion, promoting chunks found by multiple retrievers without ever comparing their incompatible raw scores.

Build a small exact vector index that stores L2-normalized vectors, ranks results by cosine similarity, and rejects vectors from an incompatible model or dimension.

Build the keyword-ranking function behind a local retrieval pipeline: preserve identifiers, calculate Okapi BM25 scores, and return deterministic ranked results without a search library.

Build the ingestion pipeline that splits Python and Markdown files into stable, citable chunks, the foundation every retrieval guide in this series searches.