# GFlowPO: Generative Flow Network as a Language Model Prompt Optimizer

DevFeed: [GFlowPO: Generative Flow Network as a Language Model Prompt Optimizer](<https://devfeed.tech/articles/gflowpo-generative-flow-network-as-a-language-model-prompt-optimizer-96814.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2602.03358>)

Author: Junmo Cho, Suhan Kim, Sangjune An, Minsu Kim, Dong Bok Lee, Heejun Lee, Sung Ju Hwang, Hae Beom Lee

Published: 2026-10-23T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>), [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Prompt Engineering](<https://devfeed.tech/topics/prompt-engineering.md>), [prompt](<https://devfeed.tech/topics/prompt.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [llm-reasoning](<https://devfeed.tech/topics/llm-reasoning.md>), [LLM evaluation / benchmarking](<https://devfeed.tech/topics/llm-evaluation-benchmarking.md>), [few-shot](<https://devfeed.tech/topics/few-shot.md>), [Combinatorial optimization](<https://devfeed.tech/topics/combinatorial-optimization.md>)

Tags: [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [buffer](<https://devfeed.tech/tags/buffer.md>), [classification](<https://devfeed.tech/tags/classification.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [evaluations](<https://devfeed.tech/tags/evaluations.md>), [exploration](<https://devfeed.tech/tags/exploration.md>), [framework](<https://devfeed.tech/tags/framework.md>), [inference](<https://devfeed.tech/tags/inference.md>), [language-model](<https://devfeed.tech/tags/language-model.md>), [lightweight](<https://devfeed.tech/tags/lightweight.md>), [mechanism](<https://devfeed.tech/tags/mechanism.md>), [memory](<https://devfeed.tech/tags/memory.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [probabilistic](<https://devfeed.tech/tags/probabilistic.md>), [prompt](<https://devfeed.tech/tags/prompt.md>), [prompt-optimization](<https://devfeed.tech/tags/prompt-optimization.md>), [question](<https://devfeed.tech/tags/question.md>), [rl](<https://devfeed.tech/tags/rl.md>)

## AI overview

GFlowPO treats prompt search as posterior inference over latent prompts, regularized by a reference language model guided by a meta-prompt. It fine-tunes a lightweight prompt model with an off-policy Generative Flow Network objective and reuses past evaluations through replay-based training to improve sample-efficient exploration. A second, training-free component, Dynamic Memory Update, refreshes the meta-prompt using diverse replay-buffer prompts and top-performing prompts from a priority queue, progressively steering search toward high-reward regions. The abstract reports that GFlowPO outperforms recent discrete prompt optimization baselines on few-shot text classification, instruction induction, and question answering; it provides no numerical results or further evaluation details.

## Source excerpt

arXiv:2602.03358v2 Announce Type: replace-cross Abstract: Finding effective prompts for language models (LMs) is critical yet notoriously difficult: the prompt space is combinatorially large, rewards are sparse due to expensive target-LM evaluation. Yet, existing RL-based prompt optimizers often rely on on-policy updates and a meta-prompt sampled from a fixed distribution, leading to poor sample efficiency. We propose GFlowPO, a probabilistic prompt optimization framework that casts prompt search as a posterior inference problem over latent prompts regularized by a meta-prompted reference-LM prior. In the first step, we fine-tune a lightweight prompt-LM with an off-policy Generative Flow Network (GFlowNet) objective, using a replay-based training policy that reuses past prompt evaluations to enable sample-efficient exploration. In the second step, we introduce Dynamic Memory Update (DMU), a training-free mechanism that updates the meta-prompt by injecting both (i) diverse prompts from a replay buffer and (ii) top-performing prompts from a small priority queue, thereby progressively concentrating the search process on high-reward regions. Across few-shot text classification, instruction induction benchmarks, and question answering tasks, GFlowPO consistently outperforms recent discrete prompt optimization baselines.