AI Dictionary › Prompting

Reflexion

Definition

Reflexion is a technique where an agent, after a failed or suboptimal attempt, generates a written reflection on its mistakes and keeps it as textual memory for later attempts. Unlike self-refine on a single output, Reflexion accumulates lessons across tasks. Example: "Your SQL query was wrong. Write a 2-line note on what you got wrong and how to avoid it. On the next attempt, read the note before writing the query." The reflection ("I forgot the JOIN on the customers table") steers the retry toward the solution.

Use it in agents facing multi-attempt tasks — problem solving, iterative coding, navigation — where learning from mistakes between attempts markedly improves success rate. It needs a way to re-run the task and verify the outcome.

Definizione (italiano)

Reflexion è una tecnica in cui un agente, dopo un tentativo fallito o subottimale, genera una riflessione scritta sui propri errori e la conserva come memoria testuale da usare nei tentativi successivi. A differenza del self-refine su un singolo output, Reflexion accumula lezioni tra un compito e l'altro. Esempio: "Hai sbagliato la query SQL. Scrivi una nota di 2 righe su cosa hai sbagliato e come evitarlo. Al prossimo tentativo, leggi la nota prima di scrivere la query". La riflessione ("ho dimenticato il JOIN sulla tabella clienti") guida il ritentativo verso la soluzione.

Usalo in agenti che affrontano compiti a più tentativi — risoluzione di problemi, coding iterativo, navigazione — dove imparare dagli errori tra i tentativi migliora sensibilmente il tasso di successo. Richiede un modo per rieseguire il compito e verificare l'esito.

Related terms

More in Prompting

From our network

Magellano GPS — Fleet Tracking Made Simple

Real-time GPS tracking, remote engine lock, fuel and CO₂ reporting for your fleet.

Visit magellanogps.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 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.