Career
Roadmap: From Software Engineer to AI Application Engineer
Detailed roadmap for developers who want to move towards AI. From Prompt Engineering, RAG, Agents to Production — what to learn, what to use, what to do.
19/02/2026 · 12 min read · Lê Huy Thái
Hello everyone — AI is so hot now, leading to a sharp increase in the need to build AI integrated systems, new positions and technologies appear continuously. Every day I hear all kinds of terms like Agent, RAG, Tools, Flow, Context... but don't understand specifically what they are. This article summarizes a practical roadmap for developers who want to switch to AI Application Engineer.
If experts feel lacking or have advice, please let us know; If you find this roadmap useful, please feel free to refer to it.
Imagine: You are currently using LLM as a single Chatbot. To become an AI Dev, you need to turn it into a Thinking and Acting Operating System.
The overall picture
Before going into the learning path, let's look at architecture. An AI application is more than just User → Prompt → LLM → Response. It's much more complicated:
| Ingredient | Role | Technology |
|---|---|---|
| The brain | Language processing, reasoning | GPT-4, Claude, Llama... |
| Long-term memory | Store knowledge base | Vector Database (RAG) |
| Short-term memory | Manage conversations | Context management |
| Hands and feet | Call API, access DB, surf the web | Agents, Function Calling |
| Nerves | Connect it all | LangChain, LlamaIndex |
- 01Stage 1 — Brain Control (LLM Control & Interface)
Make sure the Input is standard and the Output can be used in the code (not junk text).
- 02Stage 2 — External Data Feed (RAG)
AI answers based on your own data: PDF files, company database.
- 03Phase 3 — Stream Coordination (Orchestration & Memory)
Build a complex chat application that remembers conversations.
- 04Phase 4 — Agents (self-acting AI)
AI not only "talks", but also "does" — using Tools to perform real actions.
- 05Phase 5 — Production & LLMOps
Runs stably, optimizes costs, and knows where it goes wrong to fix it.
Stage 1: Control "Brain" (LLM Control & Interface)
Goal: Ensure standard Input and Usable Output in code.
Prompt Engineering & In-Context Learning
What is this? Not a writing sample. A technique of designing input (prompt) so that the AI understands the context, role and format without having to retrain the model.
Learning for what? To minimize AI incorrect answers ("hallucination") and increase accuracy for logical reasoning tasks.
- Zero-shot — direct question, no examples
- Few-shot — include 2–3 sample examples before the question
- Chain-of-Thought — tells the AI to "think about each step" before responding
A prompt to accurately classify customer emails: "This is a complaint email, urgency: High, handling direction: Transfer to Tech team".
Structured Output (JSON Mode & Zod)
What is this? Forces the AI to return data strictly following a predetermined JSON Schema, instead of returning free text.
Libraries to learn: Zod (validate schema), Vercel AI SDK (generateObject), OpenAI Function Calling.
// Dùng Zod + Vercel AI SDK để extract thông tin có cấu trúc
import { generateObject } from "ai";
import { z } from "zod";
const schema = z.object({
name: z.string(),
skills: z.array(z.string()),
exp: z.number(),
});
const result = await generateObject({
model: openai("gpt-4o"),
schema,
prompt: "Extract info: Nam, 5 năm kinh nghiệm React và Node",
});
// -> { name: "Nam", skills: ["React", "Node"], exp: 5 }
Phase 2: Load external data (RAG - Retrieval Augmented Generation)
Goal: AI answers based on your own data (PDF File, Company Database).
Embeddings & Vector Space
What is this? Technique to turn text into a list of numbers (Vector). Sentences with the same meaning will have vectors close to each other in mathematical space.
Learning for what? So that the computer can understand "semantics". Searching for the keyword "Dog" will not yield "Woof", but searching for Vector will see that they are related.
How to get started: Learn the concept of Cosine Similarity, then call OpenAI's embeddings API to see what the live output looks like.
// Ví dụ output của embedding
const vector = await getVector("Quả táo");
// -> [0.012, -0.231, 0.88, ...] (1536 dimensions)
Materials: DeepLearning.AI — Course on Embeddings.
Vector Databases (Memory storage)
What is this? A specialized type of Database to store and query vectors extremely quickly, performing Semantic Search (search by meaning) instead of LIKE '%keyword%' in SQL.
| Vector DB | Type | Fits |
|---|---|---|
| pgvector | Extension Postgres | Already using Postgres, want quick integration |
| Pinecone | SaaS (Cloud) | If you want to be quick, don't manage infra |
| ChromaDB | Local / Self-hosted | Prototype, running locally |
| Supabase Vector | SaaS + pgvector | Web Dev, the friendliest |
Query: "Find paragraphs about sick leave policies." DB returns the 3 most relevant text segments from the Human Resources PDF file — even though the text does not contain the exact keyword.
Chunking & Ingestion Strategy
What is this? Strategy to cut large data (100 page PDF file) into small pieces (chunks) to load into Vector DB.
Popular chunk size: 500–1000 tokens. Overlap: 10–20%. Most common slicing technique: RecursiveCharacterTextSplitter. If the cut is too long: wastes memory, interferes with information. If cut too short: context is lost.
Libraries: LangChain.js (document loaders), LlamaIndex.TS (specializes in data processing)
Completed pipeline example: Upload PDF file → Auto-shred → Create embedding → Save to Vector DB → Ready to chat.
Phase 3: Stream Coordination (Orchestration & Memory)
Goal: Build a complex chat application that can remember conversations.
Conversation Memory Management
What is this? Mechanism to save and reload chat history with each new request sent to LLM.
Study for what? LLM is Stateless — there is no state. You have to manage yourself when including "What the user said before", especially when the history is too long and overflows the Context Window.
| Strategy | How it works | Trade-off |
|---|---|---|
| Sliding Window | Keep only the N newest messages | Simple, but loses old context |
| Summary | Use AI to summarize old news | Keep the main idea, spend more API calls |
| Hybrid | Combine both | Best but more complicated |
Libraries: LangGraph (Checkpointer to save state), Redis (save chat session).
Chatbot asks: "What is your name?", User: "My name is Huy". 10 questions later User asks: "What is my name?", Chatbot: "Your name is Huy".
Chains & Routing
What is this? Connect sequential or branch processing steps based on input content.
Learning for what? Handling complex logic — for example, if User asks about Code → call Cheap Model, good code; If asking about Literature → call a better literary model.
Simple routing example:
- User sends Input
- Router categorizes questions
- If about Code → call Code Model
- If about Literature → call Writing Model
LangChain Expression Language (LCEL) supports declarative routing, but native code is often easier to debug when the logic is complex. It is not necessary to use a framework if the logic is simple enough.
Example output: A single API endpoint multitasks: translating, summarizing, and extracting data depending on the input.
Phase 4: Agents (AI that acts on its own)
Goal: AI not only "talks", but also "does" (using Tools).
Tool Calling (Function Calling)
What is this? You describe the function sendEmail(to, body) to AI. The AI will return JSON telling you: "Run the function sendEmail with this parameter...". Your code executes that function and returns the result.
Important tip: Write the description for each tool carefully — AI reads this to understand when and how to use the tool.
// Khai báo Tool cho AI
const tools = [{
type: "function",
function: {
name: "sendEmail",
description: "Gửi email cho một người dùng",
parameters: {
type: "object",
properties: {
to: { type: "string", description: "Địa chỉ email người nhận" },
body: { type: "string", description: "Nội dung email cần gửi" },
},
required: ["to", "body"],
},
},
}];
Documents: OpenAI Function Calling guide.
User: "Send email to boss asking for leave". The AI automatically calls the function to send an email with the leave request content prepared in a formal style.
ReAct Pattern (Reason + Act)
What is this? A thinking loop: Thinking → Deciding to use Tool → Waiting for results → Observing → Thinking again. Repeat until you get the final answer.
Learning for what? Solving math problems requires multiple steps — for example, "Find the price of a plane ticket, then compare it to my budget." AI must first find tickets, have prices, and then compare.
- 01Reason
Analyze the problem, determine the missing information and what to do next.
- 02Act
Decide which tool to call (search, read_file, call_api...) and with what parameters.
- 03Observe (Observe)
Read the results returned from the tool. This result will be put into context in the next thinking step.
- 04Conclusion (Answer)
Reply to the user if you have enough information — or go back to step 1 if more data is needed.
Framework: LangGraph — the most powerful framework for Agents today, gradually replacing the old LangChain Agent.
Example output: A market research agent: Search Google, read the top 5 websites, synthesize information and write a markdown report — all automatically.
Phase 5: Production & LLMOps (Put into practice)
Goal: Run stably, cheaply, and know where it goes wrong.
Evaluation (Evals)
What is this? Unit Test for AI. How do you know if after editing the prompt, the AI will answer less than before?
Learning for what? Ensuring product quality before release — like CI/CD but for language quality.
How to learn:
- Create a "Golden Dataset" — a set of questions and standard answers that you moderate manually.
- Use "LLM-as-a-Judge" — use GPT-4 to score the smaller model's answer according to predetermined criteria.
Libraries: LangSmith, PromptFoo (very suitable for Developers).
A report in the CI/CD pipeline: "This PR reduces chatbot accuracy by 5% — block merge".
Tracing & Observability
What is this? Logs all of the AI's "Thinking" — every inference step, every tool call, every parameter used.
Learning for what? When the AI answers incorrectly, you need to see what context it received, what tool it called, and what the parameters were. console.log is completely inadequate.
| Tools | Type | Highlights |
|---|---|---|
| LangSmith | SaaS | Integrates well with LangChain/LangGraph |
| Arize Phoenix | Open-source | Self-hosted, intuitive UI |
| Helicone | SaaS | Proxy-based, easy to integrate with any stack |
Example output: Dashboard displays: User A encountered an error → click to see that AI searched Google for the wrong keyword → fix prompt and you're done.
Summary: 5-stage picture
You don't need to learn everything to get started. Just complete Phase 1 to be able to build a basic AI application. Each subsequent stage will help you solve more complex problems — learn as much as you can, build as you go.