GA and RL and prompt-driven agents

1 Victorius 0 7/24/2025, 6:11:20 PM
Hi HN, I’ve been thinking about a new idea and would love to hear your thoughts. I’m exploring the concept of an AI agent that improves itself using reinforcement learning (RL) policies. The goal is to create an agent that can assist with programming, requirements engineering, or similar tasks that can be driven by LLMs.

One of the main challenges is that RL typically requires a finite set of actions, whereas prompts for LLMs can be arbitrarily complex or open-ended. To address this, I’m considering using a genetic algorithm (GA)-based approach, where a prompt is represented as a set of chromosomes. Each chromosome consists of changeable “phrases” like: - "You will receive a $5 tip" - "Please be as concise as possible" - "Think step by step before answering" I came across a recent paper - GAAPO: Genetic Algorithm Applied to Prompt Optimization (2025) https://arxiv.org/pdf/2504.07157 - that aligns with this direction.

However, I think this can be extended further by introducing a two-level architecture: Meta-Agent * Oversees high-level orchestration * Responsible for task analysis, code generation, requirements refinement, etc. * Evaluates sub-agents and commands them to evolve for better results

Sub-Agent * Executes specific tasks (analysis, development, testing, etc.) * Operates using LLMs and evolves prompts via gene optimization * After each evolution cycle, we can spin up multiple instances of sub-agents and evaluate them to select the ones with the best performance (fitness function based on task success, quality of output, etc.).

What do you think of this approach? Is it feasible in practice? What are the potential limitations or pitfalls? Any known work or prior art that you’d suggest reading?

I did a quick Google Scholar search and couldn’t find any paper combining GA + RL + prompt-driven agents in this architecture — let me know if I missed something! Looking forward to your feedback.

Comments (0)

No comments yet