Skip to content
Snippets Groups Projects

Use correct format for demonstration samples for evaluation and evolution

Merged Max Kimmich requested to merge refactor-models into master
1 file
+ 14
0
Compare changes
  • Side-by-side
  • Inline
@@ -426,6 +426,13 @@ class DifferentialEvolution(EvolutionAlgorithm):
if evolved_prompt is None:
logger.info(f"Could not extract prompt from response: {evolved_prompt}")
# no prompt was returned (e.g., evolved prompt could not be extracted), therefore, for DE, we use the basic prompt
return (
prompts_current_evolution[current_iteration].content,
[judgement],
usage,
)
else:
logger.info(
"DE-evolved prompts '%s', '%s' and '%s' with basic prompt '%s' into '%s'",
@@ -569,6 +576,13 @@ class DifferentialEvolutionWithCot(DifferentialEvolution):
if evolved_prompt is None:
logger.info(f"Could not extract prompt from response: {evolved_prompt}")
# no prompt was returned (e.g., evolved prompt could not be extracted), therefore, for DE, we use the basic prompt
return (
prompts_current_evolution[current_iteration].content,
judgements,
usage,
)
else:
logger.info(
"DE-evolved prompts '%s', '%s' and '%s' with basic prompt '%s' into '%s'",
Loading