Day 1: Starting my AI Engineer journey, and the decision to build only one project
Day one of teaching myself AI engineering: why I dropped the one-project-per-phase plan, committed to a single AI document assistant, and what I learned about tokens, context windows, and temperature.
I'm Tai, a software engineer who mostly builds products. Today I officially started teaching myself to become an AI Engineer, and I decided to learn in public: the code lives in a public repo, assistant-intelligence-learning, and the learning journal lives here, one post per day.
The most important decision: only one project#
My roadmap originally had several phases, each with its own separate project. It looked tidy on paper, but I know myself: pure theory fades fast, and a project that gets abandoned after each phase is barely better than not building it at all.
So I changed the rules:
- The whole journey has exactly one project: an AI document assistant.
- Every topic I learn adds one small piece to that same project, like shipping a real product version by version.
- Practice is not a throwaway experiment script. It is a real feature of the app. Skipping is not an option, because skipping means the app is missing a feature.
What I learned today: tokens, context window, temperature#
The first lesson covered three foundational LLM concepts, and I tried to understand them from a product builder's perspective:
Tokens are the units a model reads and writes in, and also the unit you get billed for. A Vietnamese sentence usually costs more tokens than the same sentence in English. The cost of one model call is not just the user's question: it includes the system prompt, the entire chat history resent every turn, any documents stuffed into the prompt, and the length of the answer.
The context window is the maximum number of tokens a model can see in a single call. This is why chatbots "forget" what was said a hundred turns ago: the start of the conversation has fallen out of the window. If a product needs long-term memory, you have to extract and store the important information yourself instead of hoping the model remembers.
Temperature controls how randomly the model picks the next token. Tasks that need accuracy and repeatability, like data extraction, should use a low temperature around 0.2. Creative tasks, like brainstorming product names, can go up to 0.9.
Practice: the app's first feature actually runs#
The practice for lesson one is built into the app itself: a compare command runs the same text at temperature 0.2 and 0.9, puts the two summaries side by side, and prints the token usage of each call.
python -m app.main compare --file sample.txtInside the app, the temperature goes straight into the request's generation_config sent to Gemini, and the token counts are read from the usage object the API returns after every call:
body = {"model": self.model, "input": prompt}
if temperature is not None:
body["generation_config"] = {"temperature": temperature}
# ... send the request ...
usage = data.get("usage", {})
input_tokens = usage.get("total_input_tokens", 0)
output_tokens = usage.get("total_output_tokens", 0)And here is the actual output of the app, verbatim (the sample text and summaries are in Vietnamese):
--- Temperature 0.2 (ổn định, bám sát gốc) (model: gemini-3.5-flash-lite, temperature: 0.2) ---
Trí tuệ nhân tạo đang thay đổi cách xây dựng phần mềm bằng cách hỗ trợ kỹ sư viết code,
sửa lỗi và xử lý tài liệu, giúp họ chuyển trọng tâm từ công việc lặp lại sang thiết kế
hệ thống và giải quyết bài toán. Tuy nhiên, việc ứng dụng AI cũng đặt ra các thách thức
mới về chi phí, độ trễ, tính chính xác và bảo mật dữ liệu, đòi hỏi kỹ sư phải biết cách
đánh giá, kiểm soát và xây dựng sản phẩm an toàn.
[token] vào: 247, ra: 104, tổng: 351
--- Temperature 0.9 (đa dạng, dễ thêm ý) (model: gemini-3.5-flash-lite, temperature: 0.9) ---
Trí tuệ nhân tạo đang thay đổi cách xây dựng phần mềm bằng cách hỗ trợ viết code, sửa lỗi
và xử lý tài liệu, giúp kỹ sư chuyển trọng tâm từ công việc lặp lại sang thiết kế hệ thống
và kiểm chứng chất lượng. Tuy nhiên, việc ứng dụng AI cũng đặt ra các thách thức mới về
chi phí, độ trễ, bảo mật và độ chính xác, đòi hỏi kỹ sư phải biết đánh giá chất lượng và
xây dựng sản phẩm an toàn.
[token] vào: 247, ra: 99, tổng: 346The two summaries agree on the content, but the 0.9 one phrases things more freely, exactly as the theory predicts. Input tokens are identical because the prompt is the same; output tokens differ slightly because each answer has a different length.
A few technical notes from day one:
- I picked Gemini as the first provider because Google AI Studio gives you a free API key. The model-calling code sits in its own layer, so swapping providers later does not mean rewriting the app.
- An API key is a secret: mine lives in a secure vault and a local
.envfile, never in a commit. The repo only has an empty.env.example. - One small surprise: Google has retired the Gemini 2.5 models for new users, so the app runs on a 3.5-generation model. Documentation that is a few months old can already be wrong.
What's next#
Following the roadmap, the next day is still in the foundations phase: I will try a different model, add streaming, and use FastAPI.
It is a journey, and a habit of taking one small step every day. I believe that accumulating like this will add up to enough quality for the final project.
Related posts
Day 3: Streaming — words that arrive gradually, and a lesson about waiting
Day three of learning AI engineering: what streaming actually changes, how Gemini sends results chunk by chunk over SSE, and what a 10-second TTFT taught me that the docs don't mention.
Day 2: Choosing a model, and teaching the app to count money
Day two of learning AI engineering: why there is no best model, how to read Gemini's pricing, and the --model feature that lets my AI document assistant estimate the cost of every call.
Day 4: A break from theory — building a real IT department for Examino
After three days of LLM theory, today I stopped to build something that actually runs: a Zalo bot acting as the IT department for Examino, listening to support requests from language centres, recording them and replying — running on the mini PC at home.