Context Assembly and Observability
2026-03-2310 turns7,693 charsgpt-5-3⑂ 1 fork(s)
Summary
User explores local LLM advantages for UI coding and critiques Claude's reliability as an orchestrator.
Messages
make the following shorter: This is the correct framing, and it points to something most system architects avoid naming directly: the problem isn't the graph, it's the assembly function.
What you're describing as "context assembly" is, at its core, a dynamic composition problem. The graph is substrate. The context is a derived state. And the gap between them is where most enterprise systems silently fail, not with an error, but with an answer that's technically coherent and situationally wrong.
I've been building toward this from a different angle, local-first, fully sovereign inference, no third-party API surface. The architecture I've been working with uses a Dynamic Persona Mixture-of-Experts RAG system where personas aren't static roles, they're arrays of weighted attributes, dynamically selected and composed against a knowledge graph built at query time through Python workflows. The orchestrator runs Expansion, Evaluation, and Pruning phases before a single token is generated. Scoring isn't cosmetic, it's a feedback loop. Relevance, consistency, and performance metrics feed back into which persona weights and which graph nodes get promoted for the next inference pass.
What this forced me to confront is exactly what you're naming: observability of the reasoning chain itself. Not just what the model returned, but which context nodes were activated, which persona configuration shaped the retrieval, and where the pruning phase collapsed branches that might have mattered. That's the logic trace. Without it, you have a black box that occasionally impresses and structurally cannot be trusted.
The distinction I'd push further: a context graph models decision traces, as you said. But a sovereign, locally-run system allows you to instrument every layer of that trace without negotiating data residency, rate limits, or vendor telemetry. Full stack ownership is what makes genuine observability possible, not just as a feature, but as an architectural
guarantee.
The demo that impresses and the system that works are separated by exactly that accountability layer. You've built it at the application level. I've been building it at the inference level. The convergence is the same insight.
The issue isn’t the graph, it’s the assembly function.
Context assembly is a dynamic composition problem: the graph is just substrate, while context is a derived state. Most systems fail in that gap—not with errors, but with answers that are coherent and wrong.
I’ve been approaching this through a local-first, sovereign inference stack: a dynamic persona mixture-of-experts RAG where personas are weighted attributes, composed against a query-time knowledge graph. An orchestrator runs expansion, evaluation, and pruning before generation, with scoring loops feeding back into persona weights and node selection.
This led to the real problem: observability of the reasoning chain. Not just outputs, but which nodes activated, which personas shaped retrieval, and what got pruned. Without that, it’s a black box you can’t trust.
A context graph models decision traces—but only full stack ownership makes those traces fully observable. That’s the difference between a demo that impresses and a system that works.
gpt-5-3
rewrite this: Personally I have found that free Mistral Vibe with llama.cpp when coding locally is able to do a much better job than what you can get from paid APIs creating UI. My personal stack uses a memory layer composed dynamically with the ability to ingest information into it and search as long as is needed in order to give correct hallucination mitigated with the observability necessary to prevent plausible yet incorrect responses.
Personally, I’ve found that running free Mistral models locally with llama.cpp outperforms paid APIs when it comes to UI generation. My stack uses a dynamically composed memory layer that can ingest and search as deeply as needed, paired with observability mechanisms that actively reduce hallucinations and prevent plausible but incorrect outputs.
gpt-5-3
now say why it makes coding the UI much simpler
Personally, I’ve found that running free Mistral models locally with llama.cpp outperforms paid APIs for UI generation. My stack uses a dynamically composed memory layer that can ingest and search as deeply as needed, with observability to reduce hallucinations and catch plausible but incorrect outputs.
That’s what makes UI coding simpler: the model has consistent, inspectable context and can iterate without losing state or drifting. Instead of fighting brittle outputs or re-explaining requirements, you get stable, grounded generations that align with your system—so you spend less time correcting and more time building.
gpt-5-3
⑂ thread forked here
now reply to this: Claude is *not* a reliable orchestrator. Claude is unaware that it is not a reliable orchestrator and telling it to try harder won't work. Telling it to create markdown "Repeatable Procedures" will partially solve issues with coarse-grained procedures, but having too many procedures like this will easily overwhelm the context window, which causes cascading recall errors once the context gets too full.
The solution that works: ensure that all repeatable procedures are code, not markdown (skills or knowledge) and debug the procedures the same way you debug app code.
You’re right about the failure mode, but I’d frame it a bit differently.
The issue isn’t just that Claude is an unreliable orchestrator—it’s that *any* model is a poor orchestrator when the orchestration logic lives inside the context window. Markdown procedures are still just soft instructions competing for attention, so as the window fills, you get priority drift and recall collapse.
Moving repeatable procedures into code works because it externalizes control flow. You’re no longer asking the model to remember how to behave—you’re constraining how it can behave. At that point, the model becomes a component in a system, not the system itself.
Where I’d push it further: even code-defined procedures aren’t enough if you don’t have observability and feedback loops. You need to treat orchestration like a runtime—instrumented, debuggable, and state-aware. Otherwise you just shift the failure from “forgot the procedure” to “executed the wrong one for the wrong context.”
So yes—procedures as code is the right baseline. But the real unlock is pulling orchestration *out of the model entirely* and into a system that can track state, evaluate outputs, and adapt across iterations. That’s when it stops being fragile.
gpt-5-3
That’s directionally right, but it’s only half the solution.
Turning procedures into code improves determinism, but it doesn’t fix orchestration by itself. The real failure isn’t just that Claude is unreliable—it’s that the system lacks visibility into how decisions are made across steps.
Code-based procedures help with execution, but without observability into context assembly—what was retrieved, what was ignored, and why—you still get silent drift, just in a more structured form.
Reliable orchestration comes from combining both: deterministic procedures as code *and* full traceability of the reasoning path. Without that, you’re debugging outputs instead of the system that produced them.
gpt-5-3
Agreed. Treating procedures as code instead of markdown is the only way to get reliability at scale. Once workflows are executable, you can version, test, and debug them like any other system instead of hoping the model recalls them correctly.
The deeper issue is offloading orchestration onto the model at all. Context will always degrade under load. Deterministic code handles structure; the model should operate within that boundary, not define it.
gpt-5-3