GraphHCA is a model-free method for hindsight in for LLM agents. It targets tasks with deterministic transitions and sparse terminal rewards, where step-level credit is crucial. The key innovation is using Bayes' rule to express the hindsight ratio as a ratio of behavior-policy success probabilities at consecutive states, eliminating the need for an auxiliary model or extra forward pass. This defines a success potential, estimated via discounted recursion on a graph built from pooled rollouts, which provides a dense step-level credit signal.
GraphHCA was evaluated on ALFWorld, WebShop, and Sokoban, achieving state-of-the-art results across all benchmarks and LLM scales. On ALFWorld, it improved success rate by up to 24.6 points over GRPO and up to 4.7 points over the strongest step-level baseline. The method is interesting because it efficiently solves the estimation bottleneck of hindsight credit assignment, making retrospective step-level credit practical for long-horizon LLM agent tasks.