PatternDetectionAnalyzer

Models & Types · AiDotNet.PromptEngineering.Analysis

Analyzer that specializes in detecting prompt patterns and categorizing prompts.

Inheritance: PromptAnalyzerBase → PatternDetectionAnalyzer

For Beginners

Figures out what kind of prompt you’re using.

Example:

Common patterns detected:

  • few-shot: Contains examples
  • chain-of-thought: Step-by-step reasoning
  • role-playing: Sets up a persona
  • template: Contains variables
  • question, summarization, translation, etc.

How It Works

This analyzer identifies what type of prompt is being used and what patterns are present. It can detect few-shot prompts, chain-of-thought patterns, system prompts, and various task types.

Constructors

Constructor Summary
PatternDetectionAnalyzer() Initializes a new instance of the PatternDetectionAnalyzer class.