Skip to main content

Search

The Search Analytic Engine performs pattern matching and keyword-based searches to identify specific content patterns and textual elements within Exchanges.

Search Analytic Engine

Detailed Description

The Search Analytic Engine uses pattern matching techniques to identify specific textual elements within Exchanges. This engine excels at detecting known patterns such as keywords, regular expressions, and structured formats, providing fast and reliable identification of items like sensitive information, code snippets, or manipulation attempts.

How It Works

The Search Analytic Engine operates by examining input text for specific configured patterns, keywords, and structures. When an Evaluator using this Engine is initialized, it loads a set of predefined patterns and search terms that correspond to the content it's designed to detect. During analysis, the engine applies these patterns to the input text to identify specific content types. Finally, the Analytic Engine generates structured Findings that include details about which patterns were matched and how many matches were found. This approach makes the Search Analytic Engine particularly effective for detecting structured content like code snippets, SQL statements, file paths, and specific keywords with high precision and minimal processing overhead.

Configuration Options

The Search Analytic Engine supports the following configuration parameters:

ParameterDescriptionDefault
patternsA named list of patterns to search forRequired

Finding Structure

A generic Evaluator based on the Search Analytic Engine returns a Finding with the following structure. The fields under pattern_name are repeated, one for each defined pattern in the Evaluator.

Finding Structure
{
"EvaluatorName-Search": True/False, # Default Finding (duplicate of finding.any)
"EvaluatorName-Search.any": True/False, # Returns True if any pattern_name matches
"EvaluatorName-Search.pattern_name.found": True/False, # Returns True if pattern_name matches
"EvaluatorName-Search.pattern_name.num_matches": [0,1,2,...n], # Returns an integer of the number of matches for pattern_name
}

Available Evaluators

The following table lists common Evaluators that can be created using the Search Analytic Engine:

Evaluator NameDescriptionCommon Use Cases
PromptInjection-SearchDetects attempts to manipulate or hijack the promptSecurity monitoring, content filtering
CodeDetection-SearchDetects code fragments or commands in textSecurity, preventing execution of harmful code
SQLInjection-SearchIdentifies SQL injection attemptsDatabase security, query protection
FilePathDetection-SearchDetects file path traversal attemptsFile system security
JsonDetection-SearchIdentifies JSON structures in textData validation, preventing injection

Dependencies

None - The Search Analytic Engine is a self-contained component with no external dependencies.

Revision History

  • 2025-03-03: Initial documentation creation