{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigvzy4bc5mmmfainovnz7g2xjldd6df7kgit2nyxlgdplwas3khie",
    "uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mjphb64ss3a2"
  },
  "path": "/t/making-local-llms-more-reliable-with-a-deterministic-context-compiler/174368#post_2",
  "publishedAt": "2026-04-17T15:51:23.000Z",
  "site": "https://discuss.huggingface.co",
  "tags": [
    "TypeScript port"
  ],
  "textContent": "Update: pushed this further and added integration examples (OpenWebUI + LiteLLM).\n\nOne thing that stood out is that “do Y instead of X” breaks much more often than just “don’t do X”.\n\nExample:\n\nUser: use pytest\nUser: use unittest instead of pytest\n\nWithout a state layer → models often keep using pytest or mix both\nWith it → pytest is removed and unittest is enforced deterministically\n\nSo it’s not just about constraints drifting out of context — it’s that corrections don’t reliably replace earlier instructions when everything lives in the prompt.\n\nAlso experimented with mapping natural language into explicit directives first (heuristic + LLM fallback), which helps pick up more constraints without losing determinism.\n\nAlso working on a TypeScript port with feature parity with the Python version.",
  "title": "Making local LLMs more reliable with a deterministic “context compiler”"
}