Abstract
Large language models (LLM), a design model for artificial intelligence (AI), have seen tremendous development in recent years. They have been successfully developed to perform a wide range of natural language processing (NLP) tasks. Like the biological neural networks in the human brain, artificial neural networks are used to develop LLMs. Due to the different mechanisms between LLMs and natural human intentions originating from cognitive processes such as sensation, attention, and perception can differ significantly from the outputs of LLMs. A cognition gap exists between human brains and LLMs. It is important to solve the issues introduced by this discrepancy as AI becomes a larger part of everyday life. To prove it is possible to acquire a more desirable output from LLMs, a cognitive architecture model using the Adaptive Control of Thought-Rational (ACT-R) is developed in this project. Domain specific knowledge is collected, production rules are developed, and ACT-R’s perceptual and memory modules are used to produce a response based on human cognition for the LLM to use in producing a more desirable output. The completed ACT-R model is then validated on 100 cases of defensive programming codes which are generated by the Chat Generative Pre-Trained Transformer (ChatGPT). Experiment results show that the new ACT-R model can analyze the defensive techniques used in Python code and provide effective suggestions to assist ChatGPT, narrowing the cognition gap between human intention and ChatGPT. It is noted that LLM-based AI is a rapidly evolving field, and the proposed ACT-R model dynamically adjusts alongside the cognition gap between human intentions and AI output.