HipoCap’s Prompt Guard (Stage 1) uses specialized models to detect suspicious patterns and keywords in function calls and results. This provides fast, low-latency detection before more expensive LLM analysis.Documentation Index
Fetch the complete documentation index at: https://docs.hipocap.com/llms.txt
Use this file to discover all available pages before exploring further.
What is Keyword Detection?
Keyword detection identifies sensitive patterns and keywords in function inputs and outputs. It’s part of Stage 1 (Input Analysis) and provides fast protection against sensitive data exposure. Common keywords detected:- Security keywords (confidential, classified, top secret)
- Business keywords (proprietary, trade secret)
- Action keywords (password reset, account verification)
- Financial keywords (wire transfer, payment required)
- Personal information (SSN, credit card, date of birth)
How It Works
- Function Name Analysis: Checks function names for suspicious patterns
- Result Content Analysis: Analyzes function results for malicious content
- Pattern Matching: Uses trained models to identify attack patterns
- Threshold-Based Decisions:
- Score <
input_safe_threshold(0.1) → PASS - Score >
input_block_threshold(0.5) → BLOCK - Score between thresholds → Continue to Stage 2
- Score <
Enabling Keyword Detection
Basic Setup
Enable keyword detection when analyzing a function:Custom Keywords
Provide your own list of sensitive keywords:Default Keyword Patterns
HipoCap automatically detects common sensitive keyword patterns:- Security Keywords: confidential, classified, top secret, restricted, sensitive
- Business Keywords: proprietary, trade secret, do not share
- Action Keywords: password reset, account verification, urgent action
- Financial Keywords: wire transfer, payment required, refund, account suspended
- Personal Keywords: SSN, social security, credit card, date of birth, mother’s maiden name
Configuring Thresholds
You can adjust detection sensitivity by modifying thresholds in your policy:decision_thresholds:
input_safe_threshold: Score below this passes Stage 1 (default: 0.1)input_block_threshold: Score above this blocks at Stage 1 (default: 0.5)quarantine_safe_threshold: Score below this passes Stage 3 (default: 0.1)quarantine_block_threshold: Score above this blocks at Stage 3 (default: 0.5)
Response Format
When keywords are detected, the analysis response includes:Practical Example: Email Processing
Here’s a complete example showing keyword detection in action:Best Practices
- Enable for Sensitive Functions - Always enable keyword detection for functions that handle sensitive data
- Custom Keywords - Add domain-specific keywords relevant to your use case
- Combine with Other Analysis - Use keyword detection alongside LLM and quarantine analysis for comprehensive protection
- Adjust Thresholds - Fine-tune thresholds based on your false positive/negative rates
- Monitor Results - Regularly review detected keywords to improve your keyword lists
Integration with Policies
Keyword detection can be configured in your governance policies:Next Steps
- Prompt Injection Protection - Learn about multi-stage analysis
- Threat Categories - Complete threat reference
- Setting up the Shield - Configure security analysis
