Natural Language Programming: Rethinking Language, Memory, and Cognition in the Era of Generative AI
Organizations: DIBRIS, University of Genoa, Viale F.Causa 13, 16145 Genoa, Italy · DIFI, University of Genoa, Via Dodecaneso 33, 16146 Genoa, Italy
Abstract
Generative Artificial Intelligence is transforming the role of natural language in computational systems. In classical Natural Language Processing (NLP), language was treated as an object of computation: something to analyse, classify, translate, or generate. Large Language Models (LLMs) challenge this perspective, enabling natural language to function increasingly as an executable cognitive medium through which humans structure reasoning, orchestrate problem solving, and regulate hybrid human/AI workflows. This paper introduces Natural Language Programming (NLPg) as a theoretical and epistemological extension of traditional NLP. Rather than focusing on language understanding alone, NLPg conceptualises prompts as dynamic cognitive artefacts that externalise goals, constraints, assumptions, validation criteria, and intermediate reasoning states. Prompting is thus not merely a technical interaction technique, but a form of dialogic cognitive programming operating within distributed human/AI memory architectures. Building on theories of distributed cognition, extended mind, metacognition, and dialogic learning, the paper proposes the notion of Dialogic Working Memory, describing how prompts and conversational states function as temporary external memory structures supporting reasoning continuity and reflective regulation. We further map existing memory architectures (BTMA, SKGE, RMR) onto this framework, illustrating how episodic, semantic, and metacognitive layers support long-horizon conversational coherence. Finally, implications for computational linguistics and AI/mediated knowledge systems are discussed, suggesting a post symbolic and post interface paradigm in which natural language operates simultaneously as communication medium, executable specification, cognitive scaffold, and distributed memory architecture.
Figures & tables
| Natural Language Processing (NLP) | Natural Language Programming (NLPg) |
| Language as object of computation | Language as executable cognitive medium |
| Text as input data | Prompt as cognitive artefact |
| Context as processing parameter | Context as conversational state |
| Output generation | Iterative cognitive regulation |
| Evaluation of final output | Traceability of reasoning process |
| Layer | Component | Function in NLPg | Cognitive analogy |
| Episodic | BTMA | Temporal traces of interaction, decisions, constraints and conversational states | Episodic memory |
| Semantic | SKGE | Typed relations among entities, concepts, artefacts and projects | Semantic memory |
| Metacognitive | RMR | Consistency monitoring and reflective re-consolidation | Executive control |
LLM Prompting
Large language model prompting studies how instructions, examples, context, and formats steer model behavior at inference time.
See all 452 papers