인지기초: 단순화된 BASIC 스타일 인지 제어 언어

Reading time: 5 minute
...

📝 Abstract

Cognitive BASIC is a minimal, BASIC-style prompting language and in-model interpreter that structures large language model (LLM) reasoning into explicit, stepwise execution traces. Inspired by the simplicity of retro BASIC, we repurpose numbered lines and simple commands as an interpretable cognitive control layer. Modern LLMs can reliably simulate such short programs, enabling transparent multi-step reasoning inside the model. A natural-language interpreter file specifies command semantics, memory updates, and logging behavior. Our mental-model interpreter extracts declarative and procedural knowledge, detects contradictions, and produces resolutions when necessary. A comparison across three LLMs on a benchmark of knowledge extraction, conflict detection, and reasoning tasks shows that all models can execute Cognitive BASIC programs, with overall strong but not uniform performance.

💡 Analysis

Cognitive BASIC is a minimal, BASIC-style prompting language and in-model interpreter that structures large language model (LLM) reasoning into explicit, stepwise execution traces. Inspired by the simplicity of retro BASIC, we repurpose numbered lines and simple commands as an interpretable cognitive control layer. Modern LLMs can reliably simulate such short programs, enabling transparent multi-step reasoning inside the model. A natural-language interpreter file specifies command semantics, memory updates, and logging behavior. Our mental-model interpreter extracts declarative and procedural knowledge, detects contradictions, and produces resolutions when necessary. A comparison across three LLMs on a benchmark of knowledge extraction, conflict detection, and reasoning tasks shows that all models can execute Cognitive BASIC programs, with overall strong but not uniform performance.

📄 Content

Cognitive BASIC: An In-Model Interpreted Reasoning Language for LLMs Oliver Kramer Computational Intelligence Group University of Oldenburg, Germany oliver.kramer@uni-oldenburg.de Abstract. Cognitive BASIC is a minimal, BASIC-style prompting language and in-model interpreter that structures large language model (LLM) reasoning into explicit, stepwise execution traces. Inspired by the simplicity of retro BASIC, we repurpose numbered lines and simple com- mands as an interpretable cognitive control layer. Modern LLMs can reliably simulate such short programs, enabling transparent multi-step reasoning inside the model. A natural-language interpreter file specifies command semantics, memory updates, and logging behavior. Our mental- model interpreter extracts declarative and procedural knowledge, detects contradictions, and produces resolutions when necessary. A comparison across three LLMs on a benchmark of knowledge extraction, conflict de- tection, and reasoning tasks shows that all models can execute Cognitive BASIC programs, with overall strong but not uniform performance. 1 Introduction Recent work on cognitive prompting [1] has shown that LLMs can be guided to- ward more reliable reasoning when prompts explicitly reflect cognitive processes such as goal decomposition, declarative and procedural knowledge extraction, or conflict handling. These approaches move beyond unstructured text generation by imposing cognitive orientation on the reasoning steps themselves. However, they still rely on implicit execution: the model decides how to follow the in- structions, and intermediate cognitive states remain informal and difficult to audit. Cognitive BASIC takes the next step in this direction by enforcing struc- tured reasoning through a minimal in-model programming language. Instead of describing reasoning procedures at the prompt level, Cognitive BASIC executes them through a BASIC-style, line-numbered program interpreted entirely by the LLM. An interpreter file, written in natural language, defines the semantics of each command, the memory manipulation rules, and the logging behavior. Pro- grams operate on a compact working memory containing declarative knowledge (what is known), procedural knowledge (how to act or reason), detected con- tradictions, and reconciled resolutions. Each instruction updates this memory state explicitly, producing a transparent, auditable reasoning trace. This design connects two traditions: the transparency aims of cognitive prompting, and the explicit control flow of early programming languages such as BASIC [2]. While prior prompting frameworks, such as Chain-of-Thought [3], ReAct [4], or modular cognitive prompts [1], encourage structured steps, they arXiv:2511.16837v1 [cs.AI] 20 Nov 2025 lack an executable semantics. Classical cognitive architectures including ACT- R [5] and SOAR [6] separate declarative and procedural memory under sym- bolic control, and recent agentic systems such as OpenCog Hyperon [7] or MemGPT [8] offer persistent memory for extended reasoning. Yet these ap- proaches rely on external engines or customized environments. 2 Cognitive BASIC Language and Interpreter Cognitive BASIC adopts the simplicity of early BASIC to structure reasoning inside a language model. Programs consist of short, numbered lines executed sequentially unless redirected by control flow. The interpreter, defined entirely in natural language, runs within the model and updates a compact memory state after each instruction. 2.1 Execution Model The interpreter follows deterministic BASIC-style semantics [2]. Lines execute in ascending order, with conditional branching through IF … THEN or direct jumps using GOTO . After each command, the interpreter applies the operation to the current memory, prints a concise log entry, and proceeds to the next instruction. Execution terminates on END, producing a final structured memory state that summarizes all reasoning steps. 2.2 Memory Schema Cognitive BASIC maintains a compact memory structure that serves as the model’s internal mental model during program execution. The variable working stores the current scenario text or intermediate content and acts as a short-term buffer for each instruction. The fields declarative and procedural represent the two central forms of cognitive knowledge: factual propositions describing what is true, and operational rules describing how to act or reason. Together, they provide the basic components of a structured mental model. Contradictions discovered during execution are recorded in conflicts as simple string pairs of the form “A || B”, making cognitive inconsistencies explicit rather than implicit. When a conflict is repaired, the resulting reconciled state- ment is stored in resolution, documenting how the mental model was updated. 2.3 Instruction Set Cognitive BASIC provides a small but expressive set of BASIC-style commands that operate entirely within the model to control reasoning and memor

This content is AI-processed based on ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut