AIU. - Artificial Intelligence Utility

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > AI - Artificial Intelligence Commands > AIU. - OpenAI API > !Session and Storage Management >

AIU. - Artificial Intelligence Utility

AIU.SetSeed

Previous Top Next


MiniRobotLanguage (MRL)

 

AIU.SetSeed
Set the Seed Value for Reproducible Responses

 

Intention

 

SetSeed Command: Ensuring Consistent AI Output
 
The SetSeed command sets a seed value to make AI responses deterministic, useful for testing or replicating results in operations like AIU.Chat or AIU.Responses.

This provides predictability in AI behavior.

It’s part of the AIU - OpenAI API suite.

 

What is the SetSeed Command?

 

This command sets an integer seed value that controls the randomness of AI responses.

When set, the same seed with identical inputs will produce identical outputs, overriding default randomness.

 

Why Do You Need It?

 

Setting a seed value is valuable for:

Testing: Ensure consistent results for debugging or validation.

Reproducibility: Replicate AI behavior across multiple runs.

Control: Reduce variability in critical applications.

 

How to Use the SetSeed Command?

 

The command requires one parameter: an integer seed value.

The seed persists until changed by another AIU.SetSeed call or reset via Init_AIU().

 

Example Usage

 

AIU.SetSeed|42

AIU.Chat|Tell me a story|$$RES

DBP.Story with Seed 42: $$RES

 

This sets the seed to 42, ensuring the same story is generated each time with identical inputs.

 

Illustration

 

┌───────────────┐

│ Seed Value    │

├───────────────┤

│ 42            │

└───────────────┘

The seed value set for reproducible AI responses.

 

Syntax

 

AIU.SetSeed|P1

AIU.Set_Seed|P1

 

Parameter Explanation

 

P1 - (Required) An integer value (e.g., 42) to set as the seed for AI response generation.

 

Example

 

AIU.SetSeed|12345

AIU.Chat|Generate a random number|$$NUM

DBP.Number with Seed 12345: $$NUM

ENR.

 

Remarks

 

- The seed must be an integer; non-numeric values may cause unexpected behavior.

- See OpenAI API - seed for more details.

 

Limitations

 

- Requires exactly one parameter; omitting or adding extra parameters triggers an error.

- Reproducibility depends on identical inputs and model settings.

 

See also:

 

AIU.Get_Seed

AIU.Chat

AIU.Responses

OpenAI API - seed