13 october

Reflection (AI)

Versino Financial Suite

Reflection In AI, reinforcement learning is a process by which language model agents improve from trial to trial by translating feedback into short verbal self-reflections and taking them into account in the next attempt. The process does not adjust model weights and can be used without fine-tuning or neutral training. Therefore, it is also called „verbal reinforcement“: reinforcing learning through verbal feedback.

How reflection works

The agent processes a task and receives feedback from its environment, such as success, failure, or an error message. The system converts this feedback into a short textual summary. The system stores this self-reflection and provides it as additional context the next time the agent attempts the task. The loop continues until the reviewer classifies the result as correct or the maximum number of attempts is reached.

Building blocks and memory

Reflection consists of three components. The actor is a language model that generates text and actions, for example via chain of thought or ReAct. The evaluator assesses the result, for example by exact matching, heuristics, or another language model. In program code, it uses self-written tests. The self-reflection model analyzes the failure and formulates what should be done differently.

Short-term memory contains the course of the current episode. Long-term memory stores the reflections. Due to the limited context length, it usually contains only 1 to 3 entries.

Advantages and limitations

Reflection is lightweight. The feedback is more nuanced and understandable than a mere number. In decision-making, thinking, and programming tasks, the method shows significant improvements. However, it depends on the model’s ability to evaluate itself. Faulty tests lead to incorrect reflections. There is no formal guarantee of success. If a task requires a great deal of exploration, the method may remain stuck in local minima.

Reflection in LATS

Language Agent Tree Search (LATS) combines tree search with self-reflection by the language model and feedback from the environment. At the end of each run, the model produces a brief assessment of what went well and what didn’t. It uses this assessment to inform the next round of training.

Reference to SAP Business One

The availability check in SAP Business One forgets a case as soon as the user selects an option. A thought experiment (no existing function and no announcement) shows the difference: A system that records how a case ended could incorporate that experience into the next display.

Demarcation

Reflection is not training. The process improves the next attempt based on stored text in context, not on adjusted model weights. The term self-regulation is related: the ability of autonomous systems to adapt and correct their own actions.


 

SPRINT & SWIRL

Sprint and Swirl: How an AI agent divides work and learns from trials

This series deals with artificial intelligence in conjunction with SAP Business One. It takes a close look at fundamental AI principles...
LATS

LATS: Considering several paths simultaneously with AI — and the availability check in SAP B1

This series focuses on artificial intelligence in conjunction with SAP Business One. Not as a collection of product announcements, but as...
ReAct and RLEF

ReAct and RLEF: How Artificial Intelligence Learns from Real Mistakes — and What Automated Bank Reconciliation in SAP Business One Has to Do with It

This is the fourth instalment in a series on this blog dealing with AI fundamentals in conjunction with SAP Business One...
Service Layer AI as a transactional layer

SAP B1 10.0 FP2608: Service Layer AI as a transactional layer

The SAP Business One Service Layer has previously served predominantly as a passive data provider: applications requested data via OData, each ...
Process Reward Model

Process Reward Models: Why a correct result does not yet prove a correct method

This series continuously examines individual AI basic terms and methods such as the Process Reward Model. The previous episode has ...
Test-Time-Compute-Scaling

Test-Time Compute Scaling: Why a Smaller AI Model Can End Up Winning — and What Supplier Comparison in SAP Business One Has to Do With It

This is a continuation of the series on this blog, which deals with Artificial Intelligence in combination with SAP Business One...
Wird geladen …