Paper Reading AI Learner

NormCode: A Semi-Formal Language for Context-Isolated AI Planning

2025-12-11 11:50:50
Xin Guan

Abstract

Multistep workflows that chain large language model (LLM) calls suffer from context pollution: as information accumulates across steps, models hallucinate, confuse intermediate outputs, and lose track of task constraints. We present NormCode, a semiformal language for constructing plans of inferences, structured decompositions where each step operates in data isolation and receives only explicitly passed inputs, which eliminates crossstep contamination by design. NormCode enforces a strict separation between semantic operations (LLMdriven reasoning, nondeterministic) and syntactic operations (deterministic data restructuring), enabling precise cost and reliability tracing. The language exists in three isomorphic formats: .ncds for human authoring, .ncd for machine execution, and .ncn for human verification, supporting progressive formalization from sketch to production. We validate NormCode through two demonstrations: (1) a base X addition algorithm achieving 100 percent accuracy on arbitrary length inputs, and (2) self hosted execution of NormCode's own five phase compiler pipeline. The working orchestrator provides dependency driven scheduling, SQLite backed checkpointing, and loop management, making AI workflows auditable by design and addressing a critical need for transparency in high stakes domains such as legal reasoning, medical decision making, and financial analysis.

Abstract (translated)

多步骤的工作流程通过链接大型语言模型(LLM)的调用会受到上下文污染的影响:随着信息在各个步骤中积累,模型会出现幻觉、混淆中间输出,并且会失去对任务约束的记忆。我们提出了一种半形式化语言NormCode,用于构建推理计划,在这种语言中每个步骤都是数据隔离操作并且仅接收显式传递的输入,从而通过设计消除了跨步污染问题。NormCode强制执行语义操作(LLM驱动的推理、非确定性)和句法操作(确定性的数据重构)之间的严格分离,这使得可以进行精确的成本和可靠性追踪。 该语言以三种同构格式存在:.ncds用于人类编写,.ncd供机器执行,以及.ncn供人类验证,支持从草图到生产的渐进式正式化过程。我们通过两个演示来验证NormCode的有效性: 1. 一个基础X加法算法,在任意长度的输入上实现了100%的准确性。 2. 自托管的五阶段编译器管道执行。 该工作流程协调器提供了依赖驱动调度、SQLite后端检查点和循环管理功能,使得AI工作流程设计为可审计,并解决了法律推理、医疗决策和金融分析等高风险领域对透明度的关键需求。

URL

https://arxiv.org/abs/2512.10563

PDF

https://arxiv.org/pdf/2512.10563.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot