Skip to content
TopicTracker
From HackerNewsView original
TranslationTranslation

Ask HN: Why don't LLM harnesses enable/expose custom middleware hooks?

A user asks why LLM harnesses do not expose custom middleware hooks, wanting to transform structured JSON data into a markdown-decorated prompt at prompt-time without building custom infrastructure around the harness.

Background

Hacker News users are discussing a gap in the tooling ecosystem around Large Language Models (LLMs). The post highlights that popular "harnesses" (frameworks like LangChain, LlamaIndex, or lightweight libraries used to call LLM APIs) do not offer clean, built-in ways to insert custom logic (middleware hooks) between reading input data and generating the final prompt. The author wants, for example, to automatically transform a JSON blob into a markdown-formatted prompt before it reaches the model, without having to build a separate preprocessing pipeline. The comments likely explore why this feature is missing, whether existing projects support it unofficially, and what workarounds exist. The discussion reflects a broader tension in the LLM tooling space: frameworks tend to abstract away complexity but can become rigid when users need fine-grained control over prompt construction.

Related stories