WorksComputer Science
An Interactive GraphRAG Workspace for Reifying, Auditing, and Steering Conversational AI Memories
Abstract
Conversational Large Language Models (LLMs) are widely employed in software engineering for code generation, debugging, and architectural design. However, as developers engage in multi-session development tasks, technical knowledge becomes siloed in isolated, linear chat histories. Reusing context across sessions leads to three critical challenges: (1) flat-vector retrieval fails to traverse multi-hop relational dependencies between distant architectural decisions; (2) temporal drift in software packages and APIs results in silent context poisoning when reusing aged dialogue logs; and (3) raw conversation concatenation induces prompt bloat and attention degradation. We present CognitiveCanvas, an interactive tool that transforms conversational AI memories from ephemeral text logs into persistent, manipulable, and audited knowledge objects. CognitiveCanvas integrates: (1) a Hierarchical Semantic Fact-Graph (HSFG) that distills dialogues into Goal, Fact, and Code artifacts, achieving a 92.2% token reduction while enabling multi-hop GraphRAG traversal; (2) a Continuous Temporal Drift Auditor coupling 60+ regex heuristics with live calendar-anchored LLM verification for 1-click self-correction; and (3) a Spatial-Symbolic Prompt Compiler (SSPC) that translates 2D direct manipulation gestures (Voronoi clustering, node resizing, synthesis edges) directly into structured attention directives
Introduction
Modern software development increasingly relies on conversational Large Language Models (LLMs) to accelerate implementation, debug complex stack traces, and explore architectural trade-offs [1], [2]. However, current commercial interfaces (e.g., ChatGPT, Claude, Gemini) remain fundamentally bound to the ephemeral linear session paradigm [3]. Each conversation operates as an isolated silo. When developers attempt to transfer insights formulated during prior problem-solving sessions (such as custom database pooling logic or token validation middleware) into a new task, they encounter three structural bottlenecks:
Context Fragmentation across Siloed Sessions: Knowledge generated across multiple sessions is scattered across unsearchable chat sidebars, forcing developers into tedious copy-pasting and repetitive prompt re-framing.
Silent Context Poisoning via Temporal Drift: Software libraries, APIs, and framework conventions mutate rapidly [9], [10]. When reusing conversational context saved months earlier, LLMs blindly accept obsolete configurations and deprecated syntax, producing confident code hallucinations [7], [8].
Lack of Spatial Steerability: Standard Retrieval-Augmented Generation (RAG) frameworks [4], [5] inject text chunks invisibly into system prompts without providing developers visual inspection or steering mechanisms to control which constraints the model emphasizes.
To bridge the gap between conversational LLM assistance and cumulative software engineering workflows, we present COGNITIVECANVAS. COGNITIVECANVAS reifies conversational memory into an interactive 2D workspace, externalizing context onto a manipulable canvas while underpinning generation with a property-graph neuro-symbolic backend. The tool demonstration showcases three major contributions:
Hierarchical Semantic Fact-Graph (HSFG) & GraphRAG: We decompose conversational sessions into structured Goal vectors, Fact triples, and exact Code state artifacts, slashing prompt token overhead by 92.2% while enabling multi-hop associative traversal across distant development sessions.
Continuous Temporal Drift Auditor: We implement a dual-stage auditing pipeline (60+ fast regex heuristics + calendar-anchored LLM verifier) that proactively flags stale technical context with a
Stalebadge and enables 1-click self-correction.
Spatial-Symbolic Prompt Compiler (SSPC): We formulate a mathematical compiler that translates direct visual gestures (node surface area resizing, centroid proximity, and synthesis edge links) into machine-interpretable prompt attention tiers (
HIGHLIGHT,GROUP,OBSCURE).
Tool Overview and Architecture
COGNITIVECANVAS coordinates an interactive direct manipulation frontend with an asynchronous orchestration controller and a neuro-symbolic hybrid data store (Figure 1).

Figure 1. System architecture and operational workflow of COGNITIVECANVAS. The interactive 2D sensemaking canvas captures developer manipulation gestures, processed by the asynchronous orchestration controller via the Spatial-Symbolic Prompt Compiler (SSPC) and Continuous Temporal Drift Auditor, supported by a hybrid neuro-symbolic data store.
Developer Sensemaking Interface
The frontend provides an expansive 2D visual canvas built with hardware-accelerated SVG rendering. Developers organize past conversation episodes represented as visual cards. The interface supports continuous pan-and-zoom, interactive node resizing, and real-time Delaunay/Voronoi thematic partitioning that groups related technical concepts into colored visual territories with an active cluster legend. A dedicated Document Inspector allows developers to review multi-turn session transcripts and extract individual subturn pairs via vertical square handles. An integrated chat interface features sentence-level Natural Language Inference (NLI) confidence heatmaps and bidirectional citation badges (e.g., [[1_0]]) that visually illuminate the corresponding memory node on the canvas upon hover.
Hierarchical Semantic Fact-Graph (HSFG) Distillation
Rather than storing verbose, conversational pleasantries or collapsed lossy summaries, COGNITIVECANVAS decomposes each ingested session into a tripartite entity:
where represents the developer’s goal and active blockers; comprises formal entity-relationship fact triples (e.g., (:FastAPI)-[:USES]->(:AsyncSession)); and stores verbatim, executable code artifacts (schemas, API routes, configurations) preserved with 100% token syntax fidelity.
As demonstrated in our formal compression benchmarks, a representative 10-turn debugging dialogue containing 5,210 raw tokens is distilled into:
achieving a 92.2% token reduction while maintaining exact code reproducibility.
Continuous Temporal Drift Auditor
To prevent context poisoning, COGNITIVECANVAS monitors technical memories using a domain-calibrated hazard function:
where , is a 90-day grace period, and is the drift probability. The auditing engine operates in two stages:
Stage 1 (High-Speed Regex Screening): Evaluates 60+ precompiled patterns for semantic versioning (
v\d+\.\d+), deprecation keywords (deprecated, sunset, breaking changes), and temporal markers (currently, as of). Executes in ms at zero token cost.Stage 2 (LLM-as-a-Judge Verification): If Stage 1 triggers, the model is queried with current calendar
grounding . If verified as outdated, the memory is flagged with a Stale badge, accompanied by the deprecation rationale and a 1-click self-correction button that refactors the code to modern conventions and updates the knowledge graph in place.
Spatial-Symbolic Prompt Compiler (SSPC)
The SSPC bridges visual canvas manipulation with LLM attention mechanics. For each active memory card , the compiler calculates an importance weight :
where , is the Euclidean distance to the canvas centroid , and is the count of incident semantic edges. Memories are compiled into explicit prompt directives:
HIGHLIGHT_CONTEXT(): Injected as a dominant architectural constraint.STANDARD_CONTEXT(): Standard grounding context.OBSCURE_CONTEXT(): Background nuance only.GROUP_CONTEXT(Edge-connected nodes): Enforces cohesive cross-memory synthesis in shared response sentences.
An Illustrating Usage Scenario
We illustrate the utility of COGNITIVECANVAS in a realistic full-stack software refactoring scenario (Figure 2).

Figure 2. COGNITIVECANVAS workflow: (1) Past conversations are ingested and distilled; (2) Cards are arranged on a 2D canvas; (3) The Auditor flags obsolete libraries for 1-click update; (4) Grounded generation compiles attention directives.
Scenario Context. A software engineer is tasked with implementing an asynchronous data pipeline combining database pooling, JWT authentication middleware, and background queues.
Step 1: Multi-Session Ingestion & Organization. The developer imports historical problem-solving chats: Session A (PostgreSQL async pooling) and Session B (JWT token validation). The ingestion engine distills them into HSFG structures, rendering them as interactive cards on the 2D canvas grouped by Voronoi semantic clusters.
Step 2: Direct Manipulation & Spatial Steering. The developer identifies that database pooling in Session A is the critical bottleneck. Using the canvas, the developer enlarges Node @1_0 to 2.2× its baseline area, automatically promoting it to HIGHLIGHT_CONTEXT. Next, the developer connects Node @1_0 to JWT card Node @1_1 with a directed semantic synthesis edge labeled [Synthesize].
Step 3: Proactive Temporal Auditing & 1-Click Update. Upon inspecting Node @1_0, the Auditor detects an outdated configuration pattern: pydantic.BaseSettings, deprecated in Pydantic v2. The card displays a prominent Stale badge. The developer clicks “Update to Latest”, triggering COGNITIVECANVAS to refactor the configuration class, clear the warning, and update the Neo4j concept graph in place.
Step 4: Grounded Generation & Bidirectional Trust. In the chat interface, the developer submits: “Refactor our streaming service incorporating @1_0 and @1_1.” The system detects the active synthesis edge and generates a unified prompt instruction enforcing cohesive integration. The response renders with emerald NLI underlines indicating verified grounding, accompanied by clickable citation badges ([[1_0]]) that project a radial glow ring onto the canvas card on hover.
Validation and Evidence
Empirical Validation with Practitioners
To assess the effectiveness of COGNITIVECANVAS, we conducted a controlled within-subject laboratory study with 24 software practitioners (12 full-stack engineers, 6 researchers, 6 system designers; aged 22–38) across three realistic knowledge tasks: full-stack architecture refactoring, scientific synthesis, and logistic planning.
We evaluated three conditions in a Latin square counterbalanced design: (1) Commercial Baseline (linear multi-turn chat with search history); (2) Flat-Vector RAG (dense passage retrieval without graph traversal or auditing); and (3) COGNITIVECANVAS (our full proposed system).
As summarized in Table I, COGNITIVECANVAS reduced temporal hallucinations from 28.7% to 4.2% (), decreased cognitive workload (NASA-TLX) from 68.4 to 32.6 (), and accelerated task completion time to 13.8 minutes (a 34.9% speedup over flat RAG).
| Metric | Commercial | Flat RAG | COGNITIVECANVAS |
| Token Overhead (10 Pairs) | 5,210 | 2,140 | 405 (−92.2%) |
| Multi-Hop Recall@3 | 38.4% | 52.1% | 89.6% (+37.5%) |
| Temporal Hallucinations | 31.2% | 28.7% | 4.2% (−85.4%) |
| Citation Faithfulness | 54.0% | 66.8% | 94.3% (+27.5%) |
| Task Time (Minutes) | 28.4 | 21.2 | 13.8 (−34.9%) |
| NASA-TLX Workload (/100) | 68.4 | 54.2 | 32.6 (−41.3%) |
| UMUX-Lite Usability (/100) | 61.5 | 72.8 | 88.4 (+15.6) |
Table I. Empirical Performance Comparison Across Conditions
Limitations
Current limitations include: (1) Stage 2 temporal verification latency (600–1200 ms); and (2) lack of direct visual AST rendering inside cards. Background pre-auditing and embedded syntax highlighting represent active future work.
Availability
COGNITIVECANVAS is open-source and publicly available for research and industrial practice.
Reproduction Guide: The repository contains seeded demo datasets allowing practitioners to reproduce the refactoring scenarios described in this paper.
Conclusion and Future Work
In this paper, we presented COGNITIVECANVAS, an interactive GraphRAG workspace that reifies conversational AI memories into persistent, steerable, and temporally audited visual objects. By bridging 2D spatial direct manipulation
with neuro-symbolic retrieval, COGNITIVECANVAS resolves the fundamental bottlenecks of context silos, temporal hallucinations, and token bloat. In our user study (), the tool slashed temporal hallucinations by 85.4% and reduced developer cognitive workload by 41.3%. Future work includes multi-developer collaborative sensemaking canvases and multimodal reification for system architecture diagrams.
References
References
- [1]M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. de Oliveira Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman et al., “Evaluating large language models trained on code,” arXiv preprint arXiv:2107.03374, 2021.
- [2]J. Liu, C. S. Xia, Y. Wang, and L. Zhang, “Is your code generated by ChatGPT really correct? Rigorous evaluation of large language models for code generation,” in Advances in Neural Information Processing Systems (NeurIPS), vol. 36, 2023.
- [3]N. F. Liu, K. Lin, J. Hewitt, A. Paranjape, M. Bevilacqua, F. Petroni, and P. Liang, “Lost in the middle: How language models use long contexts,” Transactions of the Association for Computational Linguistics (TACL), vol. 12, pp. 157–173, 2024.arxiv.org/abs/2307.03172
- [4]V. Karpukhin, B. Oguz, S. Min, P. Lewis, L. Wu, S. Edunov, D. Chen, and W.-t. Yih, “Dense passage retrieval for open-domain question answering,” in Proc. Conf. Empirical Methods in Natural Language Processing (EMNLP), 2020, pp. 6769–6781.arxiv.org/abs/2004.04906
- [5]P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W.-t. Yih, T. Rocktäschel et al., “Retrieval-augmented generation for knowledge-intensive NLP tasks,” in Advances in Neural Information Processing Systems (NeurIPS), vol. 33, 2020, pp. 9459–9474.arxiv.org/abs/2005.11401
- [7]Z. Ji, N. Lee, R. Frieske, T. Yu, D. Su, Y. Xu, E. Ishii, Y. J. Bang, A. Madotto, and P. Fung, “Survey of hallucination in natural language generation,” ACM Computing Surveys, vol. 55, no. 12, pp. 1–38, 2023.DOI
- [8]R. Pan, A. R. Ibrahimzada, R. Krishna, D. Sankar, L. P. Wassı, M. Merler, B. Sobolev, R. Pavuluri, S. Sinha, and J. Sabbarvand, “Lost in translation: A study of bugs introduced by large language models while translating code,” in Proc. IEEE/ACM 46th Int. Conf. Software Engineering (ICSE), 2024, pp. 1–13.
- [9]Z. Zhang, Y. Wang, C. Wang, J. Chen, and Z. Zheng, “LLM hallucinations in practical code generation: Phenomena, mechanism, and mitigation,” Proc. ACM Softw. Eng. (ISSTA), vol. 2, pp. 1–25, 2025.arxiv.org/abs/2409.20550
- [10]J. Spracklen, R. Wijewickrama, A. H. M. N. Sakib, A. Maiti, B. Viswanath, and M. Jadliwala, “We have a package for you! A comprehensive analysis of package hallucinations by code generating LLMs,” in Proc. 34th USENIX Security Symposium, 2025.arxiv.org/abs/2406.10279