Agent-Oriented Prompt Composition with Dynamic Prompt Insertion for Autonomous AI Systems
Keywords:
autonomous agents, prompt engineering, dynamic prompt insertion, agent-oriented architecture, large language models, system governance, fairness, sustainabilityAbstract
The rapid maturation of large language models has catalyzed the emergence of autonomous artificial intelligence agents capable of planning, reasoning, and executing complex tasks with minimal human supervision. A central challenge in designing such systems lies in the construction of prompts—the natural language instructions that mediate the interface between an agent’s internal reasoning and the underlying model. Static, handcrafted prompts are ill-suited for the dynamic, context-sensitive demands of autonomous operation, while fully learned prompt representations often lack the interpretability required for safe deployment. This paper introduces the concept of agent-oriented prompt composition with dynamic prompt insertion, a system-level paradigm in which autonomous agents actively assemble their own prompts by selecting and inserting modular prompt components at runtime. We examine the architectural foundations of this paradigm, presenting a layered framework comprising an agent core, a composition engine, a prompt store, and a context injector. Within this architecture, dynamic insertion strategies are analyzed along multiple dimensions, including rule-based triggering, learned selection mechanisms, retrieval-augmented assembly, and scheduling under token budget constraints. The discussion extends to infrastructure implications for cloud and edge deployment, highlighting trade-offs among latency, scalability, and operational cost. Further, we address governance, robustness, and fairness concerns that arise when prompts are dynamically composed by agents, including risks of emergent bias, adversarial prompt injection, and accountability gaps. The sustainability implications of repeatedly invoking auxiliary models for insertion decisions are critically evaluated, connecting system design choices to energy consumption. The paper concludes with a call for interdisciplinary research that bridges systems engineering, machine learning, and policy to govern the next generation of self-prompting autonomous agents.
References
1. Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., ... & Amodei, D. (2020). Language models are few-shot learners. Advances in Neural Information Processing Systems, 33, 1877–1901.
2. Wei, J., Wang, X., Schuurmans, D., Bosma, M., Chi, E., Le, Q., & Zhou, D. (2022). Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35, 24824–24837.
3. Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., Narang, S., Chowdhery, A., & Zhou, D. (2023). Self-consistency improves chain of thought reasoning in language models. International Conference on Learning Representations.
4. Li, X. L., & Liang, P. (2021). Prefix-tuning: Optimizing continuous prompts for generation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics (pp. 4582–4597).
5. Lester, B., Al-Rfou, R., & Constant, N. (2021). The power of scale for parameter-efficient prompt tuning. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing (pp. 3045–3059).
6. Shin, T., Razeghi, Y., Logan IV, R. L., Wallace, E., & Singh, S. (2020). AutoPrompt: Eliciting knowledge from language models with automatically generated prompts. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (pp. 4222–4235).
7. Zhou, C., He, J., Jiang, Y., Zhao, H., Zhang, R., & Wu, W. (2022). Large language models are zero-shot reasoners. Advances in Neural Information Processing Systems, 35, 22199–22213.
8. Park, J. S., O’Brien, J. C., Cai, C. J., Morris, M. R., Liang, P., & Bernstein, M. S. (2023). Generative agents: Interactive simulacra of human behavior. In Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology (pp. 1–12).
9. Xi, Z., Chen, W., Guo, X., He, W., Ding, Y., Hong, B., Zhang, M., Wang, J., Jin, S., Zhou, E., Zheng, R., Fan, X., Gui, T., Zhang, Q., & Huang, X. (2023). The rise and potential of large language model based agents: A survey. arXiv preprint arXiv:2309.07864.
10. Zhu, W., & Tan, M. (2023, December). SPT: Learning to selectively insert prompts for better prompt tuning. In Proceedings of the 2023 conference on empirical methods in natural language processing (pp. 11862-11878).
11. Yao, S., Yu, D., Zhao, J., Shafran, I., Griffiths, T. L., Cao, Y., & Narasimhan, K. (2023). Tree of thoughts: Deliberate problem solving with large language models. Advances in Neural Information Processing Systems, 36, 11809–11822.
12. Patterson, D., Gonzalez, J., Le, Q., Liang, C., Munguia, L.-M., Rothchild, D., ... & Dean, J. (2021). Carbon emissions and large neural network training. arXiv preprint arXiv:2104.10350.
13. Strubell, E., Ganesh, A., & McCallum, A. (2019). Energy and policy considerations for deep learning in NLP. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics (pp. 3645–3650).
14. Mitchell, M., Wu, S., Zaldivar, A., Barnes, P., Vassilev, L., Tretyak, N., ... & Gebru, T. (2019). Model cards for model reporting. In Proceedings of the Conference on Fairness, Accountability, and Transparency (pp. 220–229).
15. Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., & Cao, Y. (2022). ReAct: Synergizing reasoning and acting in language models. International Conference on Learning Representations.
16. Moritz, P., Nishihara, R., Wang, S., Tumanov, A., Liaw, R., Liang, E., ... & Stoica, I. (2018). Ray: A distributed framework for emerging AI applications. In 13th USENIX Symposium on Operating Systems Design and Implementation (pp. 561–577).
17. Liang, P., Bommasani, R., Lee, T., Tsipras, D., Soylu, D., Yasunaga, M., ... & Koreeda, Y. (2022). Holistic evaluation of language models. arXiv preprint arXiv:2211.09110.
18. Bai, Y., Jones, A., Ndousse, K., Askell, A., Chen, A., DasSarma, N., ... & Amodei, D. (2022). Constitutional AI: Harmlessness from AI feedback. arXiv preprint arXiv:2212.08073.
19. Bender, E. M., Gebru, T., McMillan-Major, A., & Shmitchell, S. (2021). On the dangers of stochastic parrots: Can language models be too big? In Proceedings of the 2021 ACM Conference on Fairness, Accountability, and Transparency (pp. 610–623).
20. Liu, P., Yuan, W., Fu, J., Jiang, Z., Hayashi, H., & Neubig, G. (2023). Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Computing Surveys, 55(9), 1–35.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Journal of Data Intelligence and AI Systems

This work is licensed under a Creative Commons Attribution 4.0 International License.
This article is published under the Creative Commons Attribution 4.0 International License (CC BY 4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.