Icon

How to Govern AI End-to-End

<p><strong>How to Govern AI End-to-End</strong></p><p>This workflow shows how to resolve fictitious customer-service cases while keeping personal data, prompts, model access, and outputs under control. This workflow wraps a single LLM call in governance layers, from masking personal data before it reaches the model to storing only human-approved responses. In particular, the workflow shows how to:</p><ol><li><p><strong>Mask PII.</strong> Replace names, IDs, telephone numbers, and email addresses in case text before the AI sees them. The PII Masking component combines Presidio detection with custom masking rules and keeps both mappings for unmasking later.</p></li><li><p><strong>Enforce prompt policies.</strong> Check each masked prompt against company policies for safe, ethical, compliant content free of sensitive data. Only prompts that pass move forward.</p></li><li><p><strong>Use admin-approved models.</strong> Connect to the Knime GenAI Gateway and select from LLMs your Knime admin whitelists and manages centrally.</p></li><li><p><strong>Scan for AI risk.</strong> Scan the used LLM using Giskard framework to evaluate the model's propensity for hallucinations, bias, fairness, security concerns, and other vulnerabilities.</p></li><li><p><strong>Validate outputs.</strong> Apply output guardrails that enforce a consistent response format and flag forbidden words, non-compliant content, time commitments, and automated refunds. Keep only rows with an AI vulnerability score below 80.</p></li><li><p><strong>Review and approve (by human).</strong> Inspect masked responses, approve or reject each row, and export a CSV audit trail that stays masked.</p></li><li><p><strong>Unmask and store.</strong> Restore original PII in approved responses only and write them to Excel.</p></li></ol><p></p><p></p><p>Model used:</p><ul><li><p>OpenAI gpt-5.6-luna</p></li><li><p>OpenAI gpt-5.4-mini</p></li></ul>

PII Masking

Prevent sensitive data (e.g., name, ID, telephone numbers, email addresses, etc.) from being exposed as plain text to AI.

Prompt Governance

Ensure the prompt to AI follows dedicated company policies (e.g., safe, ethical, compliant and free-of-sensitive-data prompts)

Apply and Capture LLM

Apply LLM to governed and masked prompts, and capture the model and its responses for risk evaluation.

LLMs from Knime GenAI Gateway

Access LLMs whitelisted and managed by the Knime admin.

Output Guardrails (Post-LLM Validation)

Ensure AI's output response follows a consistent output format and enforces dedicated company policies (e.g., forbidden words, non-compliant content, time commitments, automated refunds, etc.)

AI Risk and Quality Evaluation

Scan LLM and evaluate the risk of hallucinations, biases, security concerns, fairness, and other vulnerabilities using Giskard framework.

PII Unmasking

Human-approved output response is deanonymized and stored.

Human Review and Audit

Inspect masked output rows; choose Approve/Reject and click Apply. Only approved valid rows pass. Audit remains masked.

How to Govern AI End-to-End


This workflow shows how to resolve fictitious customer-service cases while keeping personal data, prompts, model access, and outputs under control. This workflow wraps a single LLM call in governance layers, from masking personal data before it reaches the model to storing only human-approved responses. In particular, the workflow shows how to:

  1. Mask PII. Replace names, IDs, telephone numbers, and email addresses in case text before the AI sees them. The PII Masking component combines Presidio detection with custom masking rules and keeps both mappings for unmasking later.

  2. Enforce prompt policies. Check each masked prompt against company policies for safe, ethical, compliant content free of sensitive data. Only prompts that pass move forward.

  3. Use admin-approved models. Connect to the Knime GenAI Gateway and select from LLMs your Knime admin whitelists and manages centrally.

  4. Scan for AI risk. Scan the used LLM using Giskard framework to evaluate the model's propensity for hallucinations, bias, fairness, security concerns, and other vulnerabilities.

  5. Validate outputs. Apply output guardrails that enforce a consistent response format and flag forbidden words, non-compliant content, time commitments, and automated refunds. Keep only rows with an AI vulnerability score below 80.

  6. Review and approve (by human). Inspect masked responses, approve or reject each row, and export a CSV audit trail that stays masked.

  7. Unmask and store. Restore original PII in approved responses only and write them to Excel.

Capture masked prompt input
Capture Workflow Start
Generate masked response
LLM Prompter
Capture Workflow End
Customer service casesRequest ID + Text only
Table Creator
Only responses that pass guardrails are output
Output Guardrails
Workflow risk findingsStrict scan; errors block
AI Risk and Quality Report
KNIME Hub Authenticator
KNIME Hub LLM Selector
Strore approvedrows
Excel Writer
Top: Only masked promptsare outputMiddle: Presidio PII mappingBottom: custom PII mapping
PII Masking
Keep only rows with AIvulnerability score below 80
Filtering
Only prompts that passedpolicy are output
Prompt Governance
Approve / Reject + CSV auditOnly approved rows are output
Human Review and Audit
Resolve Presidio andcustom PII masking
PII Unmasking

Nodes

Extensions

Links