HGA Prompt Demo
powered by Prompt Security




0 / 0 messages today
🆚 Compare Mode 🛡️ With Prompt Security  vs  ⚡ Raw LLM
🛡️ With Prompt Security
⚡ Without Prompt Security (raw LLM)
📎
Estimated prompt tokens: 0

Demo Scenarios

PS is not configured or disabled. Set up PS to see violations.
Running comparison...
🛡️ With Prompt Security
⚡ Without Prompt Security (raw LLM)

Prompt Security for Homegrown Apps

CUSTOMER INTERNAL LAN CUSTOMER DMZ SAAS INTERNET CUSTOMER INTERNAL LAN CUSTOMER DMZ SAAS INTERNET HTTPS/443 HTTPS/443 HTTPS/443 Chatbot Homegrown GenAI App API Gateway Proxy Mapping Route from: LLM Route to: Prompt Security Org Proxy Internet egress PROTECT · SANITIZE 3rd Party LLMs Public cloud providers OpenAIAWS BedrockAzure OpenAIAnthropicGoogle VertexCohere · Mistral Flow: Chatbot → API GW → Org Proxy → PS (SaaS) → 3rd Party LLMs Operational FIG. 01 — SAAS TOPOLOGY
Chatbot API Gateway Org Proxy Prompt Security (SaaS) 3rd Party LLMs
See Integration Guide →
CUSTOMER INTERNAL LAN CUSTOMER DMZ INTERNET HTTPS/443 HTTPS/443 HTTP HTTP HTTPS/443 HTTPS/443 Private Link Direct Chatbot Homegrown GenAI App Internal ChatBot Employee Assistant 1st Party LLMs Internal / Self-hosted OllamaLocal Models API Gateway Proxy Mapping Route from: LLM Route to: PS Proxy ps-openai-gw Prompt Security proxy Routes via Org Proxy Org Proxy Internet egress · Hub HOSTED · PROTECT · SANITIZE 3rd Party LLMs Public cloud providers OpenAIAWS BedrockAzure OpenAIAnthropicGoogle VertexCohere · Mistral Protection: App → API GW → ps-openai-gw → Org Proxy → PS (hosted) Direct: ps-openai-gw → 1st Party LLMs  |  LLM Call: Org Proxy → 3rd Party LLMs FIG. 02 — HYBRID TOPOLOGY
Chatbot API Gateway ps-openai-gw Org Proxy Prompt Security (Hosted) ps-openai-gw → 1st Party LLMs (direct)  |  Org Proxy → LLMs (call)
See Integration Guide →
CUSTOMER INTERNAL LAN CUSTOMER DMZ INTERNET HTTPS/443 HTTPS/443 HTTPS/443 HTTPS/443 HTTPS/443 HTTPS/443 Chatbot Homegrown GenAI App Internal ChatBot Employee Assistant API Gateway Proxy Mapping Route from: LLM Route to: Prompt Security ON-PREM · PROTECT · SANITIZE Org Proxy Internet egress ps-openai-gw Prompt Security pod Routes 1st-party LLMs 1st Party LLMs Self-hosted · Private HuggingFace Llama 2 Mistral AI 3rd Party LLMs Public cloud providers OpenAI AWS Bedrock Azure OpenAI Anthropic Google Vertex Cohere · Mistral External flow: Chatbot → API GW → PS → Org Proxy → 3rd Party LLMs Internal flow: via ps-openai-gw Operational FIG. 02 — ON-PREM TOPOLOGY
Chatbot API Gateway Prompt Security (DMZ) Org Proxy 3rd Party LLMs + Prompt Security → 1st Party LLMs (scan)
See Integration Guide →

When implementing Prompt Security, choose between two integration approaches based on your team's development resources and security requirements.

API Integration
POST /api/protect
Direct API calls to inspect prompts and responses. Each LLM interaction requires separate calls — one for the prompt, one for the response.
✓ Greater flexibility & control over security
✓ Different code areas can call API differently
✓ Parallel execution in monitor-only mode (zero latency)
✓ Programmatic policy switching per request
✓ Rich metadata: user country, IP, user groups
✗ More development work to implement
✗ Needs integration throughout the codebase
Best for: teams needing granular control and rich analytics
AI Gateway (Reverse Proxy)
base_url swap
Prompt Security acts as man-in-the-middle. Route all traffic through Prompt Security by changing your LLM base URL. All input/output is processed automatically.
✓ Minimal effort — one line of code change
✓ Seamless with existing auth methods
✓ Automatic processing of all input/output
✗ Less granular control, fewer customization options
✗ No programmatic policy switching per connector
✗ No advanced options (e.g. immediate_response)
✗ Limited to supported LLM providers
Best for: fast integration with minimal code changes
AI Gateway Limitations vs API
Programmatic Policy Management — Cannot switch policies per request on the same connector.
Workaround: Create multiple connectors with different policies, switch the app-id per request.
Advanced Configurations — No support for immediate_response or asynchronous inspection.
Analytics Metadata — Cannot include user country, IP address, or user group information.
Full prevention mode: scan the prompt before sending to the LLM, then scan the response after. Supports block, modify (sanitize), and pass actions.
Minimal code change: point the OpenAI SDK at the Prompt Security gateway. Prompt Security scans transparently — just add the ps-app-id header.
Same approach as OpenAI but for Azure-hosted models. Add the forward-domain header to route to your Azure instance through PS.
Protect local/self-hosted LLMs via Ollama. Route through PS gateway with the forward-domain pointing to your Ollama server.
How Prompt Security fits into a Homegrown GenAI Application: the app calls PS before and after the LLM, enabling real-time detection and remediation of PII, injections, and policy violations.
👤
GenAI App User
prompt
response
🖥️
Homegrown GenAI App
Your chatbot / assistant
prompt
response
☁️
LLM Providers
OpenAI · Anthropic
AWS Bedrock · Google
Llama · Mistral
on prompt
on response
Prompt Security Engine
Block Modify Log
See Integration Guide →
Step through the exact code path of a request through this app. See what Python runs at each stage and what Prompt Security does with it.
💻 Code Being Executed
💡 What's Happening