LlmProgramVariationOptions
Options & Configuration · AiDotNet.Configuration
Configures how a language model is prompted to propose the next candidate program.
For Beginners
These settings control the conversation with the language model that writes your
next candidate program: what you show it, how much you let it write, and how many times you let it correct
itself when its answer cannot be used. The defaults ask for small edits, show up to three other good programs
for inspiration, and allow two retries with feedback. Raise Temperature for more adventurous
proposals and lower it for conservative ones.
How It Works
Everything here is opt-in: the core library gains no model, network, or sandbox dependency, and these options
only take effect once a caller supplies a chat client of their own. The two settings that matter most are
Mode, which decides whether the model is asked for edits or for a whole file, and
MaxProposalRetries, which decides how many times an unusable answer is sent back with a
description of what went wrong. The reference OpenEvolve worker has no equivalent of the second: a response
whose edits do not apply produces no child, the iteration is lost, and nothing is fed back to the model.
The remaining settings exist to bound what an untrusted response can cost. MaxPromptProgramChars
caps how much program text is quoted into a prompt, MaxInspirations caps how many sibling
programs are shown, and MaxOutputTokens caps the answer. Prompts and diagnostics never carry API
keys, provider URLs, or raw exception text.
Constructors
| Constructor | Summary |
|---|---|
LlmProgramVariationOptions() |
Properties
| Property | Summary |
|---|---|
IList<int> FeatureBinCounts { get; set; } |
Gets or sets the number of bins per dimension, aligned with FeatureDimensions. |
IList<string> FeatureDimensions { get; set; } |
Gets or sets the archive’s behaviour-dimension names, in the archive’s own order. |
ProgramEvolutionMode Mode { get; set; } |
Gets or sets whether the model is asked for edit blocks or a full rewrite. |
bool IncludeParentMetrics { get; set; } |
Gets or sets whether the parent’s quality and descriptor values are included in the prompt. |
double? Temperature { get; set; } |
Gets or sets the sampling temperature passed to the chat client, or null for its default. |
int MaxEmptyNeighborCells { get; set; } |
Gets or sets how many empty neighbouring archive cells are named in the prompt; 0 names none. |
int MaxInspirations { get; set; } |
Gets or sets the maximum number of inspiration programs quoted into the prompt. |
int MaxPreviousAttempts { get; set; } |
Gets or sets how many earlier attempts on the same parent are recounted in the prompt; 0 recounts none. |
int MaxPromptProgramChars { get; set; } |
Gets or sets the maximum number of characters of any single program quoted into the prompt. |
int MaxProposalRetries { get; set; } |
Gets or sets how many times an unusable response is retried with feedback describing the problem. |
int MaxRecordedAttempts { get; set; } |
Gets or sets how many recent proposal attempts are retained for inspection after a run. |
int MaxTopPrograms { get; set; } |
Gets or sets how many of the archive’s strongest programs are quoted into the prompt; 0 quotes none. |
int SamplesPerAttempt { get; set; } |
Gets or sets how many answers are drawn from one prompt before the prompt changes. |
int? MaxOutputTokens { get; set; } |
Gets or sets the output token cap passed to the chat client, or null for its default. |
int? Seed { get; set; } |
Gets or sets a fixed sampling seed, or null to derive one from the proposal’s random stream. |
string ArtifactDiagnosticPrefix { get; set; } |
Gets or sets the diagnostic-code prefix whose entries are shown as evaluator artifacts. |
string SystemMessage { get; set; } |
Gets or sets a replacement system message, or null to use the built-in instructions. |
Methods
| Method | Summary |
|---|---|
LlmProgramVariationOptions Clone() |
Creates an independent copy so a running operator is unaffected by later mutation. |
void Validate() |
Validates the mode, retry count, and prompt bounds. |
Fields
| Field | Summary |
|---|---|
string DefaultArtifactDiagnosticPrefix |
The default diagnostic-code prefix treated as evaluator artifacts. |