Package com.tnsai.prompt.optimizer
Interface PromptEvaluator
- All Known Implementing Classes:
DefaultPromptEvaluator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Evaluates prompt responses against expected outputs.
Implementations can use various metrics like exact match, semantic similarity, keyword presence, etc.
-
Method Summary
-
Method Details
-
evaluate
Evaluates a response against expected output.- Parameters:
actualResponse- the LLM responseexpectedOutput- the expected output- Returns:
- score between 0.0 and 1.0
-