# Flow Engineering [Flow Engineering is All You Need. We’re pushing the boundaries of what’s… | by Rohan Balkondekar | Medium](https://medium.com/@rohanbalkondekar/flow-engineering-is-all-you-need-9046a5e7351d) - Flow Engineering elevates [prompt engineering](https://www.lyzr.ai/prompt-engineering-101-how-to-write-powerful-prompts/), by breaking tasks into smaller steps and prompting the LLM to self-refine its answers, leading to enhanced accuracy and better performance. - Language Agent Tree Search ([LATS](https://arxiv.org/pdf/2310.04406v2.pdf)) framework - "dual process" models - System 1: a fast, automatic, unconscious mode - [System 2](https://arxiv.org/pdf/2311.11829.pdf): a slow, deliberate, conscious mode - System 2 thinking with LLMs can be achieved at both prompt level and flow level. - Few techniques that we regularly use with Flow Engineering while developing Agents - [Reflexion](https://arxiv.org/pdf/2303.11366.pdf) - [OPRO](https://arxiv.org/pdf/2309.03409.pdf) - [Automatic Prompt Engineering](https://arxiv.org/pdf/2211.01910.pdf) - [Rephrase and Respond](https://arxiv.org/pdf/2311.04205.pdf) - [Step-Back Prompting](https://arxiv.org/pdf/2310.06117.pdf) - [Chain-of-Verification](https://arxiv.org/pdf/2309.11495.pdf) - [Emotional Stimuli](https://arxiv.org/pdf/2307.11760.pdf) - [EVOPROMPT](https://arxiv.org/pdf/2309.08532.pdf) - Frameworks like [AutoGen](https://github.com/microsoft/autogen) and [CrewAI](https://github.com/joaomdmoura/crewAI) are popular options to create AI Agents --- [Flow Engineering is all you need!](https://div.beehiiv.com/p/flow-engineering-need) - Chain of Thought (CoT) - Zero shot Chain of Thought - "Let’s think step-by-step" - Steps - problem reflection: goals, inputs, outputs, constraints etc - public tests reasoning: understanding why an input leads to a certain output - generate and rank possible solutions: two or three possible solutions ranked by correctness, simplicity and robustness - generate additional AI tests that are not part of the original public tests to create a more diverse set - choose a solution, execute, run on some tests, iterate until the solution passes all tests - Frameworks - [CrewAI](https://www.crewai.com/?utm_source=div.beehiiv.com&utm_medium=referral&utm_campaign=flow-engineering-is-all-you-need) (_multi-agent automations_), [Autogen](https://microsoft.github.io/autogen/?utm_source=div.beehiiv.com&utm_medium=referral&utm_campaign=flow-engineering-is-all-you-need) (_multi-agent conversation framework_), [SGLang](https://github.com/sgl-project/sglang?tab=readme-ov-file&utm_source=div.beehiiv.com&utm_medium=referral&utm_campaign=flow-engineering-is-all-you-need) (_structured generation language)_, [DSPy](https://github.com/stanfordnlp/dspy?utm_source=div.beehiiv.com&utm_medium=referral&utm_campaign=flow-engineering-is-all-you-need) (_framework for algorithmically optimizing LM prompts and weights_) etc. - [Langgraph](https://python.langchain.com/docs/langgraph/?utm_source=div.beehiiv.com&utm_medium=referral&utm_campaign=flow-engineering-is-all-you-need) (_library for building stateful, multi-actor applications with LLMs_) - Langgraph incorporates the concept of LLM [State Machines](https://stately.ai/blog/2023-10-05-what-is-a-state-machine?utm_source=div.beehiiv.com&utm_medium=referral&utm_campaign=flow-engineering-is-all-you-need) --- 👉 [[Agentic Workflow]]