ContextPilot synthesis

Type: agentic-system-analyses/types/agentic-system-synthesis.md

Bounded synthesis

ContextPilot is a document-QA and context-management system with a separate reinforcement-learning plane. A policy model chooses retrieval queries, saved evidence, context edits and answers. Python owns tool execution and context assembly; training code uses downstream answer rewards to credit intermediate snapshots and invoke actor updates. This account covers the shipped inference callers, memory and maintenance surfaces, evaluators and ContextPilot training pipeline in Tencent/ContextPilot at commit 782cbb6611fb610c4cf6fafda6022b7e89cae191, with cutoff 2026-10-19. It is a whole-system boundary for those responsibilities, not comprehensive coverage of the bundled verl framework. The sole source, SRC-1, supplies implementation, shipped instructions and attributed performance claims. No target execution, model calls, run traces or causal experiments were inspected. See the boundary and source register, RT-RTE-document-qa and RT-RTE-actor-update.

From a question to a compact working context

The representative workflow is the evaluation script's finite-state-machine (FSM) QA path. An operator selects model, dataset and budgets. A worker creates a fresh agent for each sample and supplies the document and question. The ordinary model input excludes the reference answer; a supported retry mode can supply an earlier wrong answer and incorrectness feedback. The model service receives rebuilt history and offered tool schemas. Search uses an external document index, with optional embedding/reranking alternatives. These are service handoffs, not delegation to independent planning or search agents. The plan tool validates model-authored strategy text rather than generating a plan itself (RT-RTE-document-qa, EPI-CLM-context-management, workflow account).

The ordinary configured progression goes through planning, indexing, search, reading, saving, cleanup, review and finish. Tool results govern state transitions. After saving, the controller tracks evidence and invocation messages for cleanup and marks the relevant store for review. This permits removal of bulky visible evidence while retaining a smaller entry, but does not establish that the entry adequately replaces it. The model is not the only evidence selector: the report verifier identified a no-tool recovery branch that reads the highest-ranked search candidate automatically. The recovery inventory is therefore selective (RT-CLM-fsm-controls, workflow account, report-verification limit).

Two keyed stores hold richer memories and simple notes in process. Their training counterparts have separate owners and wrappers. On every payload rebuild, all current keys and summaries are automatically appended to the first question; this is availability-based supply, not question-ranked retrieval, and has no local inventory token budget. A requested key returns its full primary entry. Rich-memory reads additionally supply bounded neighboring summaries and episodes ranked by retained features and optional vectors, not full neighboring bodies. The vectors and relation scores are access metadata, not independently warranted facts or evidence of a vector database (MEM-RTE-inference-stores, MEM-RTE-training-stores, MEM-OBJ-memory-indexes).

Writes are admitted by software without per-entry human approval. Keys, update modes and selected content requirements receive checks; proposed facts do not receive source authentication or semantic acceptance. Inference simple-note revisions require new content and can preserve an omitted summary; training permits normalized empty content and clears an omitted summary. Model-supplied source IDs record asserted provenance, not verified derivation. Deleting or overwriting an entry changes future inventories and reads without retracting copies already in history. Optional merge combines bodies while losing rich fields and immediate reindexing; it is absent from the default schema, so its implementation does not establish ordinary use (MEM-RTE-inference-stores, MEM-RTE-training-stores, MEM-OBJ-notes, EPI-RTE-memory-merge).

Context editing changes a view over retained history. Message-ID masks substitute stubs, spans, summaries or compressor output in later model inputs. Explicit model choices coexist with automatic token-pressure and overflow cleanup. This is not a subagent frame discarded wholesale on return, nor a heap whose IDs are automatically dereferenced. Original history remains backing state, but restoration is limited to marked restorable IDs and configured availability; the default inference schema omits restore. Retention alone therefore does not guarantee policy-visible recovery. Token-window handling is best effort and can exhaust eligible messages while still oversized. Compression can fall back to sampled words, and span selection can drop a qualifier; neither mechanism checks semantic preservation (RT-OBJ-context-masks, RT-RTE-context-edit, EPI-OBJ-memory-content).

From review events to delivered results

The FSM rejects actions outside its computed allowed set, but the guarantee is conditional. If state filtering finds no matching configured tools, it returns the full configured set. The supported base caller checks configured tool names without FSM ordering; training uses a different registry and controller. Mandatory-review API recovery may mechanically read a saved entry, while empty-search recovery can proceed without a successful evidence cycle. These mechanisms establish conditional protocol control and store delivery, not relevant model checking or semantic acceptance (RT-CLM-fsm-controls, RT-RTE-base-inference, RT-RTE-training-rollout).

Successful finish completes the protocol, but run returns a rebuilt payload, not the answer string. The driver separately extracts the answer and writes result artifacts. Extraction can fall back to assistant prose after incomplete execution, so artifact delivery does not establish successful finish or correctness. Resume skips completed sample IDs rather than reloading their memories. Normal or handled exits attempt index cleanup; successful external erasure is not established by source wiring (RT-RTE-document-qa, workflow account, MEM-RTE-inference-stores).

Offline scoring has reporting force, not an established QA rollback or memory-revision consumer. Choice scoring uses heuristics that can count an ambiguous response as label agreement. LongMemEval's judge parser counts parse failures as false; BrowseComp+ excludes unparsed verdicts from its denominator. Their scores have different domains and cannot certify source truth, every intermediate assertion or the reasoning process (EPI-RTE-choice-evaluation, EPI-RTE-longmemeval-evaluation, EPI-RTE-browsecomp-evaluation).

From rollout experience to a changed actor

The strongest supported learning contribution is a wired trace-fed update pathway, alongside retained history reductions supplied to later policy calls. Training branches copy local histories, stores and masks, though document backend identity can be shared. Intermediate snapshots receive the mean reward of descendant terminal answers before output limiting; snapshots without terminal descendants are dropped. Query-relative credit and response masks feed actor-update calls. Terminal scoring uses supplied references, a fixed MCQ rule or an open-ended judge with an exact-match fallback, plus penalties. This makes answer evaluation consequential for optimization without accepting each ancestor memory claim or attributing success to each edit (RT-RTE-training-rollout, RT-RTE-actor-update, EPI-RTE-terminal-evaluation).

Training experience also includes code-authored cleanup. If the loop isolates a valid synthetic deletion suffix, it assigns trainable masks and emits a non-branchable snapshot; otherwise cleanup is conditioning only. Neither case proves the sampled policy chose that action. Periodic checkpoints support numerical resume, while validation metrics are not an inspected pre-update veto. The resulting retained parameters are the output of learning machinery; checkpoint loading alone does not establish an additional learning-authority consumer or production adoption (MEM-RTE-training-context, MEM-OBJ-trajectory-snapshots, RT-RTE-actor-update, profile-verification).

These positive mechanisms do not demonstrate improved capacity for future action. Automatic trace-to-replacement writes qualify as retained behavior-shaping updates even within one trajectory; reward-fed actor updates separately target later capacity. Neither classification requires new propositions or measured improvement. Actual behavioral dependence, benefit and component attribution remain unobserved. The README's stronger-performance/compact-context assertion is attributed reported operation, not an inspected comparison (RT-RTE-context-edit, MEM-RTE-training-context, RT-RTE-actor-update, EPI-CLM-performance-results).

The independent theory and self-change questions remain bounded. Static maintenance guidance is inspectable, but the records do not establish all theory-builder conditions: delivery does not establish content-dependent consumption (condition 2), and plan validation or scalar rewards do not establish localized content-directed criticism (condition 3) or retention of that criticism into another round (condition 4). Condition 1's localized formulation cannot by itself establish a theory-building loop. Improved future capacity through criticism of a consumed theory is unestablished. Planning requests self-assessment, but exercised reflection is not established; neither is autonomous theory building. Computation owns many internal QA and training steps without that proving every theory-building role. Separately, across actor training steps and checkpoint resume, the wired reward-responsive change to the policy's own parameters supports a dispositional improvement-directed self-change pathway. Exercised self-improvement remains unestablished because later operation causally depending on the update is not shown; successful improvement requires additional outcome evidence. These are independent findings, not a single system grade (RT-RTE-actor-update, RT-BAP-reward-actor, EPI-CLM-context-management, epistemic bounded conclusion).

For a single document-QA episode, the architecture supports retaining selected evidence while reducing its visible footprint, with fidelity and protocol qualifications. For cross-task autobiographical reuse, production adoption of a trained successor, or causally improved QA, the supplied evidence does not close the loop. Traced consumer use of retained artifacts, pinned model identities and update-to-later-operation traces would strengthen those conclusions. Controlled comparisons varying the relevant context-management component would be needed for component benefit; a semantic fidelity gate would change what saved content is licensed to support. No new target-source reads were made for this synthesis.

Limitations

Limitation Affected SRC IDs and record citations Inspected boundary Conclusion prevented Evidence that would resolve it
Recovery selectors are incompletely inventoried; code can automatically read the highest-ranked search candidate after no-tool retries. SRC-1; RT-RTE-document-qa, RT-RTE-context-edit, EPI-OBJ-document-evidence, workflow account, report-verification limit Inspected FSM and ordinary request-to-delivery path; verifier found the S3 recovery branch. No exhaustive inference recovery-selector comparison, and no inference that every chunk read was model-selected. A complete source-grounded inventory of material recovery triggers, selectors and evidence-delivery consumers.
No execution or controlled comparison evidence was supplied. SRC-1; boundary, RT-RTE-document-qa, RT-RTE-actor-update, EPI-CLM-performance-results Source implementation, shipped guidance and attributed README results only. No achieved accuracy, cost, successful protocol execution, exercised improvement or component causal benefit. Inspectable runs with conditions and outcomes; controlled intervention/comparison evidence at the claimed attribution level.
External weights, services and benchmark payloads are not frozen or fully available. SRC-1; boundary, RT-CMP-actor-model, RT-CMP-judge-model, RT-CMP-compression-model, RT-CMP-embedding-provider Configured endpoints, callers and local scoring/retrieval wiring; excludes external implementations and unavailable data. No exact provider identity/provenance, judge reliability, deployed retrieval isolation or benchmark reproduction. Pinned models, acquired dataset/reference payloads, service contracts and inspectable evaluations.
Semantic fidelity and claim-level acceptance are not established by structural admission or review events. SRC-1; EPI-OBJ-memory-content, MEM-RTE-inference-stores, MEM-RTE-training-stores, RT-CLM-fsm-controls Inspected writes, reads, edits, optional merge and conditional FSM review; opaque model reasoning remains unresolved. No universal preservation of qualifiers, validated retained knowledge, or system-wide absence of internal criticism. Instantiated content/lineage and evidence-consuming acceptance decisions; traces showing relevant checking, revision and later use.
Downstream reuse and optimization coverage remain incomplete. SRC-1; RT-OBJ-full-history, RT-RTE-training-rollout, RT-RTE-actor-update, profile-verification Logging, per-sample stores, branch copies, snapshot credit, update calls and checkpoint resume; exact scheduler ranking, lower-level optimization, synchronization/export and extra consumers untraced. No complete memory-value/route inventory, cross-task semantic trace reuse, deployed trained successor, additional authority inferred from loading, or exercised update-to-behavior dependence. Traced selectors and optimizer/synchronization/export consumers; semantic reload and later-operation artifacts tied to retained content or specific changed weights.
Initial content control and unrestricted generated-content lineage remain unresolved. SRC-1; RT-CMP-actor-model, MEM-RTE-training-stores, MEM-OBJ-memory-indexes, EPI-OBJ-memory-content, profile-verification Known subsequent model/software transformations; arbitrary library initialization and initial checkpoint/provider origins not established. No complete lineage, admission-control, curation or trace-source classification; no inference that every saved argument is trace-derived or ampliative. Recorded initialization/admission provenance and instantiated input-output derivations for the unresolved writes.