Package com.tnsai.prompt.strategy
Class PromptEnhancer.Builder
java.lang.Object
com.tnsai.prompt.strategy.PromptEnhancer.Builder
- Enclosing class:
PromptEnhancer
Builder for PromptEnhancer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the PromptEnhancer.confidenceThreshold(float threshold) Sets confidence threshold for showing alternatives.constraint(String constraint) Adds a single constraint.constraints(List<String> constraints) Adds hard constraints that must be satisfied.negativeExample(String input, String badOutput, String whyBad) Adds a negative (bad) example with explanation of why it's wrong.Sets the high-level objective.Sets the output format.positiveExample(String input, String output) Adds a positive (good) example.positiveExample(String input, String output, String explanation) Adds a positive example with explanation.Adds process steps for execution.processStep(String step) Adds a single process step.refinementPasses(int passes) Sets number of refinement passes for iterative refinement.Sets the role/persona for the response.softPreference(String preference) Adds a single soft preference.softPreferences(List<String> preferences) Adds soft preferences (nice to have).stopCondition(String condition) Sets the stop/completion condition.strategy(PromptStrategy strategy) Adds a prompting strategy.verificationQuestions(int count) Sets number of verification questions for CoVe strategy.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
strategy
Adds a prompting strategy. -
role
Sets the role/persona for the response. -
objective
Sets the high-level objective. -
constraints
Adds hard constraints that must be satisfied. -
constraint
Adds a single constraint. -
softPreferences
Adds soft preferences (nice to have). -
softPreference
Adds a single soft preference. -
positiveExample
Adds a positive (good) example. -
positiveExample
Adds a positive example with explanation. -
negativeExample
Adds a negative (bad) example with explanation of why it's wrong. -
outputFormat
Sets the output format. -
stopCondition
Sets the stop/completion condition. -
process
Adds process steps for execution. -
processStep
Adds a single process step. -
verificationQuestions
Sets number of verification questions for CoVe strategy. -
refinementPasses
Sets number of refinement passes for iterative refinement. -
confidenceThreshold
Sets confidence threshold for showing alternatives. -
build
Builds the PromptEnhancer.
-