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.


 

Financial chat for SAP Business One: How he answers questions about numbers and when he prefers not to answer

Financial chat for SAP Business One: How he answers questions about numbers and when he prefers not to answer

Anyone who does not book in SAP Business One on a daily basis often faces closed doors when it comes to questions regarding the financial system...
AI in everyday work: Person starts with their own task instead of the learning pile

AI in everyday work: Here's how to find the right start

Anyone who wants to use AI in their daily work is familiar with this: You read an article about prompts. A new model appears in it ...
AI-SHOP

AI assistant meets SAP Business One: Two paths out of the Versino AI shop

AI assistants like Claude or Copilot write emails, compile documents, and explain technical terms. But when you ask them about the open-source code...
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...
Wird geladen …