Case study

Governed AI Platform (sop-qa)

Sanitized evidence excerpts representing governed RAG flow, deterministic DQ verdict flow, and redacted deployment workflow structure.

Working PoC

Maturity note: Working PoC with internal tooling concept framing. Public evidence shows sanitized architecture and governed workflow behavior; it does not claim production-scale security, compliance, or performance outcomes.

Scope and limitations

This page intentionally presents only sanitized, publication-safe evidence artifacts. It is structured to show architecture and workflow representation without exposing internal controls or client-sensitive implementation detail.

Shown publicly

  • Governed RAG route and control-flow representation.
  • Deterministic DQ parse/decide/verdict flow representation.
  • Redacted deployment workflow stage structure representation.

Private/demo-only

  • Internal sanitisation decisions logs and release-control checklists.
  • Unredacted repository internals, module topology, and operational diagnostics.
  • Environment-specific identity, policy, and deployment configuration details.

Challenge

Show governed AI workflow patterns publicly without disclosing internal topology, environment identifiers, or sensitive control details.

Keep evidence concrete enough to be credible while avoiding claims that require production-scale or assurance-grade proof.

Approach

  • Limit public evidence to three approved sanitized artifacts: RAG flow excerpt, DQ flow excerpt, and deployment workflow snippet.
  • Use explicit claim guardrails so each evidence anchor states what it demonstrates and what it does not prove.
  • Keep maturity and scope language conservative, with a private walkthrough path for deeper review.

Architecture and key components

The published representation shows separation between AI enrichment flow, deterministic control flow, and release workflow structure, with publication-safe redaction applied throughout.

Key components

  • Governed RAG route contract representation with guard checks and refusal-or-answer branching.
  • Deterministic DQ route contract representation with parse, decision, and verdict response shape.
  • Redacted deployment workflow stage skeleton with login, deploy, and health-check blocks.
  • Sanitized evidence packaging for public-safe representation-level review.

Stack

PythonFastAPIGitHub ActionsAzure Container Apps (redacted workflow context)Representation-level architecture and workflow patterns

Governed RAG Response Path

Responses are assembled from retrieved context, validated before and after inference, and gated through a deterministic quality layer.

  1. 01

    Document Ingestion

    Source documents are processed and chunked with metadata preserved for downstream provenance.

  2. 02

    Embedding Pipeline

    Chunks are converted to embeddings and stored with source provenance retained per record.

  3. 03

    Semantic Retrieval

    Query embedding retrieves top context chunks by similarity from the vector store.

  4. 04

    Context Assembly

    Retrieved chunks are assembled into structured prompt context with source references maintained.

  5. 05

    DQ Gate (Pre-Inference)

    Deterministic quality checks validate context completeness, relevance, and fallback routing.

  6. 06

    Governed Inference

    LLM inference is invoked with bounded context and constrained sampling parameters.

  7. 07

    Response Validation

    Post-inference checks validate response format, citation completeness, and confidence thresholds.

  8. 08

    Structured Output

    Validated response is returned with references while low-confidence outcomes are flagged for review.

Representation-level control-flow summary based on approved sanitized evidence.

What this shows: How a RAG system can be structured with deterministic quality controls rather than relying on LLM behavior alone.

Evidence and outcomes framing

3

Public excerpts

3

Public-safe claims

Yes

Private controls retained

Role and delivery boundary

Done directly

  • Architecture and workflow decomposition for governed AI + deterministic control patterns.
  • Public-safe evidence sanitisation approach and excerpt boundary definition.
  • Claim-to-evidence alignment and conservative maturity framing.

Out of scope / not claimed

  • No claim of compliance certification or formal regulatory assurance.
  • No claim of security assurance outcomes from this public evidence set.
  • No claim of production SLA, throughput, or latency validation from this page.
  • No claim that sanitized excerpts represent complete runtime integrations.

Evidence anchors

Approved sanitized artifacts used as representation-level evidence.

RAG route and control-flow excerpt

Artifact: sopqa_rag_public_excerpt_v1.md

Source path: governed-ai-platform/app/routers/rag.py

Excerpt boundary: Route binding + guarded control flow + retrieval/policy/refusal-or-answer branches. Imports and backend topology names are intentionally removed.

@router.post("/rag/query")
def rag_query(req: RagRequest):
    try:
        return run_rag_pipeline(req, bypass_hard_guards=False)
    except Exception as exc:
        raise HTTPException(status_code=500, detail=str(exc)) from exc


def run_rag_pipeline(req: RagRequest, *, bypass_hard_guards: bool = False):
    request_id = "<GENERATED_REQUEST_ID>"

    if not bypass_hard_guards:
        if <PROMPT_INJECTION_CHECK>(req.question):
            refusal_payload = <BUILD_REFUSAL>(
                question=req.question,
                topic="general",
                risk_tier="LOW",
                reason="Out of scope / security: [REDACTED_GUARD_REASON]",
                chunks=[],
            )
            <AUDIT_CALL>(request_id, req.user_id, req.question, req.topk, [], refusal_payload["answer"], "<LATENCY_MS>")
            return {
                "request_id": request_id,
                "answer": refusal_payload["answer"],
                "policy": {"topic": "general", "risk_tier": "LOW", "allow_generation": False, "mode": "refusal"},
                "citations": [],
                "latency_ms": "<LATENCY_MS>",
                "refusal": refusal_payload["refusal"],
            }

        if <SMALLTALK_CHECK>(req.question):
            refusal_payload = <BUILD_REFUSAL>(
                question=req.question,
                topic="general",
                risk_tier="LOW",
                reason="Out of scope: non-SOP query",
                chunks=[],
            )
            return {
                "request_id": request_id,
                "answer": refusal_payload["answer"],
                "policy": {"topic": "general", "risk_tier": "LOW", "allow_generation": False, "mode": "refusal"},
                "citations": [],
                "latency_ms": "<LATENCY_MS>",
                "refusal": refusal_payload["refusal"],
            }

    topic = (req.topic or <TOPIC_INFERENCE>(req.question) or "general").strip() or "general"
    chunks = <RETRIEVAL_CALL>(req.question, req.topk, topic_filter=topic)

    policy_decision = <POLICY_GATE_CALL>(req.question, chunks, topic_override=topic)
    policy = <POLICY_TO_DICT>(policy_decision)

    if (not chunks) or (not policy_decision.allow_generation) or (policy_decision.mode == "advice"):
        refusal_payload = <BUILD_REFUSAL>(
            question=req.question,
            topic=policy_decision.topic or topic,
            risk_tier=(policy_decision.risk_tier or "LOW"),
            reason=(policy_decision.reason or "[REFUSED]"),
            chunks=chunks,
        )
        <AUDIT_CALL>(request_id, req.user_id, req.question, req.topk, chunks, refusal_payload["answer"], "<LATENCY_MS>")
        return {
            "request_id": request_id,
            "answer": refusal_payload["answer"],
            "policy": policy,
            "citations": refusal_payload.get("citations", []),
            "latency_ms": "<LATENCY_MS>",
            "refusal": refusal_payload["refusal"],
        }

    answer = <ANSWER_GENERATION_CALL>(req.question, chunks)
    <AUDIT_CALL>(request_id, req.user_id, req.question, req.topk, chunks, answer, "<LATENCY_MS>")
    return {
        "request_id": request_id,
        "answer": answer,
        "policy": policy,
        "citations": chunks,
        "latency_ms": "<LATENCY_MS>",
    }

What it shows: Governed RAG route/control-flow structure is represented.

What it does not prove: Does not prove production hardening, assurance outcomes, or scale/performance behavior.

Deterministic DQ verdict flow excerpt

Artifact: sopqa_dq_public_excerpt_v1.md

Source path: governed-ai-platform/app/routers/dq.py

Excerpt boundary: Route contract + deterministic parse (dbt/ge) + deterministic decision/verdict response shape. Integration internals are intentionally omitted.

@router.post("/dq/evaluate")
def dq_evaluate(req: DqRequest):
    run_id = "<GENERATED_RUN_ID>"

    dbt_signal = <PARSE_DBT_SIGNAL>(req.dbt_run_results)
    ge_signal = <PARSE_GE_SIGNAL>(req.ge_validation)

    decision = <DETERMINISTIC_DECISION_CALL>([dbt_signal, ge_signal])

    return {
        "run_id": run_id,
        "verdict": decision["verdict"],
        "reasons": decision["reasons"],
        "signals": decision["signals"],
        "latency_ms": "<LATENCY_MS>",
    }

What it shows: Deterministic DQ parse/decide/verdict flow is represented.

What it does not prove: Does not prove full policy enforcement assurance, compliance posture, or production-scale runtime behavior.

Redacted deployment workflow structure snippet

Artifact: sopqa_deploy_workflow_public_snippet_v1.yml

Source path: governed-ai-platform/.github/workflows/deploy-azure-containerapps-runtime.yml

Excerpt boundary: Stage skeleton with redacted login/build/deploy/health-check blocks. Non-executable by design.

# Illustrative redacted workflow structure only - not runtime proof.
# Non-executable by design: placeholders are intentionally unresolved.

name: <REDACTED_WORKFLOW_NAME>

on:
  workflow_dispatch:
    inputs:
      environment:
        type: choice
        required: true
        options: [dev, prod]

permissions:
  id-token: write
  contents: read

jobs:
  deploy:
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Cloud login via OIDC (redacted)
        uses: <REDACTED_LOGIN_ACTION>
        with:
          client-id: <REDACTED_CLIENT_ID_REF>
          tenant-id: <REDACTED_TENANT_ID_REF>
          subscription-id: <REDACTED_SUBSCRIPTION_ID_REF>

      - name: Build and push image (redacted)
        uses: docker/build-push-action@v6
        with:
          context: .
          push: true
          platforms: linux/amd64
          tags: <REDACTED_IMAGE_URI>

      - name: Deploy runtime update (redacted)
        shell: bash
        run: |
          <REDACTED_DEPLOY_COMMAND_BLOCK>

      - name: Health check stage (redacted)
        shell: bash
        run: |
          <REDACTED_HEALTHCHECK_BLOCK>

What it shows: Redacted deployment workflow structure is represented.

What it does not prove: Does not prove runtime success, reliability, or production deployment outcomes.

Private walkthrough

For implementation detail beyond these sanitized excerpts, request a private walkthrough. This public page is intentionally representation-level only.

See other case studies →

Opens your email client. No web form submission is used on this page.