You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(agent): consume similar_trajectories in plan construction — retrieved high-reward trajectories are fetched then ignored #10581
similar_trajectories are retrieved with reward filtering, then ignored by plan construction
Part of umbrella #10542 · concrete sub-slice of #10545 · follow-up to the trajectory store (GH#7357).
Research origin: Ornith-1.0 comparison — high-reward past trajectories should bias the next plan. AutoBot already retrieves them (paying the vector-search cost) but never feeds them into planning.
The gap (verified)
WorkflowPlanner fetches high-reward similar past solutions before planning:
autobot-backend/orchestration/workflow_planner.py:288-293 — find_similar_trajectories(user_request, top_k=5, min_reward=0.7) → stored in context["similar_trajectories"].
But:
The method docstring at :99 states plainly: "Step generation always [builds from scratch]"; callers may only "inspect via context['similar_trajectories']."
Grep confirms zero consumers read context["similar_trajectories"] (only the populate site and the docstring reference it).
Net: we run a ChromaDB query + embedding on every plan, filter to reward ≥ 0.7, and then discard the result. The reward signal stored in the trajectory store influences nothing.
What to build
Inject the retrieved trajectories' action_sequence / strategy into the planning prompt as few-shot priors ("a similar high-reward task was solved via …"), so the planner can reuse proven decompositions instead of always re-deriving.
Keep it advisory-but-used: the planner may deviate, but the trajectory must demonstrably reach the prompt.
Non-fatal path already exists (try/except at :299) — preserve it.
Acceptance criteria
When a high-reward similar trajectory exists, its decomposition/strategy is present in the planner's prompt (assert on the rendered prompt in a test).
With no similar trajectory (or all below min_reward), behavior is unchanged.
No change to the retrieval contract in memory/trajectory_store.py.
Implementation blueprint:Experience as a Compass: Multi-Agent RAG with Evolving Orchestration and Agent Prompts. Its "Orchestration Adaptation" is this issue — dynamically adjusting agent selection/sequencing by analyzing patterns in historical trajectories, in-context (no retraining). Directly informs how to inject similar_trajectories decompositions into the planning prompt as few-shot priors.
Activity
mrveiss commentedon Jun 28, 2026
Implementation blueprint: Experience as a Compass: Multi-Agent RAG with Evolving Orchestration and Agent Prompts. Its "Orchestration Adaptation" is this issue — dynamically adjusting agent selection/sequencing by analyzing patterns in historical trajectories, in-context (no retraining). Directly informs how to inject
similar_trajectoriesdecompositions into the planning prompt as few-shot priors.feat(agent): close the Ornith-style planning loop — apply learned pro…
mrveiss commentedon Jul 6, 2026
Delivered via PR #10983 — Ornith-style planning loop wired (learned prompt template + similar-trajectory priors + best-of-N plan selection), config-gated + explainable. 20/20 tests.
docs(orchestration): deprecate WorkflowPlanner in place, naming what …
docs(orchestration): deprecate WorkflowPlanner in place with a test t…