Uses of Class
com.tnsai.prompt.strategy.PromptEnhancer.Builder
Packages that use PromptEnhancer.Builder
Package
Description
Predefined prompting strategies for enhanced LLM response quality.
-
Uses of PromptEnhancer.Builder in com.tnsai.prompt.strategy
Methods in com.tnsai.prompt.strategy that return PromptEnhancer.BuilderModifier and TypeMethodDescriptionstatic PromptEnhancer.BuilderPromptEnhancer.builder()Creates a new builder.PromptEnhancer.Builder.confidenceThreshold(float threshold) Sets confidence threshold for showing alternatives.PromptEnhancer.Builder.constraint(String constraint) Adds a single constraint.PromptEnhancer.Builder.constraints(List<String> constraints) Adds hard constraints that must be satisfied.PromptEnhancer.Builder.negativeExample(String input, String badOutput, String whyBad) Adds a negative (bad) example with explanation of why it's wrong.Sets the high-level objective.PromptEnhancer.Builder.outputFormat(PromptEnhancer.OutputFormat format) Sets the output format.PromptEnhancer.Builder.positiveExample(String input, String output) Adds a positive (good) example.PromptEnhancer.Builder.positiveExample(String input, String output, String explanation) Adds a positive example with explanation.Adds process steps for execution.PromptEnhancer.Builder.processStep(String step) Adds a single process step.PromptEnhancer.Builder.refinementPasses(int passes) Sets number of refinement passes for iterative refinement.Sets the role/persona for the response.PromptEnhancer.Builder.softPreference(String preference) Adds a single soft preference.PromptEnhancer.Builder.softPreferences(List<String> preferences) Adds soft preferences (nice to have).PromptEnhancer.Builder.stopCondition(String condition) Sets the stop/completion condition.PromptEnhancer.Builder.strategy(PromptStrategy strategy) Adds a prompting strategy.PromptEnhancer.Builder.verificationQuestions(int count) Sets number of verification questions for CoVe strategy.