Large Language Models (LLMs) are powerful yet prone to generating factual errors, commonly referred to as hallucinations. We present a lightweight, interpretable framework for knowledge-aware self-correction of LLM outputs using structured memory graphs based on RDF triples. Without retraining or fine-tuning, our method post-processes model outputs and corrects factual inconsistencies via external semantic memory. We demonstrate the approach using DistilGPT-2 and show promising results on simple factual prompts.
翻译:大型语言模型(LLM)虽功能强大,却易产生事实性错误,通常称为“幻觉”。本文提出一种轻量级、可解释的框架,利用基于RDF三元组的结构化记忆图实现LLM输出的知识感知自校正。该方法无需重新训练或微调,通过外部语义记忆对模型输出进行后处理,以修正事实不一致性。我们以DistilGPT-2为例展示了该方法的有效性,并在简单事实性提示任务中取得了良好效果。