Skip to main content
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.

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

  1. Function Name Analysis: Checks function names for suspicious patterns
  2. Result Content Analysis: Analyzes function results for malicious content
  3. Pattern Matching: Uses trained models to identify attack patterns
  4. Threshold-Based Decisions:
    • Score < input_safe_threshold (0.1) → PASS
    • Score > input_block_threshold (0.5) → BLOCK
    • Score between thresholds → Continue to Stage 2

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:
Thresholds are configured in the policy’s 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

  1. Enable for Sensitive Functions - Always enable keyword detection for functions that handle sensitive data
  2. Custom Keywords - Add domain-specific keywords relevant to your use case
  3. Combine with Other Analysis - Use keyword detection alongside LLM and quarantine analysis for comprehensive protection
  4. Adjust Thresholds - Fine-tune thresholds based on your false positive/negative rates
  5. 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