Cognitive BASIC: An In-Model Interpreted Reasoning Language for LLMs

📅 2025-11-20
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the opacity and traceability challenges inherent in large language model (LLM) inference. We propose Cognitive BASIC—a structured, BASIC-inspired reasoning language that introduces a human-interpretable cognitive control layer within LLMs. It employs numbered lines, atomic instructions, and explicit memory operations to enable stepwise, executable thought tracing. Uniquely integrating retro-style procedural programming with natural-language semantic definitions, Cognitive BASIC supports in-prompt explanation-aware execution, dynamic logging, and joint declarative-procedural knowledge extraction. Experimental evaluation across three mainstream LLMs demonstrates substantial improvements in inference transparency and robust performance gains on knowledge extraction, logical conflict detection, and multi-step reasoning tasks. Our approach establishes a novel paradigm for controllable, auditable, and interpretable LLM reasoning—bridging symbolic clarity with neural expressivity while preserving end-to-end differentiability.

Technology Category

Application Category

📝 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.
Problem

Research questions and friction points this paper is trying to address.

Structures LLM reasoning into explicit stepwise execution traces
Extracts declarative and procedural knowledge while detecting contradictions
Enables transparent multi-step reasoning through BASIC-style interpreted language
Innovation

Methods, ideas, or system contributions that make the work stand out.

Minimal BASIC-style language structures LLM reasoning
In-model interpreter enables transparent stepwise execution
Natural-language specification defines command semantics and memory
💼 Related Jobs
No related jobs found.