ProposalProvenanceOptions

Options & Configuration · AiDotNet.Configuration

Configures how much of each language-model request and answer is kept as provenance.

For Beginners

These settings decide how much detail the library keeps about each conversation it has with the AI. The defaults keep a generous excerpt of both sides, trimmed to a few kilobytes each, and write them to disk in small batches. If your prompts contain anything you would rather not store, switch IncludePromptText off — you keep the who, when, and how much, and lose only the what.

How It Works

Provenance is only useful if it is affordable and safe. These options set both budgets. The text budgets bound what one record can cost on disk, so a run that asks a model ten thousand times cannot fill a volume with quoted program source; FlushEveryRecords and MaxSegmentBytes bound how much sits in memory and how large one crash-safe file segment grows.

Redaction is not configurable and always runs. Prompt and answer text is model output and program output — untrusted by definition — so it passes through the same credential-stripping and control-character-stripping pass the prompt builder uses before any of it reaches a file. Turning the text off entirely with IncludePromptText and IncludeResponseText still leaves the identifiers, hashes, token counts, timings, and outcomes, which is enough to reconstruct a lineage and cost a run without storing a single quoted character.

Constructors

Constructor Summary
ProposalProvenanceOptions()

Properties

Property Summary
bool Enabled { get; set; } Gets or sets whether provenance is recorded at all.
bool IncludePromptText { get; set; } Gets or sets whether the redacted prompt text is kept.
bool IncludeResponseText { get; set; } Gets or sets whether the redacted answer text is kept.
bool RecordFailedAttempts { get; set; } Gets or sets whether failed attempts are recorded as well as accepted ones.
int FlushEveryRecords { get; set; } Gets or sets how many records are buffered before a segment is written to disk.
int MaxPromptBytes { get; set; } Gets or sets the maximum UTF-8 bytes of prompt text kept per record.
int MaxResponseBytes { get; set; } Gets or sets the maximum UTF-8 bytes of answer text kept per record.
long MaxSegmentBytes { get; set; } Gets or sets the byte size at which a buffered batch is written even if it is not yet full.

Methods

Method Summary
ProposalProvenanceOptions Clone() Creates an independent copy of these options.
void Validate() Validates the option values.