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

TL;DR
Cognitive BASIC introduces a simple, interpretable programming language within LLMs that structures reasoning into explicit steps, enhancing transparency and interpretability of complex reasoning processes.
Contribution
It proposes a minimal, BASIC-style in-model interpreter that enables explicit, stepwise reasoning and knowledge extraction within large language models.
Findings
All tested LLMs can execute Cognitive BASIC programs.
Models show strong performance on reasoning and knowledge tasks.
The approach improves transparency and conflict detection in LLM reasoning.
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques · Parallel Computing and Optimization Techniques · Multimodal Machine Learning Applications
