PII detection, tokenisation and guardrails for LLM applications
A gateway between your applications and LLM providers that keeps personal data out of prompts and enforces usage policy.
A reference solution describes how we design and deliver this type of system. It is not a specific client case study.
The business problem
Teams want to use LLMs with customer data, but compliance requires control over what leaves the organisation.
Typical starting point
Several internal apps calling LLM APIs directly, no central logging or data controls.
Problems we usually find
- Personal data sent to third-party models
- Prompt-injection and data-exfiltration risk
- No visibility of usage or cost
- Different policies per application
Solution architecture
Applications call a single gateway. It detects personal data, replaces it with reversible tokens held in a vault, checks prompts against policy and injection patterns, and routes to a hosted or private model. Responses are filtered, de-tokenised for authorised callers and logged for audit and cost reporting.
Engineering work
- PII detection with pattern and model-based recognisers
- Token vault with access control
- Policy rules per application
- Prompt-injection and output filtering
- Central logging and cost reporting
Implementation approach
- Inventory LLM use and data flows
- Introduce the gateway for one application
- Tune detection on real samples
- Roll out and retire direct API keys
How results are measured
We agree a baseline before work starts and track:
- PII detection precision and recall on test sets
- Blocked policy violations
- Share of LLM traffic through the gateway
- Cost per application
Technology stack
Related services
Agentic AI & ML
AI audits, agentic workflows, RAG, LLM fine-tuning and ML models, from pilot to production with guardrails.
ExploreVAPT & Application Security
Penetration testing of web apps, APIs and cloud, secure code review, DevSecOps pipelines and PCI DSS 4.0 readiness.
ExploreServer Security & Hardening
CIS-aligned Linux hardening, access control, patching, firewalls, intrusion detection, logging and ongoing security monitoring.
ExploreRelated solutions
RAG-based enterprise knowledge assistant
An assistant that answers from your own documents with citations, respects document permissions, and is evaluated before and after every change.
View solutionAgentic AI assistant for incident investigation
A tool-using AI agent that gathers evidence during incidents, suggests likely causes and drafts remediation, with humans approving every action.
View solutionLinux and LAMP server takeover, documentation and automation
Taking ownership of production servers that nobody fully understands, and leaving them documented, patched and reproducible.
View solutionFacing this challenge?
Tell us about your environment and a senior engineer will suggest a first step.