Natural Language Programming: Rethinking Language, Memory, and Cognition in the Era of Generative AI

Giovanni Adorni, Daniele GrossoarXiv 2026

TL;DR

This paper proposes a shift from Natural Language Processing (NLP) to Natural Language Programming (NLPg), viewing language not just as data to be processed, but as an executable medium for human-AI reasoning. The authors introduce the concept of Dialogic Working Memory, framing prompts as externalized cognitive scaffolds that allow humans and AI to co-construct complex workflows and maintain long-term coherence.

What Problem Does This Paper Address?

For decades, the field of NLP has treated language as an object of computation—something to be parsed, translated, or classified. However, the rise of Large Language Models (LLMs) has fundamentally changed how we interact with machines. We no longer just give a command and receive an output; we engage in iterative, multi-turn dialogues to solve problems.

The authors argue that our current theoretical frameworks are lagging behind this reality. We lack a formal way to describe how prompting acts as a form of "cognitive programming" and how conversational history functions as a distributed memory system between the human mind and the AI. The paper seeks to bridge this gap by integrating theories from cognitive science—like the "Extended Mind" and "Distributed Cognition"—into the world of generative AI.

Methods

This is a theoretical and epistemological paper that synthesizes existing cognitive theories with modern AI architectures. The authors propose a new conceptual framework, NLPg, characterized by:

  1. Cognitive Orchestration: Shifting the focus from linguistic analysis to the regulation of reasoning workflows.
  2. Dialogic Working Memory: A model where prompts and conversation states act as temporary external memory structures.
  3. Architecture Mapping: The authors map three specific memory architectures—BTMA (Biomorphic Temporal Memory), SKGE (Semantic Knowledge Graph Extension), and RMR (Re-consolidative Metacognitive Architecture)—into a unified "dialogic memory injection pipeline."
Figure 1: Dialogic memory injection pipeline for NLPg. Episodic, semantic, and metacognitive layers are assembled into a conversational state supporting long-horizon cognitive continuity before generation, supporting long-horizon conversational coherence and contextual reconstruction before generation.

As shown in Figure 1, this pipeline illustrates how a user query is filtered through metacognitive, semantic, and episodic layers to assemble a "Dialogic Working Memory State" before the LLM generates a response.

Datasets

Not discussed in the paper. As a theoretical framework paper, it does not perform empirical testing on specific datasets or introduce new benchmarks.

Key Insights and Ideas

The core of the paper lies in the distinction between traditional NLP and the proposed NLPg paradigm. The authors provide a clear breakdown of this shift:

Table 1 From Natural Language Processing to Natural Language Programming
  • Prompts as Cognitive Artefacts: Instead of seeing a prompt as a simple instruction, NLPg views it as a "cognitive scaffold." It externalizes our goals, assumptions, and intermediate reasoning steps, reducing the cognitive load on the human brain.
  • Memory as Reconstruction, Not Storage: In NLPg, memory isn't just a database of past text. It is a dynamic process of "re-consolidation" where past interactions are summarized and reinterpreted to maintain coherence over long conversations.
  • Metacognitive Scaffolding: Prompting becomes a way to "debug" our own thinking. By seeing our reasoning reflected in the AI's output, we can monitor, evaluate, and revise our strategies—a process known as metacognition.
  • The "Conversational Turn": The authors suggest we are entering a "post-interface" era where the distinction between the user, the interface, and the execution of code begins to blur into a single linguistic substrate.

Key Results

The paper’s primary result is the formalization of the NLPg framework. Qualitatively, it provides a roadmap for moving toward "Cognitive Mediation Infrastructures"—AI systems designed not just to generate text, but to actively support and stabilize human reasoning.

The authors argue that by viewing prompting through the lens of Dialogic Working Memory, developers can build systems that are better at:

  • Maintaining long-horizon consistency.
  • Supporting complex, multi-step problem-solving.
  • Providing "traceability" in reasoning, which helps mitigate issues like AI hallucinations by making the steps of a thought process visible and revisable.

Limitations and Future Work

The authors acknowledge that their framework is primarily theoretical. While it draws on ongoing experimental work in educational environments and memory architectures, it lacks formal mathematical modeling and large-scale experimental validation.

Future directions include: * Empirical Validation: Testing the Dialogic Working Memory model in real-world human-AI interaction studies. * AI Literacy: Exploring how NLPg might lead to "over-reliance" on AI scaffolds and how to design systems that preserve human agency and critical thinking. * Cyber Humanities: Investigating how this shift changes our cultural understanding of knowledge mediation and education in the age of GenAI.

Summary updated

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.
BibTeX
@misc{adorni2026natural,
  author = {Giovanni Adorni and Daniele Grosso},
  title = {{Natural Language Programming: Rethinking Language, Memory, and Cognition in the Era of Generative AI}},
  year = {2026},
  eprint = {2611.23106},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.23106},
}
Figure