跪拜 Guibai
← All articles
Artificial Intelligence · Frontend · AI Programming

From Prompt to Harness: The Engineering Stack That Tamed LLMs

By 尤水就下 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Shipping an LLM feature is no longer about crafting a clever prompt. The difference between a demo and a production system is the engineering stack — tool integration, standardized interfaces, reusable skills, and operational guardrails — that turns stochastic output into reliable, auditable work.

Summary

The progression from raw prompts to a full Harness is a story of increasing constraints. A bare prompt guesses; prompt engineering adds structure. Tools let the model query the real world, and MCP standardizes how those tools connect. Agents decompose multi-step tasks, while Skills package stable, reusable procedures into simple markdown files. A Harness wraps everything in a production system that handles permissions, failures, logging, and governance.

Each layer solves a specific failure mode of the previous one. Tools fix hallucination for real-time data; MCP fixes tool-sprawl; Agents fix manual step-by-step prompting; Skills fix Agent inconsistency; and Harness fixes the operational chaos of running LLM applications at scale. The model itself is just the brain — the rest is the body that makes it useful.

Underneath the engineering, the model remains a next-token predictor. Its reasoning is an emergent byproduct of being forced to model causal chains and state in training data. Hallucination isn't a bug but a direct consequence of always having to output something, even without a factual basis. Temperature controls the randomness of token selection, and every request resends the full context because the model is stateless.

Takeaways
Pure prompts produce plausible-sounding guesses, not factual judgments, because the model has no access to real-time data or personal context.
Prompt engineering stabilizes output by adding role, task, missing-information checks, constraints, and output format to the input.
Tools give the model the ability to query external systems like weather APIs, shifting it from a conversationalist to a connected system.
MCP (Model Context Protocol) standardizes how tools are discovered, called, and governed, replacing per-tool custom integration with a uniform interface.
Agents decompose a high-level goal into sequenced tool calls and intermediate decisions without the user scripting each step.
Skills encapsulate recurring task workflows — triggers, required info, tool calls, judgment rules, and output format — into a reusable markdown file that is cheaper on tokens and easier to maintain than a giant prompt.
A Harness is the operational layer that manages permissions, failure handling, logging, privacy, and tool orchestration so an LLM application can run in production.
Hallucination is not a model lying; it is the inevitable result of a next-token predictor being forced to generate an answer when it lacks factual grounding.
Temperature controls the randomness of token selection: low values produce deterministic output, high values produce creative but less predictable text.
Every LLM request is stateless, so the full message history, system prompt, tool definitions, and sampling parameters must be resent each time.
Conclusions

The entire prompt-to-Harness evolution is a shift from relying on model intelligence to relying on engineering discipline — each stage constrains the model further to reduce variance.

Skills are effectively prompt engineering packaged as maintainable artifacts, which changes the job from writing one-off prompts to curating a library of tested capabilities.

The observation that a prompt can carry experience but not a lot of experience captures why context windows alone don't solve reliability — selective, structured context beats dumping everything in.

Training a pure code model is a dead end for general assistants because it breaks prompt understanding; the industry has converged on making general models better at code, not code models more general.

AI compresses development time but also compresses demand cycles, so the time saved by automation tends to get consumed by faster turnaround expectations rather than genuine slack.

Concepts & terms
MCP (Model Context Protocol)
A standardized interface layer that lets LLMs discover, call, and interact with external tools through a uniform protocol, replacing bespoke per-tool integrations with a single, governed connection pattern.
Agent
An LLM-based execution unit that decomposes a high-level goal into a sequence of steps — deciding which tools to call, in what order, and how to synthesize results — without the user scripting each action.
Skill
A reusable, packaged capability defined in a markdown file that specifies triggers, required information, tool calls, judgment rules, and output format for a recurring task, making LLM behavior more stable and maintainable than a raw prompt.
Harness
The operational infrastructure layer that hosts an LLM application in production, managing permissions, tool orchestration, failure handling, logging, privacy, and context governance so the system runs safely and audibly.
Temperature
A sampling parameter in LLM generation that controls randomness; low values produce deterministic, conservative output, while high values produce more diverse, creative, and less predictable text.
Hallucination
A failure mode where an LLM generates text that sounds plausible but is factually incorrect, caused by the model's core mechanism of always predicting the next token even when it lacks reliable grounding in its training data.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗