BeamSearchOptimizer<T> |
Optimizer that uses beam search to explore multiple promising prompt variations. |
CachingCompressor |
Wrapper compressor that caches compression results for frequently used prompts. |
ChainOfThoughtExample |
Represents an example for few-shot chain-of-thought prompting. |
ChainOfThoughtTemplate |
Template that structures prompts for chain-of-thought reasoning. |
ChatMessage |
Represents a single message in a chat conversation. |
ChatPromptTemplate |
Prompt template for chat-based interactions with role-based messages. |
ClusterBasedExampleSelector<T> |
Selects examples using a clustering approach to ensure broad coverage. |
ComplexityAnalyzer |
Analyzer that focuses on measuring prompt complexity and structure. |
CompositeCompressor |
Compressor that chains multiple compressors together in sequence. |
CompositePromptTemplate |
Template that combines multiple prompt templates in sequence. |
CompressionResult |
Contains the result of a prompt compression operation including metrics. |
ConditionalPromptTemplate |
Template that supports conditional sections based on variable presence or values. |
ContextWindowManager |
Manages context window limits for LLM prompts, providing token estimation and text truncation utilities. |
DiscreteSearchOptimizer<T> |
Optimizer that uses discrete search to find better prompts by testing variations. |
DiversityExampleSelector<T> |
Selects diverse examples to maximize coverage of different patterns. |
EnsembleOptimizer<T> |
Optimizer that combines multiple optimization strategies for better results. |
FewShotPromptTemplate<T> |
Prompt template that includes few-shot examples to guide model behavior. |
FixedExampleSelector<T> |
Selects examples in a fixed, predetermined order. |
GeneticOptimizer<T> |
Optimizer that uses genetic algorithms to evolve better prompts. |
GreedyHillClimbingOptimizer<T> |
Simple greedy optimizer that always moves toward better solutions. |
InstructionFollowingTemplate |
Template optimized for clear, structured instruction-following tasks. |
LLMSummarizationCompressor |
Compressor that uses an LLM to intelligently summarize and compress prompts. |
MMRExampleSelector<T> |
Selects examples using Maximum Marginal Relevance (MMR) to balance relevance and diversity. |
PatternDetectionAnalyzer |
Analyzer that specializes in detecting prompt patterns and categorizing prompts. |
PromptChain |
Composes multiple prompt templates into a single formatted prompt. |
PromptIssue |
Represents an issue or warning detected during prompt validation. |
PromptMetrics |
Contains metrics and analysis results for a prompt. |
PromptValidator |
Specialized prompt validator with comprehensive validation rules. |
RandomExampleSelector<T> |
Selects examples randomly from the available pool. |
RedundancyRemovalCompressor |
Compressor that removes redundant phrases and verbose language from prompts. |
RolePlayingTemplate |
Template that creates persona-based prompts for role-playing scenarios. |
SemanticSimilarityExampleSelector<T> |
Selects examples based on semantic similarity to the query. |
SentenceCompressor |
Compressor that shortens sentences while preserving their core meaning. |
SimplePromptTemplate |
Simple prompt template with basic variable substitution. |
SimulatedAnnealingOptimizer<T> |
Optimizer that uses simulated annealing to escape local optima. |
StopWordRemovalCompressor |
Compressor that removes common stop words to reduce prompt length. |
StructuredOutputTemplate |
Template that guides models to produce structured output in specific formats. |
TokenCountAnalyzer |
Analyzer that provides accurate token counting and cost estimation for prompts. |
ValidationSummary |
Summary of validation results. |