AI Dictionary › Fondamenti AI
Idempotenza
Idempotency is the property of an operation that, when performed multiple times, has the same effect as performing it once. Pressing the elevator call button twice is equivalent to pressing it once: that is an idempotent operation. In distributed systems, where messages can be duplicated and retries are the norm, it is the property separating robust systems from fragile ones.
Idempotency is the property of an operation that, when performed multiple times, has the same effect as performing it once. Pressing the elevator call button twice is equivalent to pressing it once: that is an idempotent operation. In distributed systems, where messages can be duplicated and retries are the norm, it is the property separating robust systems from fragile ones.
In practice it is achieved by designing operations so that repetitions are harmless: set the balance to 100 is idempotent, add 10 to the balance is not. APIs use idempotency keys: the client attaches a unique identifier to the request and the server, upon seeing it again, returns the already computed result instead of re-executing. In HTTP, GET, PUT and DELETE are defined as idempotent, POST is not.
In AI, idempotency protects agents: an agent retrying a failed action (a payment, an email send, a database write) must be able to do so without duplicating effects, and it is one of the key properties in designing safe tools for LLMs. Beyond AI it is vital in digital payments, messaging and infrastructure deployment (Terraform and Ansible are built on idempotent operations).
The term comes from mathematics: it was coined by the American algebraist Benjamin Peirce around 1870, from the Latin idem (same) and potens (power), to describe elements that return themselves when raised to a power. Distributed computing adopted it, turning an algebraic curiosity into a fundamental design principle.
L'idempotenza è la proprietà di un'operazione che, eseguita più volte, produce lo stesso effetto di una singola esecuzione. Premere due volte il pulsante di chiamata dell'ascensore equivale a premerlo una volta: quella è un'operazione idempotente. Nei sistemi distribuiti, dove i messaggi possono duplicarsi e i retry sono la norma, è la proprietà che separa i sistemi robusti da quelli fragili.
In pratica si ottiene progettando le operazioni in modo che le ripetizioni siano innocue: imposta il saldo a 100 è idempotente, aggiungi 10 al saldo non lo è. Le API usano chiavi di idempotenza: il client allega un identificatore univoco alla richiesta e il server, se la rivede, restituisce il risultato già calcolato invece di rieseguire. Nel protocollo HTTP, GET, PUT e DELETE sono definiti idempotenti, POST no.
Nell'AI l'idempotenza protegge gli agenti: un agente che ritenta un'azione fallita (un pagamento, un invio email, una scrittura su database) deve poterlo fare senza duplicare gli effetti, ed è una delle proprietà chiave nella progettazione di tool sicuri per LLM. Fuori dall'AI è vitale nei pagamenti digitali, nella messaggistica e nel deployment di infrastrutture (Terraform e Ansible si fondano su operazioni idempotenti).
Il termine viene dalla matematica: fu coniato dall'algebrista americano Benjamin Peirce intorno al 1870, dal latino idem (stesso) e potens (potenza), per descrivere elementi che elevati a potenza restituiscono se stessi. L'informatica distribuita lo ha adottato trasformandolo da curiosità algebrica a principio di progettazione fondamentale.
From our network
Kaimaki Web — Websites That Win Customers
Custom websites, web apps and digital marketing for growing businesses.
Visit kaimakiweb.com →From the Agora Intelligence blog
📱 Download the Android app (beta) iOS coming soon
Say what you mean. Get what you need.
Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.