ArticleScientific reports2026
Rethink context engineering using an attention-based architecture.
Article in Scientific reports, 2026. The graph could read no effect estimate from its abstract, so it casts no vote on the map. Not yet cited in PubMed.
What it found
Each row is one number read from the abstract, on the scale the paper reported it, with its interval. Left of the dashed line favours the treatment, right favours the comparator. Under each row is the sentence it came from. New to these charts? A ten-minute tutorial.
The abstract states no effect estimate the extractor could read, or names no intervention and outcome on the map, so this paper lights no cell and moves no belief. It is still indexed, cited and linked below.
The trial behind it
Trials whose registry record cites this paper, or whose number appears in the abstract. A trial that started after this paper was published is citing it as background, not reporting it.
Neither the registry nor the abstract names a trial number. If this is a trial report, that itself is worth knowing.
Who cites it
0 citing papers in PubMed.
No citing paper in PubMed yet.
Corrections and comments
PubMed lists nothing against this paper. Absence here is not a guarantee, only a check that was made.
Authors and funding
1 author.
Funding
No grant is acknowledged in the PubMed record.
Abstract
Accurate prediction of user actions is essential for optimizing digital platform workflows, enabling proactive recommendations, resource prefetching, and intelligent user assistance. Traditional Markov chain-based methods, though widely used for modeling sequential behavior, are fundamentally limited in capturing the complexity, long-range dependencies, and multi-objective nature of real-world user interactions. This paper introduces a multi-task attention-based transformer architecture for sequential API recommendation that addresses these gaps in robustness and generalizability. The core insight is that user behavior on enterprise platforms is driven by latent intent: users with different goals—such as executing a machine learning pipeline, conducting data analysis, managing user accounts, or generating quick visualizations—exhibit systematically different sequential patterns across functional API categories. Our framework exploits this structure through a shared transformer encoder backbone that produces a unified representation of the user’s action history, which is then decoded by three task-specific prediction heads operating simultaneously. The primary head predicts the next API action from a probability distribution over all available endpoints; an auxiliary goal classification head infers the user’s underlying session objective from the observed action sequence alone; and a session boundary detection head estimates the probability that the user is about to conclude their session. During inference, only the sequence of prior API calls is required as input—the model jointly infers what the user will do next, what they are trying to accomplish, and whether they are about to leave, all from the observed behavioral trace. Leveraging a large-scale simulated behavioral dataset encompassing 2, 000 user sessions and 20, 000 API calls across 100 APIs organized into 10 functional categories, with 4 distinct session goal types governing workflow-specific transition patterns, our model demonstrates strong performance across all tasks. The primary API prediction task achieves [Formula: see text] top-1 accuracy and [Formula: see text] top-5 hit rate, representing a [Formula: see text] improvement over a first-order Markov chain baseline. Auxiliary tasks further validate the framework’s effectiveness, with goal prediction reaching [Formula: see text] accuracy and session-end detection achieving [Formula: see text] accuracy. To ensure full reproducibility, we release an open-source Python package, context-engineer, available on PyPI, that enables researchers and practitioners to regenerate the experimental dataset, reproduce all reported results, and—critically—apply the same multi-task transformer pipeline to their own user log data by mapping proprietary action sequences and session labels into the framework’s integer-encoded input format. Our approach not only advances prediction accuracy over conventional sequential methods but also establishes a new, reproducible benchmark for modeling multi-objective sequential user behavior on digital platforms, with direct applicability to any enterprise environment where user actions can be represented as ordered sequences of discrete events.
Identifiers
What OpenQuestion holds
Registered trials
Read under generation 80e0d062 · epoch 390. Bibliography from PubMed, PubMed Central and OpenAlex; grants from NIH RePORTER; trial links from ClinicalTrials.gov; estimates, votes and beliefs from the OpenQuestion graph.