cd /news/large-language-models/rambling-thoughts-on-llm-consistency… · home › topics › large-language-models › article
[ARTICLE · art-182993] src=news.ycombinator.com ↗ pub= topic=large-language-models verified=true sentiment=· neutral

Rambling thoughts on LLM consistency and harness inflexibility

A Hacker News post argues that LLM output cannot be relied on unchecked because models drift semantically across long sequences of steps, and proposes harness-level fixes: injecting scoped semantic rules into context assembly by parsing files into an AST to locate target nodes, and running output through a custom parser or linter that rejects failing code before application and forces the model to iterate. The author contends that syntax is trained in because communities agree on it, while opinionated structural rules such as cyclomatic-complexity limits or strict function-identifier grammars must be enforced by the harness, and calls for harnesses to become pluggable platforms with tailored context assembly and output verification as first-class user-configurable features. The post had 1 point and 0 comments on Hacker News.

recommendation

Inject scoped semantic rules into context via AST-located nodes and reject LLM output through a custom linter before applying it, forcing the model to iterate until opinionated structural checks pass.

more in playbook: Working with AI coding agents
by read3 min views9 publishedDec 6, 2026

ive been thinking about llm's struggle to stay consistent and follow nuanced instructions over time due to swiss cheese memory degradation over sequences of steps / prompts... the solution in my mind is harness-driven... which i think is a mainstream thought at this point... though current solutions are still shallow and primitive... we need something more granular, precise, semantic, targeted, efficient, and reliable... i think there are two dimensions to this... semantic alignment and structural / mechanical adherence... for semantic alignment its hard to write deterministic tests to validate conformance post-hoc... semantics seems only somewhat verifiable via ml / ai and even then the lack of 100% yay or nay is problematic at scale or on critical work...

meaning the best way to keep the llm on track is injecting semantic rules / guidance via the harness during context assembly... the harness parses files into an ast under the hood to deterministically locate target nodes and run checks, while still feeding the llm the normal raw text file we are used to digesting... say i prompt my harness to modify some function... that target node sits inside nested scopes (project, directory, file, content-node) plus orthogonal scopes like file-kind and node-kind that cut across those altitudes... we can inject rules into the raw text reflecting that scope hierarchy... function naming rules go right next to the target function, file rules near the top of the file, project rules just above that etc... though writing this i realize this works for existing code, while new yet-to-exist content still has holes to solve... hmmm... anyway thats a rough outline to minimize semantic drift efficiently and deterministically, even if output verification still lacks a deterministic silver bullet...

the second dimension is structural / mechanical / syntactic conformance... this half can be leaned on and trusted much more because structure and mechanics can be deterministically measured... we run output pre-application through our own parser / linter embodying our rules... for basic syntax this is probably overkill since models rarely output malformed syntax anymore... valid syntax is a shared cultural agreement beyond any single app... the real value of pre-application verification is enforcing opinionated structure... like minimizing cyclomatic complexity or forcing function identifiers to match a strict grammar... if a check fails our threshold, the harness rejects the output before application and forces the llm to iterate until it passes... and with our scoped architecture we can attach these checks at any granular level...

there are definitely blindspots in my thoughts above... though the core problem is hard to refute... everyone using llms with standard harnesses hits this, especially nuanced semantic drift... syntax gets trained in because communities agree on it, whereas our opinions are what partition us into unique problem solvers... by its very nature, general-purpose llm output cant be relied on unchecked... we have to stay on top of every input and output to bound variance... regardless of whether you agree with my specifics, harnesses need to become pluggable platforms with tailored context assembly and output verification as first-class user-configurable features... this post is less about my specific semantic or mechanical mechanisms and more about keeping llm output contained within acceptable deviation as defined by its pilot...

Comments URL: [https://news.ycombinator.com/item?id=50785957](https://news.ycombinator.com/item?id=50785957)

Points: 1

── more in #large-language-models 4 stories · sorted by recency
── more on @hacker news 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/rambling-thoughts-on…] indexed:0 read:3min 2026-12-06 · —