Quick answer: Forward deployed engineering means solving one customer's problem with working software inside that customer's daily work. This tutorial shows the process: ask questions, define success, look at data, build a simple version, add AI with checks, find trusted information, test, deploy and hand over. You need basic Python, and each step includes an example.
This forward deployed engineering tutorial follows one small client project from the first meeting to handover. You will not just call an AI model. You will decide what to build, check the data, make a safe first version and prove whether it works.
The client is made up: a college hostel office. About 40 repair messages arrive each day. Staff read each one and pass it to the right team. Some urgent messages are missed. That is a small problem, but it has most of what a forward deployed engineer meets at work.
What you need before you start
Forward deployed engineering for beginners does not mean "no coding". You need:
- Python functions, lists, dictionaries and loops
- A basic idea of JSON, which is a text format for data
- A computer with Python 3
- A little patience for unclear requests
Most code here uses only Python's built-in tools. The API step near the end needs FastAPI. If the Python feels hard, solve our Python basics problems first.
Note: To understand the job and career before the code, read the forward deployed engineer course guide. This page teaches the working process.
Forward deployed engineering tutorial: the nine-step map
| Step | Main question | What you produce |
|---|---|---|
| 1 | What is the real problem? | Interview notes |
| 2 | What counts as success? | One-page brief |
| 3 | What does the data look like? | Clean sample data |
| 4 | What is the simplest useful tool? | Rule-based version |
| 5 | Where can AI help safely? | Checked model output |
| 6 | Where is trusted information? | Search with sources |
| 7 | Does it work? | Test score and error list |
| 8 | Can people use it? | A running API |
| 9 | Can others keep it working? | Handover guide |
Follow the order. If you start at step 5, you may build a smart answer to the wrong problem.
Steps 1 and 2: Understand the work
Step 1: Ask before building
The hostel manager says, "We need an AI chatbot." Do not agree or disagree yet. Ask:
- What happens today when a message comes in?
- Which messages are handled badly?
- How do you decide that something is urgent?
- Who reads the result, and on what device?
- What private details are in the messages?
- What should still be decided by a person?
After a 20-minute talk, you learn that students can already send messages easily. The slow part is sorting them. Electrical sparks are the biggest worry. So the office does not need a chatbot. It needs help with sorting and a fast warning for dangerous repairs.
That change of direction is one of the best forward deployed engineering examples to remember. The first request was about a tool. The real need was about time and safety.
Step 2: Write a short brief
Keep it short enough that the manager will read it:
| Part | Our brief |
|---|---|
| User | Two hostel office staff |
| Problem | Messages wait too long and some urgent ones are missed |
| First version | Suggest a team and mark possible danger |
| Not included | Sending workers or closing repairs automatically |
| Success | At least 90% correct teams on 50 checked messages; every danger case in the test is marked |
| Safety | Staff confirm every suggestion |
| Data | No student names or phone numbers in test messages |
The "not included" row protects both sides. It also lets you finish something small. Write down who agreed to the success rule and when.
Pro tip: Read the brief back and ask, "If we deliver only this, will your work be better?" If the answer is no, fix the brief before you code.
Steps 3 and 4: Check the data and build a simple version
Step 3: Look at the data
Ask for a small sample with private details removed. Here are four messages. One was sent twice, with a different capital letter and an extra space.
REPORTS = [
{"id": 1, "text": "Fan not working in room 204"},
{"id": 2, "text": "No water in second floor bathroom"},
{"id": 3, "text": "Sparks from switch board near room 110!!"},
{"id": 4, "text": "fan not working in room 204 "},
]
def clean(text):
return " ".join(text.lower().split())
seen = set()
unique = []
for report in REPORTS:
key = clean(report["text"])
if key not in seen:
seen.add(key)
unique.append(report)
print(len(REPORTS), "received,", len(unique), "unique")
# 4 received, 3 unique
split() removes extra spaces and lower() makes the case match. The set remembers messages already seen.
Now stop and ask the client a question. Are these really duplicates? Two students may report the same fan, or the same fan may fail again next month. A real tool would also use the date. Only the client can decide that rule.
Step 4: Build the simplest useful version
Start with words and rules. Rules are cheap, quick and easy to explain. They also give you a baseline, which is a first score to beat. Save this as triage.py. Triage means sorting by type and urgency.
import re
TEAM_WORDS = {
"electrical": {"fan", "light", "switch", "sparks"},
"plumbing": {"water", "tap", "leak", "bathroom"},
}
DANGER_WORDS = {"sparks", "shock", "fire", "flood"}
def triage(text):
words = set(re.findall(r"[a-z]+", text.lower()))
team = "other"
for name, known_words in TEAM_WORDS.items():
if words & known_words:
team = name
break
urgent = bool(words & DANGER_WORDS)
return {"team": team, "urgent": urgent}
if __name__ == "__main__":
print(triage("Fan not working in room 204"))
# {'team': 'electrical', 'urgent': False}
print(triage("Sparks from switch board near room 110!!"))
# {'team': 'electrical', 'urgent': True}
The & sign finds words present in both sets. Taking whole words avoids a common bug: a plain text search would find light inside slight.
Show this version to the client. You may learn that some messages come in Telugu script and all go to "other", because the rules only know English words. It is better to learn that now.
Steps 5 and 6: Add AI and trusted information
Step 5: Add AI with checks
Rules miss new wording. A model can handle more ways of saying the same thing, but it may return a wrong or broken answer. Treat its reply as a suggestion from outside your system.
First, write a narrow prompt. Give the allowed teams, say what counts as urgent and ask only for JSON. Keep your instructions separate from the student's message. The message may contain text that tries to change the instructions.
Then check the reply. The function below uses fixed sample replies so you can learn the checking part without an API key.
import json
ALLOWED_TEAMS = {"electrical", "plumbing", "other"}
def check_reply(reply):
needs_review = {"team": "other", "urgent": True, "review": True}
try:
data = json.loads(reply)
except json.JSONDecodeError:
return needs_review
valid = (
isinstance(data, dict)
and isinstance(data.get("team"), str)
and data["team"] in ALLOWED_TEAMS
and isinstance(data.get("urgent"), bool)
)
if not valid:
return needs_review
return {"team": data["team"], "urgent": data["urgent"], "review": False}
good = '{"team": "plumbing", "urgent": false}'
bad = '{"team": "magic", "urgent": false}'
print(check_reply(good))
# {'team': 'plumbing', 'urgent': False, 'review': False}
print(check_reply(bad))
# {'team': 'other', 'urgent': True, 'review': True}
A bad reply is marked urgent and sent for a closer look. In this project, an extra check is safer than a missed spark. Another client may choose a different safe path. review: False only means the format was fine. Staff still confirm every suggestion, as our brief says.
To use a real model, send the prompt and message through your provider's API and pass the returned text to check_reply. Set a time limit, keep the key in an environment variable and record failures without private details.
Common mistake: Thinking valid JSON means a correct answer. JSON only proves the shape. A perfectly formed reply can still send a water leak to the electrical team.
Step 6: Find trusted information
The manager now asks for help text with each repair. Do not let the model invent it. Search approved notes and show which note was used.
import re
NOTES = {
"electric-safety": "Sparks or shock: keep away and call the electrician",
"water-supply": "No water: check the floor valve and call the plumber",
"furniture": "Broken bed or chair: record the room and take a photo",
}
def word_set(text):
return set(re.findall(r"[a-z]+", text.lower()))
def find_note(question):
wanted = word_set(question)
scored = []
for name, text in NOTES.items():
scored.append((len(wanted & word_set(text)), name))
score, name = max(scored)
return name if score >= 2 else None
print(find_note("Sparks near the switch, risk of shock"))
# electric-safety
print(find_note("My chair is loose"))
# None
The first question shares sparks, the and shock with the safety note, so it scores three. The chair question shares only chair, so the result is None.
That second result is useful: a weak match should not be shown as fact. The first result shows a flaw: the should not count. Removing common words may improve the search. So may embeddings, which are lists of numbers that represent meaning. Try a change and measure it.
The full pattern, where a model answers from notes you found, is called retrieval-augmented generation, or RAG. Always show the note name so the user can check the source.
Steps 7 to 9: Test, release and hand over
Step 7: Test before showing a score
Write examples with the right answer. Include easy, odd and dangerous messages. Here is a tiny test for the rule-based triage function.
from triage import triage
TESTS = [
("Fan not working in room 204", "electrical"),
("No water in second floor bathroom", "plumbing"),
("Sparks from switch board", "electrical"),
("Door lock broken in room 118", "other"),
("Tube is flickering in study hall", "electrical"),
]
passed = 0
for text, expected in TESTS:
got = triage(text)["team"]
if got == expected:
passed += 1
else:
print("FAIL:", text, "| got", got)
print(f"Score: {passed}/{len(TESTS)} = {passed / len(TESTS):.0%}")
Output:
FAIL: Tube is flickering in study hall | got other
Score: 4/5 = 80%
The rule does not know tube. Add the word and run all tests again. Also test the AI version on exactly the same cases.
Five tests are enough to show the method, not enough for a release. Our brief asks for 50 checked messages. Count danger cases separately. A 95% score is not good enough if the missing 5% are all electric shocks.
Useful questions after a test:
- Are failures from one language or one kind of repair?
- Was the correct answer unclear even to staff?
- Did a fix break something that worked before?
- Is the AI version worth its extra cost and delay?
Interview note: If asked about accuracy, give the number, test size and main failures. For example, "43 out of 50, and most mistakes were short messages" is stronger than "it was very accurate." Use only your own true numbers.
Step 8: Turn it into a small service
An API lets the hostel app send a message and get a suggestion. In the same folder as triage.py, create main.py:
from fastapi import FastAPI
from pydantic import BaseModel, Field
from triage import triage
app = FastAPI()
class Report(BaseModel):
text: str = Field(min_length=3, max_length=1000)
@app.get("/health")
def health():
return {"status": "ok"}
@app.post("/triage")
def suggest(report: Report):
result = triage(report.text)
return {**result, "needs_staff_confirmation": True}
Install FastAPI and Uvicorn, then run uvicorn main:app --reload. Open /docs on the local address shown in the terminal to try it. The length rules reject empty and very large messages.
Before real use, add login, HTTPS, limits on requests, error records and tests that run before each release. Try one hostel first. Keep the old process ready so staff can switch back. This is a rollback plan.
Do not store the raw message unless the client needs it. Less stored private data means less to protect.
Step 9: Hand it over and improve it
A project is not finished when the demo ends. Give the office a one-page guide:
| Topic | What to write |
|---|---|
| Purpose | Suggest a repair team and warn about danger |
| Owner | Who changes rules and checks weekly errors |
| Normal use | Staff confirm each suggestion |
| Failure | Use the old manual list if the service is down |
| Data | What is stored, for how long and who can see it |
| Update | Add a test, run all tests, then release |
| Contact | Who responds to an urgent fault |
After one week, compare the waiting time with the old process. Ask staff which suggestions they changed. Watch for missed danger messages. Then choose one improvement, not ten.
How to learn forward deployed engineering after this tutorial
To learn forward deployed engineering well, repeat the full cycle with a real user. Here are three more clients to practise on:
| Client | Vague request | Better first step |
|---|---|---|
| Small shop | "AI for stock" | Find three items that often run out and check their records |
| Coaching office | "A student bot" | Answer ten common questions from approved notes |
| Clinic front desk | "Automate calls" | Sort appointment requests, with staff review and no medical advice |
Then add deeper skills in this order:
- Save the results in a database and read them with SQL.
- Use a real model with structured output.
- Improve search and measure it.
- Add automated tests and safe deployment.
- Present the result to someone who does not code.
For smaller coding tasks, use our FDE practice problems. The FDE roadmap breaks the skills into stages. Use FDE interview questions to check whether you can explain each choice.
Our Forward Deployed AI Engineer programme teaches a longer version over 24 live weeks, for people who already code.
Frequently asked questions
What is forward deployed engineering in simple words?
It is engineering done close to one customer. You learn how they work, build or adapt software for them, put it into use and improve it until it helps.
Can beginners learn forward deployed engineering?
Yes, if they start with Python and basic APIs. A complete beginner should learn programming first. You do not need to know how to train a large AI model.
Is forward deployed engineering only about AI?
No. The customer's process, data, system connections, security and support matter too. Many projects use AI today, but a simple rule is sometimes the better answer.
What project should I build first?
Build a small tool that sorts messages or answers questions from a few trusted documents. Give it a real user, a test set, a safe fallback and a clear way to report errors.
How is this different from building a chatbot demo?
A demo shows that something can work once. Forward deployed engineering must handle real data, errors, privacy, cost and daily users, and must show that the result is useful.
Want the next steps in order? Follow our forward deployed engineer roadmap, or book a free demo class to see how we teach.
