[KongchangAI]
ConceptSide Effect

Side Effect

In programming, any effect a function or operation produces on external state beyond its return value, such as file writes, database modifications, or network requests. The treatment of side effects is a core distinction between functional and imperative programming paradigms.

Timeline (last 90 days)

Oct 16

In tool-calling scenarios, if each candidate is a complete agent trajectory, N candidates mean N sets of side effects (N writes, emails, charges), because eliminating a candidate cannot undo side effects that have already occurred.

Unverified50%
Oct 16

Pure text generation is idempotent, so generating a hundred candidates at worst wastes tokens without changing the world state; but candidate trajectories that include tool calls each genuinely change external state.

Unverified50%
Oct 16

A pure function is a function that always returns the same output for the same input and produces no observable side effects: it does not modify external state, does not read or write files or databases, does not make network requests, and does not write logs.

Unverified50%
Oct 6

Hidden side effects refer to a function secretly modifying external state beyond its return value (such as altering global variables, modifying a passed-in list, or writing to a file).

Unverified50%
Oct 6

It is recommended to consolidate side-effect operations into clearly defined boundary layers, keeping core business logic pure in order to facilitate unit testing and reduce debugging costs.

Unverified50%

All Facts (5)

Source Articles