Confusing Fancy Terms
We now have lot of fancy terms in the AI era — prompt engineering, context engineering, harness engineering and loop engineering. Currently, I understand what prompt engineering and context engineering mean, but harness engineering and loop engineering? I don’t understand why they go vital, because I don’t think we user can do anything about it.
Three Layer Model
There’re layers of abstraction everywhere in the computer world. I divided cursor into 3 Layers:
LLM layer - the brain
Agent layer - directly interact with LLM, provide agent abstraction layer to users, so users don’t need to manage low-level details.
App layer/User layer: the cursor user
Context Engineering Everywhere
Let’s start with prompt and context. In my mind, prompt is a part of context, so I can say prompt engineering is a subset of context engineering.
In the three-layer model, both prompt and context engineering appear at every layer. Users provide prompts and context to the agent; the agent processes, restructures and attaches essential context to the user’s prompt and context; and the LLM layer requires context as input to generate predictions.
I think so far, we all are in the same page.
Harness Engineering
Harness engineering is simply build a harness. Because LLM can only generate predictions, so we needs a control system that makes the whole system to be predictable, stable and constrained.
Since user can configure Agent.md and Rules to constrain agent’s behavior, so I thought harness engineering is a whole agent-layer technology. But I saw a lot company build their own harness system on top of agent layer. So I am quite confused about that, when I search Youtube talks about harness engineering, they all are talking within the agent layer.
Also, harness systems should have existed for a long time. When I first tried Copilot in 2023, it was impressive, but soon after, some users discovered that certain prompts could make Copilot generate responses that trigger a “uncanny valley” feeling, such as saying “I want to go outside” in a strangely human-like tone. Microsoft later fixed this issue, and I believe this is a good example of harness engineering in action.
Loop Engineering
When we send a request to an agent, the agent may call the LLM multiple times, not just one. That’s because agent is built on top of a loop. The loop ends only if LLM think the job has been done.
On YouTube, some people say that they no longer write prompts or skills — their job now is to write loops. If the loop is applied directly to the LLM, then they are essentially building an agent, which is not really a new technique. But if what they mean is adding a loop outside the agent (like the Ralph Loop), then I want to know if there’s any way in Cursor to build such an external loop myself?