About the Project
Inspiration
branchLM started from a simple pain point in everyday LLM use: ideas are not linear, but chat interfaces are.
When we’re thinking through a problem, we branch, revisit old assumptions, test side paths, and return to the main goal. In a single linear chat, those different modes get mixed together:
- goal-defining context
- exploratory branches
- one-off clarifications
Over time, this hurts response quality because the model has to infer what matters most from one long stream.
Our core belief became:
$$\text{Better outputs} \not\approx \text{more tokens}, \quad \text{Better outputs} \approx \text{better context structure}$$
That led to the vision: redesign LLM interaction as a user-curated thinking graph, not a chronological transcript.
What We Built
We built a graph-native LLM workspace where chats and context are explicit nodes on a canvas.
- Chat nodes for normal conversation threads
- Branch/context edges to pass relevant messages from one chat into another
- Context nodes for uploaded text/files linked to selected chats
- Context preview before generation, showing what will be included/excluded
- Workspace-based graph persistence so users can organize multiple problem spaces
Technically, the stack is:
- Frontend: React + TypeScript + Vite + React Flow (canvas, nodes, edges, interactions)
- Backend: FastAPI services for chats/messages/graph/context planning
- Data: Supabase (workspace, chat, message, edge, and context-node tables)
- LLM layer: server-side generation with context budgeting, message selection, and guardrails
What We Learned
- The real bottleneck is often context representation, not raw context window size.
- Giving users control over relevance is powerful: explicit links beat hidden heuristics.
- Non-linear ideation needs non-linear UI primitives (nodes, edges, selective context injection).
- “Preview before generate” is critical for trust, debugging, and iteration.
- Building AI UX is as much about interaction design as model integration.
Challenges We Faced
- Context selection under budget: deciding what to keep/drop while preserving coherence.
- Source separation: cleanly distinguishing chat history vs branch-injected context.
- Graph + chat synchronization: keeping node/edge state and backend snapshots consistent.
- Document context reliability: handling pending/failed indexing states safely.
- Product scope pressure: balancing broad ideas (graph browser/IDE/agents) with a focused first build.
Related Work That Shaped Our Thinking
Built With
- backboard
- fastapi
- openrouter
- python
- react
- reactflow
- supabase
- typescript
- vite
Log in or sign up for Devpost to join the conversation.