ProgramPromptTemplateKey

Enums · AiDotNet.Enums

Names one overridable prompt template used when a language model evolves a program.

For Beginners

A prompt is assembled from several reusable pieces of text: the standing instructions, the request itself, and the little sections that describe past attempts and example programs. This list names each of those pieces so you can replace any one of them with your own wording. Pick the key you want to change, supply your text, and the rest of the prompt keeps working exactly as before. If your replacement text refers to a value the piece does not receive, you are told immediately rather than halfway through a long run.

How It Works

Every value corresponds to exactly one piece of prompt text that ProgramPromptTemplateSet resolves, and each has a fixed set of placeholders declared alongside it. Because the keys are an enumeration rather than free-form strings, an override for a template that does not exist is a compile error instead of a run-time lookup failure, and the complete set of overridable texts is discoverable from the type itself.

The reference OpenEvolve implementation names templates with strings that are matched against whatever *.txt files happen to be in a directory, so a typo silently leaves the shipped default in place and a missing template raises an error only when the first prompt is built. Typed keys plus configure-time validation remove both failure modes.

Fields

Field Summary
ProgramPromptTemplateKey DiffUser The request asking for SEARCH/REPLACE edit blocks.
ProgramPromptTemplateKey Evaluation The request asking a model to score a program on named criteria.
ProgramPromptTemplateKey EvaluatorSystemMessage The standing instructions sent as the system message when a model judges a program.
ProgramPromptTemplateKey EvolutionHistory The wrapper that joins previous attempts, top programs, and inspirations.
ProgramPromptTemplateKey FullRewriteUser The request asking for a complete replacement program.
ProgramPromptTemplateKey InspirationProgram The rendering of one inspiration program.
ProgramPromptTemplateKey InspirationsSection The wrapper around the list of inspiration programs.
ProgramPromptTemplateKey PreviousAttempt The rendering of one earlier attempt and how it turned out.
ProgramPromptTemplateKey SystemMessage The standing instructions sent as the system message when proposing a change.
ProgramPromptTemplateKey SystemMessageChangesDescription The extra system instructions that require a changes description to be maintained.
ProgramPromptTemplateKey SystemMessageWithChangesDescription The wrapper that appends the changes-description instructions to the system message.
ProgramPromptTemplateKey TopProgram The rendering of one high-scoring program shown as an example.
ProgramPromptTemplateKey UserMessageWithChangesDescription The wrapper that appends the current changes description to the user message.
int value__