惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
WordPress大学
WordPress大学
博客园 - 【当耐特】
The Cloudflare Blog
B
Blog
Last Week in AI
Last Week in AI
小众软件
小众软件
量子位
S
SegmentFault 最新的问题
V
Visual Studio Blog
博客园 - 叶小钗
美团技术团队
阮一峰的网络日志
阮一峰的网络日志
Hugging Face - Blog
Hugging Face - Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
宝玉的分享
宝玉的分享
A
About on SuperTechFans
雷峰网
雷峰网
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Martin Fowler
Martin Fowler

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I built a visual LLM canvas where every branch has its ow...
ContextTree · 2026-05-02 · via DEV Community

ContextTree

The problem I kept hitting

Every time I went deep on a topic with ChatGPT, one tangent would
poison the whole thread. You ask a follow-up question, and suddenly
your entire conversation context is contaminated with an irrelevant
detour. The LLM loses the plot.

The standard workaround? Open a new chat. Paste context manually.
Repeat. That's not a solution, that's giving up.

I wanted branches — real ones. Not tabs. Not separate threads you
manage yourself. Branches that inherit the right context automatically
and stay isolated from each other.

So I built ContextTree.

What it does

ContextTree is a node-based visual canvas for LLM conversations.
Every message is a node. Branching is a first-class action, not a
workaround.

The core invariant: a child node only inherits its direct parent
lineage — never siblings, never cousins.
No cross-contamination.

But the feature that surprised me most during development is what
each node carries independently:

  • Its own LLM model (GPT-4o on one branch, Gemini Flash on another)
  • Its own custom system prompt (scoped to that node and its children)
  • Its own advanced settings: temperature, max output tokens, history mode, last K messages, context budget in tokens, external context chunk count

This means on one canvas you can have a general assistant node, fork
into a strict legal-persona branch with a lawyer system prompt and
tight context budget, then fork again into a summarizer with low
temperature. Three personalities, zero interference, one visual graph.


The hardest design decision: context inheritance

The honest rule in the codebase:

A child node never reads parent live state — no shared LangGraph
state, no reads of the parent's current summary after the fork
moment. Each node evolves independently.

However, ancestry-scoped vector search lets a child retrieve
relevant snippets from any ancestor's history, capped at the
fork point. Branches inherit knowledge, not state.

This distinction took a while to nail. "Knowledge not state" is the
mental model that made the architecture clean. If you want hard
isolation, set SIMILAR_CONTEXT_LIMIT=0 per node.


What I'm still figuring out

  • Prompt stack order — should users be able to reorder layers?
  • Is per-node system prompt enough, or do people want per-node RAG sources pinned differently?
  • The multi-LLM branching UX — is it obvious enough what's happening?

Try it

Demo:CONTEXTTREE
Video walkthrough: https://youtu.be/AqmICcc26VI

Built solo. Early stage. Brutal feedback welcome — especially from
anyone who's built multi-agent or prompt engineering tooling.