Markus Wittkowski retweeted
Last week, I described four design patterns for AI agentic workflows that I believe will drive significant progress this year: Reflection, Tool use, Planning and Multi-agent collaboration. Instead of having an LLM generate its final output directly, an agentic workflow prompts the LLM multiple times, giving it opportunities to build step by step to higher-quality output. Here, I'd like to discuss Reflection. For a design pattern that’s relatively quick to implement, I've seen it lead to surprising performance gains.
You may have had the experience of prompting ChatGPT/Claude/Gemini, receiving unsatisfactory output, delivering critical feedback to help the LLM improve its response, and then getting a better response. What if you automate the step of delivering critical feedback, so the model automatically criticizes its own output and improves its response? This is the crux of Reflection.
Take the task of asking an LLM to write code. We can prompt it to generate the desired code directly to carry out some task X. After that, we can prompt it to reflect on its own output, perhaps as follows:
Here’s code intended for task X:
[previously generated code]
Check the code carefully for correctness, style, and efficiency, and give constructive criticism for how to improve it.
Sometimes this causes the LLM to spot problems and come up with constructive suggestions. Next, we can prompt the LLM with context including (i) the previously generated code and (ii) the constructive feedback, and ask it to use the feedback to rewrite the code. This can lead to a better response. Repeating the criticism/rewrite process might yield further improvements. This self-reflection process allows the LLM to spot gaps and improve its output on a variety of tasks including producing code, writing text, and answering questions.
And we can go beyond self-reflection by giving the LLM tools that help evaluate its output; for example, running its code through a few unit tests to check whether it generates correct results on test cases or searching the web to double-check text output. Then it can reflect on any errors it found and come up with ideas for improvement.
Further, we can implement Reflection using a multi-agent framework. I've found it convenient to create two different agents, one prompted to generate good outputs and the other prompted to give constructive criticism of the first agent's output. The resulting discussion between the two agents leads to improved responses.
Reflection is a relatively basic type of agentic workflow, but I've been delighted by how much it improved my applications’ results in a few cases. I hope you will try it in your own work. If you’re interested in learning more about reflection, I recommend these papers:
- Self-Refine: Iterative Refinement with Self-Feedback, by Madaan et al. (2023)
- Reflexion: Language Agents with Verbal Reinforcement Learning, by Shinn et al. (2023)
- CRITIC: Large Language Models Can Self-Correct with Tool-Interactive Critiquing, by Gou et al. (2024)
I’ll discuss the other agentic design patterns as well in the future.
[Original text: deeplearning.ai/the-batch/is… ]
Markus Wittkowski retweeted
Just 22 days until GDPR comes into effect and rest assured it will affect all of us. So if you haven't familiarized yourself with it yet, take just 10 minutes to read this great and easily approachable overview PDF: actonline.org/wp-content/upl…
Markus Wittkowski retweeted
Inheriting Code: Why You Should Keep Code Teardowns to Yourself dharme.sh/2oZ5jUa -- developers: please read this.
Markus Wittkowski retweeted
Having trouble understanding your American friends or colleagues? Maybe I can help:
Markus Wittkowski retweeted
If 100 people lived on earth. teapawt.net/MechAgri/status/719847…
Markus Wittkowski retweeted
Here's a 5 megabyte IBM hard drive from 1956. Today, that would "barely" hold one compressed MP3 song file!
Markus Wittkowski retweeted
iOS 10.3 deletes keychain items when an app is deleted. This means there's no good way to detect a specific device. forums.developer.apple.com/m…
Markus Wittkowski retweeted
Beyond the iPhone
stratechery.com/2016/beyond-…
The iPhone 7 may not be exciting in the short-term, but it lays the groundwork for the future
Markus Wittkowski retweeted
Alle in die Taschen greifen!@post4julia braucht finanzielle Unterstützung für ihr super Projekt #coffeeToGoAgain! teapawt.net/post4julia/status/7505…
Markus Wittkowski retweeted
Genius. @mortenjust made a text editor that only allow the 1,000 most used words in English. mortenjust-experiments.tumbl… – at Tamalpais Valley, CA
Markus Wittkowski retweeted
Lightning filmed at 7,200 fps (source: blazepress.tumblr.com/post/1…): teapawt.net/SimonParkin/status/680…
Markus Wittkowski retweeted
The rarest of beasts - a used rocket. Controlled landing not easy, but done right, can look easy. Check out video: bit.ly/1OpyW5N
Markus Wittkowski retweeted
The spacing between apps on the iPad pro (324px) is wider than the original iPhone display (320px).
Markus Wittkowski retweeted
I'm also very impressed with Amazon's latest innovation. 3D printing their website teapawt.net/ngkabra/status/6621561…
I have On-Demand Hyperloop Style Water Delivery in my house in India. xkcd.com/1599/
Markus Wittkowski retweeted
There are only two hard problems in distributed systems: 2. Exactly-once delivery 1. Guaranteed order of messages 2. Exactly-once delivery
Markus Wittkowski retweeted
How is light both a particle and a wave? The central mystery of quantum mechanics, animated buff.ly/1Ra4jpv
Markus Wittkowski retweeted
El fútbol femenino vs hombres... teapawt.net/leugimfigueroa/status/… – at Chile



























