ProgramProposalAttempt
Models & Types · AiDotNet.Evolution.Programs
One recorded request-and-answer round while a language model was asked to improve a program.
For Beginners
Think of this as one line in a diary of the conversation with the AI. It says which program was being improved, whether that particular reply was usable, and roughly what it cost. After a run you can read the diary to see whether the model was mostly succeeding or mostly being asked to try again, which is usually the quickest way to tell whether a prompt or a model choice is the problem.
How It Works
The operator keeps a bounded, ordered log of these so a finished run can be explained without re-reading provider
logs: which parent was being improved, how many times the model had to be asked, what went wrong each time, and
how many tokens the round cost. Nothing here echoes the model’s answer or the program text. Detail
carries only the short, control-character-sanitized reason the operator itself generated, and a provider failure
contributes its exception type name and nothing else, so an endpoint or a key cannot reach a log through
this type.
Attempts are numbered from one within a single proposal, so AttemptNumber restarts for each parent
rather than counting across the run; pair it with ParentGenomeId to group a conversation. The
terminal Exhausted record shares the number of the last failed request.
Constructors
| Constructor | Summary |
|---|---|
ProgramProposalAttempt(string parentGenomeId, int attemptNumber, ProgramProposalOutcome outcome, string detail, int inputTokens, int outputTokens) |
Initializes a recorded attempt. |
Properties
| Property | Summary |
|---|---|
ProgramProposalOutcome Outcome { get; } |
Gets what happened to the request. |
bool IsAccepted { get; } |
Gets whether this attempt produced a usable child program. |
int AttemptNumber { get; } |
Gets the one-based position of this request within its proposal. |
int InputTokens { get; } |
Gets the prompt tokens the provider reported, or zero when it reported none. |
int OutputTokens { get; } |
Gets the answer tokens the provider reported, or zero when it reported none. |
int TotalTokens { get; } |
Gets the sum of the reported prompt and answer tokens. |
string Detail { get; } |
Gets a short, sanitized reason; empty when the attempt succeeded or carried no reason. |
string ParentGenomeId { get; } |
Gets the identity of the program the model was asked to improve. |
Methods
| Method | Summary |
|---|---|
string ToString() |
Returns a description that never echoes the model’s answer or the program text. |
Fields
| Field | Summary |
|---|---|
int MaxDetailLength |
The longest detail text retained; longer reasons are truncated. |