Papers
Topics
Authors
Recent
Search
2000 character limit reached

PRAct: A Principle-First LLM Agent Framework

Updated 7 July 2026
  • The paper introduces PRAct, a framework that pairs each primitive action with a natural language principle to guide LLM agent behavior.
  • It details an execution-reflection-optimization loop where the agent adapts its action principles based on trajectory data and reflective critique.
  • Experimental results show that both trajectory-wise and batch reflective principle optimization yield significant performance gains over baseline methods.

PRActical, denoted PRAct in the source paper, is a framework for large-language-model agents that associates each primitive action with a natural-language principle and then iteratively refines those principles from trajectory data. In "PRAct: Optimizing Principled Reasoning and Acting of LLM Agent" (Liu et al., 2024), the framework is presented as a principle-first organization of agent behavior: principles are used both to rule out actions whose conditions are not satisfied by the current trajectory context and to guide the choice or parameterization of actions that remain available. The resulting system combines execution, reflection, and prompt-level optimization into a single loop for adapting action principles to a task distribution.

1. Formal definition and representational scheme

The formal object at the center of PRAct is a one-to-one correspondence between an action set A\mathcal A and a principle set P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}. At time step tt, the agent conditions on a trajectory context

ct=[(a1,o1),,(at1,ot1)]c_t=[(a_1,o_1),\dots,(a_{t-1},o_{t-1})]

and a template T(ct)\mathcal T(c_t) that linearizes this history into a prompt. The executor then samples

π(atct)=Executor(atT(ct);P),\pi(a_t\mid c_t)=\mathrm{Executor}(a_t\mid \mathcal T(c_t);\mathcal P),

so action selection is explicitly mediated by the current principle set rather than by trajectory text alone (Liu et al., 2024).

Within this formulation, each principle has two distinct functions. First, it acts as an admissibility condition: actions whose principles are not satisfied by the current context are pruned from consideration. Second, it acts as a behavioral guideline for the execution of an admissible action, including the way its arguments are filled in. The paper therefore treats principles not as post hoc explanations but as operational controls embedded directly in the prompting interface of the agent.

This structure distinguishes PRAct from architectures in which reflection affects only future prompts at the trajectory level. Here the optimized object is a persistent set of action-linked principles, and the same principle inventory is reused across tasks until it is revised.

2. Execution architecture and control loop

PRAct organizes the agent into three components: an Executor, a Reflector, and an Optimizer. During execution, for each query qQq\in\mathcal Q, the Executor runs under the current principle set P\mathcal P until termination or a maximum step budget, producing a trajectory

cq=[(aq(1),oq(1)),,(aq(n),oq(n))].c_q=[(a_q^{(1)},o_q^{(1)}),\dots,(a_q^{(n)},o_q^{(n)})].

The set of all trajectories is denoted C={cq:qQ}\mathcal C=\{c_q:q\in\mathcal Q\} (Liu et al., 2024).

Reflection is then performed by a separate LLM. For each trajectory, the Reflector produces a textual critique

P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}0

The paper distinguishes a reward-based reflector, used when external rewards P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}1 are available, from a self-reflector, used when no such reward is provided. In both cases, the output is a natural-language diagnosis of how the existing principles were followed or violated during execution.

Optimization is finally performed by an Optimizer LLM that rewrites or refines the principle set in light of the reflections. The control loop is therefore execution P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}2 reflection P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}3 principle rewriting, with the rewritten principles fed back into the next round of execution. The paper characterizes this as introducing “principles” as a lightweight, language-native regularizer for LLM action selection (Liu et al., 2024).

3. Reflective Principle Optimization

The principle-adaptation mechanism is called Reflective Principle Optimization, or RPO. The paper develops RPO under two scenarios. Reward-RPO uses environmental rewards during reflection, whereas Self-RPO relies on self-reflection without external rewards. This distinction concerns the informational basis of critique rather than the mechanics of updating: in both cases, the updated object is still the principle set P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}4 (Liu et al., 2024).

Two optimization modes are defined. In RPO-Traj, principles are optimized separately for each trajectory:

P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}5

after which the per-trajectory principle sets are combined by a summarization step,

P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}6

In RPO-Batch, all reflections are concatenated into a single prompt,

P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}7

and the optimizer performs one batch update,

P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}8

The two modes trade off locality against aggregation. RPO-Traj uses P={p1,,pA}\mathcal P=\{p_1,\dots,p_{|\mathcal A|}\}9 calls to the optimizer, each with short context. RPO-Batch uses a single optimizer call with a substantially longer context. The paper reports that batch updates benefit from cross-instance sharing but require a stronger long-context model, whereas trajectory-wise updates isolate failures and corrections at the single-trajectory level (Liu et al., 2024).

The paper does not instantiate a closed-form objective for either mode. It only states an informal interpretation: Reward-RPO seeks a principle set that maximizes expected environment reward, while Self-RPO seeks a principle set that improves an internal quality score induced by self-critique.

4. Optimization semantics and the status of “text gradients”

A notable feature of the PRAct presentation is the discrepancy between the abstract’s language and the formal material supplied in the body. The abstract states that the framework is centered on “text gradients” from a reflection and optimization engine, but the manuscript does not provide explicit gradient formulas, does not define a continuous parameterization of principles tt0, does not show tt1 calculations, and does not present backpropagation through the LLM. No explicit loss tt2 and no gradient-based update rule for principles are given (Liu et al., 2024).

Accordingly, the actual optimization mechanism described in the paper is prompt-based rather than differentiable. The Reflector emits textual critiques, and the Optimizer rewrites principles in response to those critiques. This suggests that PRAct is best understood operationally as iterative language-level refinement of action principles, not as a conventional gradient-based training procedure.

The same clarification applies to theory. The paper does not present a convergence proof, regret bound, or other formal guarantee. Its core contribution is empirical and architectural: the introduction of action-linked principles and the demonstration that repeated reflection-and-rewrite cycles can improve downstream agent performance (Liu et al., 2024).

5. Experimental protocol and quantitative results

The experimental study uses GPT-3.5-Turbo and GPT-4-Turbo as Executor, Reflector, and Optimizer across four environments with 60–250 queries each: WebShop, Academia, Movie, and Weather. The baselines are Act, ReAct, Reflexion, and ExpeL. Performance is reported as average success rate, and the paper states that PRAct, in either trajectory or batch form, consistently outperforms all baselines across all four environments and both LLM sizes (Liu et al., 2024).

Environment GPT-3.5-Turbo best PRAct GPT-4-Turbo best PRAct
WebShop PRAct-T 0.6012 PRAct-B 0.6413
Academia PRAct-B 0.7396 PRAct-T 0.9207
Movie PRAct-B 0.6625 PRAct-B 0.7250
Weather PRAct-B 0.7042 PRAct-B 0.8331

The reported comparisons are substantial in several cases. With GPT-3.5-Turbo on WebShop, ExpeL attains 0.5823, whereas PRAct-T attains 0.6012. With GPT-4-Turbo on Academia, ExpeL attains 0.8084, whereas PRAct-T attains 0.9207. With GPT-4-Turbo on Weather, ExpeL attains 0.7583, whereas PRAct-B attains 0.8331. These results are used to support the claim that a principle-centric update loop can improve both tool-calling and web-navigation agents.

The ablation on reflector type is reported for WebShop. Under GPT-3.5-Turbo, Self-T and Self-B obtain 0.5871 and 0.5763, while Reward-T and Reward-B obtain 0.6012 and 0.5904. Under GPT-4-Turbo, Self-T and Self-B obtain 0.6172 and 0.6238, while Reward-T and Reward-B obtain 0.6323 and 0.6413. The paper interprets this pattern as evidence that reward-guided reflection yields higher downstream success than purely self-reflective updates (Liu et al., 2024).

6. Methodological significance and limitations

Methodologically, PRAct’s central move is to encode two forms of procedural knowledge in natural language: when to execute an action and how to parameterize it. The paper presents this as a “principle-first” layer added to LLM agents and argues empirically that iterative prompt-based refinement of this layer improves upon ReAct-style and reflection-only baselines in both tool-calling and web-navigation settings (Liu et al., 2024).

The main limitation is that the framework’s optimization language is stronger than its formalization. Despite the prominence of “text gradients” in the abstract, the implementation described in the body remains entirely at the level of reflection, summarization, and rewriting. The absence of explicit gradients, formal objectives, and theoretical guarantees does not negate the reported empirical gains, but it places PRAct in the category of prompt-mediated adaptation rather than in that of differentiable optimization.

A second limitation is architectural rather than conceptual. RPO-Batch can exploit cross-instance information, but the paper explicitly notes that it requires a stronger long-context model. Reward-RPO also depends on the availability of external reward signals, whereas Self-RPO dispenses with them at some empirical cost. These trade-offs are intrinsic to the framework as presented: principle adaptation is effective, but its behavior depends materially on critique quality, context length, and the source of evaluative feedback (Liu et al., 2024).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to PRACtical.