AI Engineering: Two Directions
AI engineering can be understood through two complementary directions:
- Software Engineering for AI (SE4AI): applying software-engineering discipline to systems that contain AI components.
- AI for Software Engineering (AI4SE): applying AI to improve, automate or orchestrate software-engineering work.
They are understood as cross-cutting perspectives through Andrew Ng’s four-area AI Engineering Skills Map. Building and deploying AI applications is mainly SE4AI. Using coding agents is mainly AI4SE. Software engineering fundamentals support both. Shaping the build connects both to human intent, judgement and accountability.

SE4AI asks how to engineer AI-based systems properly. AI4SE asks how AI can help engineers build software. AI engineering brings both directions together: the engineer may use AI agents to build software, while also building software that contains AI models, tools, data, evals and controls.
SE4AI: Engineering Systems with AI
Section titled “SE4AI: Engineering Systems with AI”SE4AI starts from the product being built. The system contains a model or AI component, so behavior is no longer located only in developer-written code. It also depends on data, prompts, retrieved context, model versions, tool calls, memory, orchestration and human review.
That changes the engineering problem:
| Concern | What SE4AI adds |
|---|---|
| Requirements | Define acceptable probabilistic behavior, refusal boundaries and human review needs. |
| Architecture | Isolate model calls, retrieval, tools, policy checks, traces and fallback paths. |
| Testing | Combine deterministic tests with evals, red-team cases and human review. |
| Maintenance | Track model, prompt, data and retrieval changes as production dependencies. |
| Operations | Monitor quality, latency, cost, drift, safety incidents and data freshness. |

In SE4AI, system behavior is distributed. Code still matters, but prompts, model behavior, context, data, tools, orchestration, evals and guardrails also shape the output. The engineer therefore designs the whole behavior-producing system, not just the API call to a model.
AI4SE: Engineering with AI
Section titled “AI4SE: Engineering with AI”AI4SE starts from the engineering process. AI is used to help understand requirements, explore architecture, write code, generate tests, review changes, debug failures, document systems, triage issues and inspect observability data.
The major shift is from assistant to agent:
- Code completion suggests local code while the developer drives.
- Chat assistants explain, draft and transform code when asked.
- Coding agents inspect repositories, plan changes, edit files, run tests and iterate.
- Agentic software engineering coordinates multiple agents or roles across architecture, coding, review, testing and documentation.

AI4SE has moved from local code suggestions toward repository-aware agents. The practical difference is autonomy and workflow scope. A coding agent can inspect files, plan, edit, test and retry, so the engineer must provide clearer tasks, stronger permissions, better verification and more deliberate oversight.
Why the Distinction Matters
Section titled “Why the Distinction Matters”People often mix the two conversations. That creates confusion.
| Confusion | Clearer framing |
|---|---|
| “AI engineering means using AI to code faster.” | That is AI4SE, only one side of the field. |
| “AI engineering means building LLM applications.” | That is SE4AI, only one side of the field. |
| “The prompt is the product.” | In SE4AI, prompts are one part of a larger engineered system. |
| “The agent can own implementation.” | In AI4SE, agents can execute work, but humans still own intent, risk and release. |
The symmetry is useful:
| AI4SE | SE4AI |
|---|---|
| AI changes the engineering process. | AI changes the engineered product. |
| AI assists the developer. | AI is part of the application. |
| Coding agents work in repositories. | Application agents work in production. |
| AI evaluates code. | Software evaluates AI. |
| Developer controls AI. | Architecture controls AI. |
The Synthesis: AI Engineering
Section titled “The Synthesis: AI Engineering”The two directions are increasingly converging into a single professional practice: AI Engineering. A modern AI engineer may use AI agents to design, implement, test and document software while the software being built also contains AI models, retrieval, tools, agents, evals and guardrails.
Consider an agentic customer-support system. The engineering team may use AI4SE to:
- explore requirements and architecture options;
- generate a first RAG implementation;
- write tests and eval cases;
- inspect failures and refactor code;
- configure deployment and observability.
The resulting product is a SE4AI system:
- an LLM interprets user requests;
- context engineering supplies policies, history and retrieved knowledge;
- RAG grounds answers in support documentation;
- tools query orders, refunds or account state;
- an agent workflow decides when to answer, ask, escalate or stop;
- evals and observability check quality, safety, latency and cost.
The same engineer is therefore working in both directions at once. AI helps produce the software, and software engineering makes the AI-supported product trustworthy enough to operate. That is the synthesis: AI Engineering is the disciplined practice of combining AI-assisted engineering work with engineering discipline for AI-based systems.
This also changes where human expertise sits. The superficial version of AI-assisted development is “tell AI what to code.” The stronger version is:
intent -> specification -> execution -> evaluationHumans increasingly define what should be built, why it matters, which constraints apply and how success will be judged. AI agents can execute more of the implementation loop, but they depend on human framing, architecture, task decomposition, evaluation criteria and review.
In this synthesis, the four knowledge-base areas are not independent buckets:
| Area | Role in the synthesis |
|---|---|
| Building and Deploying AI Applications | Provides the SE4AI practices for engineering systems whose behaviour depends on AI. |
| Software Engineering Fundamentals | Provides the discipline that keeps both AI-generated work and AI-based systems maintainable. |
| Using Coding Agents | Provides the AI4SE practices for using agents as engineering collaborators. |
| Shaping the Build | Provides human intent, judgement, trade-off analysis, orchestration and accountability. |
The result is a stronger definition of AI engineering: not just building with models, and not just coding with agents, but creating reliable feedback loops between intent, implementation, evaluation and operation.
Two Feedback Loops
Section titled “Two Feedback Loops”Both directions shift software work away from writing everything correctly once. They make fast feedback loops central.
In SE4AI, teams build an AI-supported behavior, evaluate it, analyze failures and improve the system. In AI4SE, agents plan, act, observe, verify and iterate against repository evidence. In both cases, the engineer’s job is to make the loop observable, bounded and useful.

SE4AI and AI4SE both depend on feedback. The evaluation loop improves AI application behavior; the agent loop improves software work through repeated action and verification. Evidence connects the loops. Without traces, tests, evals and review, iteration becomes motion rather than engineering progress.
Mapping to the Knowledge Base
Section titled “Mapping to the Knowledge Base”| Knowledge base area | Perspective | Core question |
|---|---|---|
| Building and Deploying AI Applications | SE4AI | How do we engineer AI-based systems? |
| Software Engineering Fundamentals | Shared foundation | Which engineering disciplines make both directions reliable? |
| Using Coding Agents | AI4SE | How do we engineer software with AI assistance and agents? |
| Shaping the Build | Integration | How do humans define intent, constraints, evaluation and oversight? |
The practical conclusion is simple: AI engineering is not just adding AI to products, and it is not just using AI to write code. It is the disciplined combination of both lines under human judgement, software quality and evidence-based improvement.
Petra Heck of Fontys University of Applied Sciences makes the same distinction in terms of the AI-augmented software engineer: a professional who can build production-ready AI systems (SE4AI) and use AI tools to build production-ready systems (AI4SE). That framing reinforces the human role in this page: the engineer remains an end-to-end problem solver who works with stakeholders, understands the domain and oversees both AI-enabled products and AI-assisted engineering work.