PromptBase
Upgrade
Close icon
General
Home
Marketplace
Create
Hire
Login
Chat
Sell
Explore

Prompt Details

Model
Chat - (gpt-5.6)
Token size
371
Example input
[ENTERPRISE_DOMAIN]: US Healthcare EHR & Clinical Decision Support Systems (HIPAA/HITECH) [TECH_STACK]: Pinecone Enterprise, LlamaIndex & Claude 3.5 Sonnet on AWS [PRIVACY_REQUIREMENTS]: Zero-PHI Exfiltration, Microsoft Presidio Token Masking & k-Anonymity [AUDIT_GOALS]: Cryptographic Lineage Tracing & 100% Audit-Ready Citations
Example output
================================================================================================================ 15-LAYER ENTERPRISE AI RAG COMPLIANCE & GOVERNANCE SYSTEM ARCHITECTURE ================================================================================================================ ORGANIZATION PROFILE -------------------- Domain : US Healthcare EHR + Clinical Decision Support Systems Primary Compliance : HIPAA + HITECH Cloud : AWS LLM : Claude 3.5 Sonnet RAG Framework : LlamaIndex Vector Database : Pinecone Enterprise Privacy Architecture : Microsoft Presidio + Token Masking + k-Anonymity Security Objective : ZERO-PHI EXFILTRATION Audit Objective : 100% Audit-Ready Citations Lineage Objective : Cryptographic End-to-End Provenance Architecture Pattern : Zero-Trust + Privacy-by-Design + Defense-in-Depth Primary RAG Principle : NO TRUSTED DATA PATH WITHOUT POLICY VALIDATION IMPORTANT DESIGN PRINCIPLE --------------------------- The system must never rely on the LLM itself to enforce HIPAA controls. PHI protection, authorization, redaction, tenant isolation, DLP, lineage, citation enforcement, and auditability must be enforced OUTSIDE the model through deterministic security and governance controls. The LLM is an untrusted inference component. ================================================================================================================ TARGET SECURITY & GOVERNANCE OBJECTIVES ================================================================================================================ 1. Zero unauthorized PHI disclosure 2. Zero cross-tenant retrieval 3. Zero uncontrolled external model transmission 4. 100% retrieval authorization checks 5. 100% citation-backed clinical answers 6. Cryptographically verifiable document provenance 7. Immutable audit trails 8. Continuous PHI/DLP inspection 9. Prompt-injection resistance 10. Model-output validation before release 11. Continuous vector-index quality monitoring 12. Automated access revocation 13. HIPAA/HITECH evidence generation 14. Clinical safety escalation for unsupported answers 15. Fail-closed behavior for policy violations ================================================================================================================ REFERENCE ARCHITECTURE ================================================================================================================ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ CLINICAL USER / APPLICATION β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 1 β”‚ β”‚ Edge + Semantic Firewallβ”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 2 β”‚ β”‚ Identity + Authorizationβ”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 3 β”‚ β”‚ PHI Detection/Redaction β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 4 β”‚ β”‚ Chunk/Token/Anonymize β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 5 β”‚ β”‚ Pinecone Isolation β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 6 β”‚ β”‚ Context Guardrails β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 7 β”‚ β”‚ Runtime Isolation β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 8 β”‚ β”‚ Citation Enforcement β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 9 β”‚ β”‚ Cryptographic Lineage β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 10 β”‚ β”‚ Privacy Protection β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 11 β”‚ β”‚ Vector Quality/Drift β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 12 β”‚ β”‚ DLP Output Firewall β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 13 β”‚ β”‚ Compliance Policy Engineβ”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 14 β”‚ β”‚ Autonomous Response β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β–Ό β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Layer 15 β”‚ β”‚ Governance + Forensics β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ================================================================================================================ LAYER 1 β€” EDGE & INGESTION RATE LIMITING WITH SEMANTIC FIREWALL ================================================================================================================ OBJECTIVE --------- Prevent abusive, malicious, automated, or policy-violating requests before they reach the RAG system. TRAFFIC FLOW ------------ Internet / Clinical Application β”‚ β–Ό AWS WAF β”‚ β–Ό AWS Shield β”‚ β–Ό API Gateway / ALB β”‚ β–Ό Semantic Firewall β”‚ β–Ό RAG API CONTROLS -------- β€’ Rate limiting β€’ Bot detection β€’ IP reputation β€’ Device reputation β€’ Request-size limits β€’ Authentication enforcement β€’ API schema validation β€’ Prompt length limits β€’ Query complexity limits β€’ Abuse detection β€’ Semantic anomaly detection β€’ Prompt injection pre-screening SEMANTIC FIREWALL RULES ----------------------- BLOCK if: β€’ Request attempts to retrieve unrestricted patient records β€’ Request asks for system prompts β€’ Request attempts to bypass authorization β€’ Request contains known prompt-injection patterns β€’ Request attempts bulk patient enumeration β€’ Request attempts credential extraction β€’ Request attempts cross-tenant access FAILURE MODE ------------ Fail closed. SECURITY TARGET --------------- 100% unauthenticated requests rejected. ================================================================================================================ LAYER 2 β€” IDENTITY-AWARE ACCESS CONTROL FOR VECTOR INDEXING ================================================================================================================ OBJECTIVE --------- Ensure retrieval permissions are determined by identity and policy BEFORE vector search. IDENTITY SOURCES ---------------- β€’ AWS IAM β€’ Enterprise IdP β€’ SAML/OIDC β€’ MFA β€’ Clinical role directory β€’ Service identities AUTHORIZATION MODEL ------------------- RBAC + ABAC RBAC Examples: Physician Nurse Clinical Researcher Billing Staff Administrator Auditor AI Service ABAC Attributes: β€’ User ID β€’ Role β€’ Department β€’ Facility β€’ Patient relationship β€’ Treatment relationship β€’ Purpose of use β€’ Data classification β€’ Tenant β€’ Region β€’ Time β€’ Device trust POLICY DECISION --------------- User β”‚ β–Ό Identity β”‚ β–Ό Policy Engine β”‚ β”œβ”€β”€ Authorized β”‚ β”‚ β”‚ β–Ό β”‚ Retrieval β”‚ └── Denied β”‚ β–Ό Block IMPORTANT --------- Vector retrieval must never be authorized solely by possession of a Pinecone namespace or API credential. Every retrieval operation must have an authorization decision attached. AUDIT EVENT ----------- user_id role purpose patient_scope requested_dataset policy_version decision timestamp ================================================================================================================ LAYER 3 β€” REAL-TIME DOCUMENT PARSING & PII/PHI REDACTION PIPELINE ================================================================================================================ OBJECTIVE --------- Detect and remove/tokenize PHI before documents enter the vectorization pipeline. INPUTS ------ EHR Clinical Notes PDF DOCX HL7 FHIR CSV JSON Scanned Documents Clinical Reports PIPELINE -------- Document β”‚ β–Ό Malware Scan β”‚ β–Ό Content Extraction β”‚ β–Ό Presidio β”‚ β–Ό PHI Entity Detection β”‚ β–Ό Policy Decision β”‚ β”œβ”€β”€ Safe β”‚ β”œβ”€β”€ Tokenize β”‚ └── Reject PHI CATEGORIES -------------- Names Addresses Dates Phone Numbers Email MRN SSN Insurance IDs Account Numbers Biometric Data Medical Record Identifiers Device Identifiers Clinical Identifiers PRESIDIO ACTIONS ---------------- DIRECT IDENTIFIER ↓ TOKENIZE / MASK HIGH-RISK PHI ↓ REMOVE UNKNOWN SENSITIVE ENTITY ↓ QUARANTINE VALIDATION ---------- Run secondary PHI scanner after transformation. Requirement: PHI detection must operate BEFORE embedding generation. ================================================================================================================ LAYER 4 β€” CHUNKING, TOKENIZATION & HASH-BASED ANONYMIZATION ================================================================================================================ OBJECTIVE --------- Create retrieval-safe chunks while preserving clinical meaning and provenance. CHUNKING STRATEGY ----------------- Document β”‚ β”œβ”€β”€ Clinical Section β”œβ”€β”€ Diagnosis β”œβ”€β”€ Medication β”œβ”€β”€ Laboratory β”œβ”€β”€ Assessment └── Plan Each chunk receives: chunk_id document_id source_hash content_hash classification tenant_id authorization_scope created_at version policy_version ANONYMIZATION ------------- Patient Identifier β”‚ β–Ό Deterministic Token β”‚ β–Ό Encrypted Token Vault Example: "Patient John Smith" becomes: "PATIENT_TOKEN_7F92..." TOKENIZATION REQUIREMENTS ------------------------- β€’ Deterministic where linkage is required β€’ Non-reversible outside controlled token vault β€’ Cryptographically random secrets β€’ Key rotation β€’ Access logging β€’ Separation of duties HASHING ------- SHA-256 or stronger approved cryptographic hashing for integrity fingerprints. Do NOT use a hash as a substitute for encryption when reversibility is required. ================================================================================================================ LAYER 5 β€” VECTOR DATABASE TENANT ISOLATION & NAMESPACE ENCRYPTION ================================================================================================================ OBJECTIVE --------- Prevent cross-tenant, cross-facility, and unauthorized vector retrieval. PINECONE ARCHITECTURE --------------------- Tenant β”‚ β–Ό Authorization Policy β”‚ β–Ό Tenant Namespace β”‚ β–Ό Metadata Filter β”‚ β–Ό Vector Retrieval SECURITY CONTROLS ----------------- β€’ Dedicated namespaces β€’ Tenant metadata filters β€’ Least-privilege API keys β€’ Network restrictions β€’ Encryption at rest β€’ Encryption in transit β€’ Secret rotation β€’ Index access logging β€’ Separate service identities β€’ Query authorization tokens METADATA FILTERS ---------------- tenant_id facility_id department data_classification purpose_of_use retention_class document_version authorization_scope CRITICAL CONTROL ---------------- The application must enforce authorization BEFORE constructing the vector query, and must also apply server-side metadata filtering as defense-in-depth. ================================================================================================================ LAYER 6 β€” SEMANTIC CONTEXT FILTERING & HALLUCINATION PREVENTION GUARDRAILS ================================================================================================================ OBJECTIVE --------- Only allow evidence-backed information into the model context. RETRIEVAL PIPELINE ------------------ User Query β”‚ β–Ό Authorization Filter β”‚ β–Ό Hybrid Retrieval β”‚ β–Ό Metadata Filtering β”‚ β–Ό Relevance Scoring β”‚ β–Ό Evidence Threshold β”‚ β”œβ”€β”€ PASS ──► LLM β”‚ └── FAIL ──► Abstain GUARDRAILS ---------- β€’ Minimum relevance threshold β€’ Maximum context size β€’ Source diversity requirements β€’ Contradiction detection β€’ Clinical evidence ranking β€’ Document freshness validation β€’ Source authority scoring β€’ Retrieval confidence scoring CLINICAL SAFETY RULE -------------------- If evidence is insufficient: DO NOT GUESS. Return: "Insufficient authorized evidence to answer this question." HIGH-RISK CLINICAL QUESTIONS ----------------------------- Diagnosis Medication Dosage Treatment Emergency care Contraindications must use stricter evidence thresholds and may require human review. ================================================================================================================ LAYER 7 β€” MODEL RUNTIME ISOLATION & PROMPT INJECTION DEFENSE ================================================================================================================ OBJECTIVE --------- Treat the LLM as an untrusted execution component. RUNTIME ------- AWS Private Network β”‚ β–Ό Isolated Inference Gateway β”‚ β–Ό Claude API β”‚ β–Ό Output Validator SECURITY BOUNDARIES ------------------- The model must NOT directly access: β€’ EHR databases β€’ Pinecone credentials β€’ AWS IAM β€’ Secrets β€’ Production APIs β€’ Patient identity systems β€’ Token vault β€’ Internal network The model receives only the minimum authorized context. PROMPT INJECTION DEFENSE ------------------------ Detect: β€’ Instruction override attempts β€’ "Ignore previous instructions" β€’ System prompt extraction β€’ Tool manipulation β€’ Data exfiltration instructions β€’ Hidden instructions in documents β€’ Encoded malicious instructions β€’ Indirect prompt injection DOCUMENTS ARE DATA, NOT INSTRUCTIONS. Retrieved documents must be represented as untrusted evidence. TOOL ACCESS ----------- If tools are used: LLM β”‚ β–Ό Tool Gateway β”‚ β–Ό Policy Engine β”‚ β–Ό Tool Execution Never: LLM β†’ Direct Tool ================================================================================================================ LAYER 8 β€” AUDIT-READY RESPONSE GENERATION & CITATION ENFORCEMENT ================================================================================================================ OBJECTIVE --------- Prevent unsupported clinical claims from reaching users. RESPONSE CONTRACT ----------------- Every substantive answer must contain: 1. Answer 2. Evidence 3. Citation IDs 4. Source metadata 5. Retrieval timestamp 6. Confidence / evidence status CITATION PIPELINE ----------------- Retrieved Chunk β”‚ β–Ό Citation ID β”‚ β–Ό Context β”‚ β–Ό LLM Response β”‚ β–Ό Citation Validator β”‚ β”œβ”€β”€ Every Claim Supported β”‚ ↓ β”‚ RELEASE β”‚ └── Unsupported Claim ↓ BLOCK / REGENERATE CITATION METADATA ----------------- citation_id document_id chunk_id source_hash document_version retrieval_timestamp tenant_id policy_version TARGET ------ 100% citation coverage for factual clinical claims. NO CITATION ----------- No release for claims requiring evidence. ================================================================================================================ LAYER 9 β€” REAL-TIME DATA LINEAGE & CRYPTOGRAPHIC ORIGIN TRACKING ================================================================================================================ OBJECTIVE --------- Make every answer traceable to its originating data. LINEAGE CHAIN ------------- Source Document β”‚ β–Ό Document Hash β”‚ β–Ό Transformation Hash β”‚ β–Ό Chunk Hash β”‚ β–Ό Embedding Hash β”‚ β–Ό Vector Record β”‚ β–Ό Retrieval Event β”‚ β–Ό Prompt Context Hash β”‚ β–Ό Model Request Hash β”‚ β–Ό Response Hash β”‚ β–Ό Citation Record CRYPTOGRAPHIC CONTROLS ---------------------- β€’ SHA-256 / SHA-3 fingerprints β€’ Digital signatures β€’ HMAC integrity checks β€’ Key-managed signing β€’ Append-only event logs β€’ Merkle-tree aggregation where appropriate LINEAGE RECORD -------------- document_hash chunk_hash embedding_hash index_version retrieval_id prompt_hash model_identifier model_version response_hash citation_ids timestamp OBJECTIVE --------- A forensic auditor must be able to reconstruct: SOURCE ↓ TRANSFORMATION ↓ RETRIEVAL ↓ CONTEXT ↓ MODEL ↓ RESPONSE ================================================================================================================ LAYER 10 β€” DIFFERENTIAL PRIVACY NOISE INJECTION FOR EMBEDDINGS ================================================================================================================ OBJECTIVE --------- Reduce the privacy risk of sensitive semantic representations. IMPORTANT DESIGN PRINCIPLE --------------------------- Differential privacy is NOT a replacement for PHI removal, access control, encryption, or tenant isolation. Pipeline PHI Detection β”‚ β–Ό Tokenization β”‚ β–Ό Anonymization β”‚ β–Ό Embedding β”‚ β–Ό Privacy Transformation β”‚ β–Ό Vector Store CONTROLS -------- β€’ Differential privacy where justified β€’ Noise calibration β€’ Privacy budget tracking β€’ Utility measurement β€’ Embedding leakage testing β€’ Membership inference testing β€’ Reconstruction testing PRIVACY BUDGET -
πŸ€– GPT

15layer Rag Compliance Architect

Add to Cart
Instant accessInstant access
Usage rightsCommercial use
Money-back guaranteeMoney‑back
By purchasing this prompt, you agree to our terms of service
GPT-5.6
Tested icon
Guide icon
4 examples icon
Free credits icon
Generates a 15-Layer Enterprise AI RAG Compliance & Governance Architecture. Features vector database isolation, lineage tracing, HIPAA/GDPR data loss prevention, semantic access boundaries, and continuous auditability.
...more
Added 1 week ago
Report
Browse Marketplace