Lee Siang Fong

Blog › AI

LLM Roadmap for Beginners: A Practical Step-by-Step Path

A plain, step-by-step LLM roadmap for beginners: the basics, prompting, APIs, RAG, simple agents and safety, with free resources and what to build at each stage.

A good LLM roadmap for beginners has six stages: learn the basic ideas, get good at prompting, call a model from code, connect it to your own documents (RAG), try simple agents, and learn to test and secure what you build. You don't need a maths degree. You need basic Python, curiosity, and small projects at each step.

Here is the path, with what to learn and what to build at each stage.

Before you start

You will need:

  • Basic Python: variables, functions, lists, and installing packages.
  • A free account with at least one AI provider, such as OpenAI, Google or Anthropic. Most offer an API, a way for your code to send text to the model and get a reply.
  • A small budget, or the free credits some providers give. Check current pricing on each provider's site, since it changes often.

Stage 1: Understand the basics

A large language model (LLM) is a program trained on huge amounts of text to predict the next piece of text. That simple idea, at very large scale, lets it write, summarise, translate and code.

Learn these four terms:

  • Transformer. The design most modern LLMs use, introduced in the 2017 paper Attention Is All You Need. Its "attention" step lets the model weigh how words in a sentence relate to each other. You don't need to build one, just know the name.
  • Token. A chunk of text, roughly a word or part of a word. Models read and write tokens, and providers charge per token.
  • Context window. How many tokens the model can look at in one go, including your prompt and its reply.
  • Hallucination. When the model states something false with confidence. It happens because the model predicts likely text, not checked facts.

Free resource: the Hugging Face LLM Course explains these ideas with code you can run.

Build: nothing yet. Use a chat tool daily for a week and note where it does well and where it fails.

Stage 2: Learn to prompt well

A prompt is the instruction you give the model. Better prompts give better results, fast and for free.

Habits that work:

  • Be specific. Not "Write about AI." Instead: "Write a 150-word email to clinic staff explaining our new appointment app, friendly tone."
  • Give context. Who is the reader? What is the goal?
  • Show an example of the output you want.
  • Set the format, such as a table, bullet list or JSON (a structured data format code can read).
  • Use a system prompt. This is a standing instruction, like "You are a helpful assistant for a Penang hardware shop. Answer in simple English."
  • Ask for steps on hard problems: "Work through this step by step." See what is AI reasoning for why this helps.

Build: a prompt "library" document with 10 prompts your team could reuse.

Stage 3: Call a model from code

Now move from the chat window to your own code.

Learn to:

  • Send a prompt through the provider's API and read the reply.
  • Store your API key safely, in an environment variable, never in your code or shared files.
  • Adjust common settings:
    • Temperature controls randomness. Low values give more focused, repeatable answers. Higher values give more variety. Even at zero, answers are not always identical, so don't rely on it for exact repeatability.
    • Max tokens limits how long the reply can be.
  • Ask for structured output, such as JSON, so your code can use the answer.

Build: a small script that reads customer emails from a folder and sorts them into "complaint", "question" or "order" with a one-line summary.

Stage 4: Connect the model to your documents (RAG)

LLMs don't know your company's information. RAG, short for retrieval-augmented generation, fixes this. The system searches your documents for relevant passages and gives them to the model with the question. The idea comes from a 2020 research paper.

Learn:

  • Chunking: splitting documents into small pieces.
  • Embeddings: turning text into lists of numbers so similar meanings sit close together.
  • Vector databases: stores built to search those numbers quickly. See vector databases explained.
  • Citing sources: making the model show which document it used.

Build: a Q&A bot over your company's HR policy or product manual. Test it with 20 real questions you know the answers to.

Stage 5: Try simple agents

An AI agent is a model that can use tools, such as a search function, calculator or calendar, and decide its next step until a task is done.

Start with the advice in Anthropic's Building effective agents: use the simplest setup that works. Often a fixed sequence of steps, a "workflow", is enough. Add real agent behaviour only when the steps genuinely change from case to case.

Learn:

  • Tool calling (also called function calling): letting the model ask your code to run a function.
  • Loops and limits: stopping an agent after a set number of steps so it can't run forever.
  • Human approval before any action that sends, pays or deletes.

Build: an assistant that looks up an order number in a test spreadsheet and drafts a status reply. More background in AI agent vs chatbot.

Stage 6: Test and secure what you build

This stage is where hobby projects become something a business can trust.

  • Evaluation. Keep a fixed set of test questions with good answers. Re-run them after every change to prompts, models or documents.
  • Security. Read the OWASP Top 10 for LLM applications. Prompt injection, where hidden text tricks the model into ignoring your instructions, is its top risk.
  • Privacy. Don't send personal data to an AI service unless you have to and are allowed to. In Malaysia, the PDPA applies to customer and staff data you process.
  • Cost tracking. Log tokens used per task so a bill doesn't surprise you.

What to skip for now

Beginners often jump too fast to:

  • Training a model from scratch. This needs huge data and compute budgets.
  • Fine-tuning (extra training on your own data). Try prompting and RAG first; they solve most problems more cheaply.
  • Complex multi-agent systems. Get one simple agent working well first.

Conclusion

This LLM roadmap for beginners moves from understanding, to prompting, to code, to your own data, to agents, and finally to testing and security. Build something small at every stage. By the end you will know not just how to use LLMs, but when they are the right tool and when they are not.

Quick answers

How long does it take to learn LLMs?

It depends on your starting point and time. Someone with basic Python can work through the first four stages in a few months of part-time practice by building small projects.

Do I need to know maths to work with LLMs?

Not to use and build with them. You need maths only if you want to research or train models yourself.

Which LLM should a beginner start with?

Any major provider's model is fine for learning. The skills of prompting, RAG and testing carry over between providers.

Is prompt engineering still worth learning?

Yes. Clear instructions, context and examples still make a big difference, even as models improve.

Sources

Read next