مواد پر جائیں

اس صفحے کا مرکزی مواد انگریزی میں ہے۔اس صفحے کا ترجمہ کریں

کیریئر روڈ میپ

Generative AI Engineer roadmap

A generative AI engineer goes one level deeper than an AI engineer: choosing and adapting models, fine-tuning, working with images, audio and video, and running open models efficiently. Start here if you enjoy understanding how models behave, not just calling them.

وقت
⏱ 5–7 months
Level
Advanced
Steps
6 steps
Architecture ↓Cheat sheet ↓5 interview Q&As ↓
شیئر

The roadmap

Click a step to open the full guide.

Best architecture: a self-hosted generative AI platform

For teams running open or fine-tuned models: a training path and a serving path that share evaluation.

Train and serve

Training path

  • Curated datasets
  • Fine-tuning jobs (LoRA) on GPUs
  • Evaluation suite
  • Model registry

Serving path

  • API + safety filters
  • Inference server (batching, streaming)
  • Quantised model + adapters
  • Autoscaled GPU nodes, monitoring

Why it's built this way

  • Never deploy a model that hasn't passed the same eval suite as the current one.
  • Serve with an inference server that batches requests and streams tokens.
  • Keep adapters (LoRA) separate so one base model serves many tasks.
  • Add input/output safety filters in front of the model.

Generative AI Engineer cheat sheet

The essentials on one screen. Bookmark it for revision.

Choose the technique

Wrong format/toneBetter prompt → then fine-tune
Missing knowledgeRAG
Needs actionsTools / agents
Too slow/expensiveSmaller model, quantise, cache
Private dataOpen model on your infra

Numbers to remember

Memory per param2 bytes (16-bit), 1 (8-bit), ~0.5 (4-bit)
LoRA rankStart small (8–16)
Fine-tune dataHundreds of clean examples can be enough
درجہ حرارت0–0.3 for precise tasks

Improve performance

  • Use quantised models and an optimised inference server.
  • Batch requests and stream outputs.
  • Cache prompts/prefixes that repeat (prompt caching / KV cache reuse).
  • Distil: use a big model to create training data for a smaller, faster one.
  • Limit max output tokens and context size.

Security checklist

  • Check model licences before commercial use.
  • Never train on data you don't have rights to or that contains secrets/PII.
  • Add input and output safety filters; red-team before launch.
  • Protect model weights and endpoints with authentication and rate limits.
  • Watermark or label AI-generated media where required.

Most important interview questions

Click a question to see a strong answer. Each step also has its own questions.

1the difference between an AI engineer and a GenAI engineer کیا ہے؟

Both build with models; a GenAI engineer goes deeper into model behaviour: fine-tuning, open models, multimodal, serving and evaluation of the models themselves.

2Explain LoRA.

Low-Rank Adaptation freezes the base model and trains small low-rank matrices added to some layers, cutting memory and compute while adapting behaviour.

3the KV cache کیا ہے؟

Stored attention keys and values for previous tokens so the model doesn't recompute them for each new token; it speeds generation but uses memory.

4How do you choose between models?

Define quality, latency, cost and privacy needs; benchmark candidates on your own eval set; pick the cheapest that meets the bar.

5What are hallucinations and how can fine-tuning affect them?

Confident false outputs. Fine-tuning on facts can increase them if it teaches the model to answer confidently without grounding; prefer RAG for facts.

Related روڈ میپ

1

Generative AI Engineer · Step 1 of 6 · 2 weeks

Transformers and tokens, conceptually

Understand what happens inside an LLM.

You do not need to derive the maths, but you should be able to explain how a transformer turns tokens into embeddings, mixes information with attention and predicts the next token. This intuition explains context limits, hallucinations and why prompts work.

Learn the difference between a base model, an instruction-tuned model and a reasoning model that spends extra tokens thinking before answering.

What you'll learn

  • Tokenisation
  • Embeddings
  • Self-attention
  • Pre-training vs instruction tuning
  • Reasoning models
  • Scaling: parameters, data and compute

Inside an LLM (simplified)

  1. متن
  2. Tokens
  3. Embeddings
  4. Transformer layers (attention)
  5. Next-token probabilities
  6. Sampled token

Key concepts

Transformer
The architecture behind LLMs, built on self-attention.
Self-attention
Each token decides how much to look at every other token.
Reasoning model
A model trained to think step by step before answering; slower but stronger on hard problems.

Step by step

  1. 1.1

    Tokenisation

    See how text becomes tokens; compare English and Hindi token counts.

  2. 1.2

    Embeddings + attention

    Each token becomes a vector; attention mixes in context from other tokens.

  3. 1.3

    Training stages

    Pre-training → instruction tuning → preference tuning → (optional) reasoning training.

Notes

  • Hallucinations come from predicting plausible text, not from looking facts up.
  • Reasoning models are slower and costlier but much better at multi-step problems.

Tips & tricks

  • Watch a visual explanation of attention before reading papers.
  • Inspect how a tokenizer splits words in different languages.
  • Explain transformers to a friend in five minutes; gaps will show.

Interview questions

Explain self-attention simply.

For each word, the model computes how relevant every other word is, then builds a context-aware representation as a weighted mix of them. That's how 'bank' learns whether it means river or money.

Base model vs instruction-tuned model?

A base model just continues text. An instruction-tuned model is further trained on examples of following instructions helpfully and safely, so it behaves like an assistant.

The quick way to study this

One good visual explainer plus the 'Attention Is All You Need' figure is enough to start.

2

Generative AI Engineer · Step 2 of 6 · 2 weeks

Advanced prompting and structured output

Get reliable results without training anything.

Most generative AI problems are solved with better prompts and better context, not fine-tuning. Learn to write instructions like a specification: goal, inputs, constraints, output format, and examples of good and bad answers.

Break complex tasks into a chain of smaller prompts, each with a structured output that the next step can validate.

What you'll learn

  • Clear instructions and role prompts
  • Few-shot examples
  • Chain-of-thought and reasoning settings
  • JSON schema output
  • Prompt chaining
  • Prompt versioning and testing

Anatomy of a strong prompt

  1. Role and goal
  2. Context and inputs
  3. Rules and constraints
  4. Output format (schema)
  5. Examples

Key concepts

Few-shot
Showing examples of the task in the prompt.
Prompt chaining
Feeding one prompt's output into the next.
System prompt
Top-level instructions that set role and rules.

Step by step

  1. 2.1

    Write specs, not wishes

    Goal, inputs, constraints, output format, examples.

  2. 2.2

    Add examples

    2–5 good examples (few-shot) beat long explanations.

  3. 2.3

    Chain prompts

    Split complex tasks; validate each step's structured output.

  4. 2.4

    Version and test

    Store prompts in Git and score them on a fixed test set.

Notes

  • Examples (few-shot) are often more powerful than long instructions.
  • Change one thing at a time and re-run your test set.

Tips & tricks

  • Ask the model to critique and improve its own prompt.
  • Keep a library of prompts that worked, with notes on why.
  • Use our AI prompt generator to see how structure changes results.

Interview questions

How do you improve a prompt systematically?

Create a test set, change one thing at a time, score every version, and keep a changelog. Look at failures to decide what to change next.

The quick way to study this

Take one task and improve it through five prompt versions, scoring each on the same 20 inputs.

Practice project

A prompt pipeline that turns product reviews into structured pros, cons and sentiment.

3

Generative AI Engineer · Step 3 of 6 · 2 weeks

Open models and running them locally

Use open-weight models on your own hardware.

Open-weight models let you run AI privately, offline or cheaply at scale. Quantisation shrinks models so they fit on laptops and smaller GPUs, trading a little quality for a lot of speed and memory.

Always read the model card and licence: some open models restrict commercial use.

What you'll learn

  • Model hubs and model cards
  • Quantisation (4-bit, 8-bit)
  • Local runtimes and servers
  • GPU memory basics
  • Licences of open models
  • When open beats hosted

Hosted API vs open model

Hosted API

  • No hardware
  • Top quality models
  • Pay per token
  • Data leaves your servers

Open model

  • Your hardware/cloud GPU
  • Full control & privacy
  • Fixed infra cost
  • You manage updates

Key concepts

Open-weight model
Model weights you can download and run yourself.
Quantisation
Storing weights with fewer bits: smaller and faster, slightly less accurate.
VRAM
GPU memory; the main limit on which models you can run.

Step by step

  1. 3.1

    Pick a model

    Read the model card and licence; check size and context length.

  2. 3.2

    Quantise

    Use a 4-bit or 8-bit build to fit your GPU or laptop.

  3. 3.3

    Serve

    Run a local server with an OpenAI-compatible API.

  4. 3.4

    Benchmark

    Compare quality, speed (tokens/sec) and memory on your tasks.

Notes

  • Rough rule: a 4-bit 7–8B model needs around 5–6 GB of memory.
  • Open models are ideal for privacy-sensitive data.

Tips & tricks

  • Start with a local runtime that exposes an OpenAI-compatible API so your code barely changes.
  • Benchmark on your own tasks, not just public leaderboards.

Interview questions

How much memory does a 7B model need?

Roughly parameters × bytes per weight: about 14 GB at 16-bit, ~7 GB at 8-bit and ~4–5 GB at 4-bit, plus extra for context (KV cache).

The quick way to study this

Run one small open model locally in an afternoon and compare it with a hosted model on your test set.

4

Generative AI Engineer · Step 4 of 6 · 3 weeks

Fine-tuning with LoRA

Adapt a model to your style, format or domain.

Fine-tuning teaches a model a style, a format or a narrow skill. It is not the best way to add new facts: use RAG for knowledge. LoRA trains small adapter weights instead of the whole model, so it runs on a single GPU.

Data quality matters more than quantity. A few hundred clean, consistent examples often beat thousands of noisy ones.

What you'll learn

  • When to fine-tune vs prompt or RAG
  • Preparing training data
  • LoRA and QLoRA
  • Training and validation loss
  • Evaluating fine-tuned models
  • Preference tuning basics (DPO)

Fine-tuning workflow

  1. Collect examples
  2. Clean & split
  3. Train LoRA
  4. Evaluate vs baseline
  5. Merge / serve adapter

Key concepts

LoRA
Trains small adapter matrices instead of all weights; cheap and fast.
QLoRA
LoRA on a quantised base model, so it fits on smaller GPUs.
Overfitting
Validation loss rising while training loss falls.
DPO
Preference tuning: learn from 'better vs worse' answer pairs.

Step by step

  1. 4.1

    Decide if you need it

    Try prompting and RAG first; fine-tune for style, format or a narrow skill.

  2. 4.2

    Prepare data

    Clean, consistent input→output pairs; hold out a test set.

  3. 4.3

    Train LoRA adapters

    Small rank, a few epochs; watch training vs validation loss.

  4. 4.4

    Evaluate

    Compare with the prompted baseline on the held-out set.

Notes

  • Fine-tune for behaviour; use RAG for knowledge.
  • Always keep a held-out test set the model never trains on.

Tips & tricks

  • Rent a cloud GPU by the hour instead of buying hardware.
  • Start from an instruction-tuned model, not a base model.
  • Compare against a well-prompted baseline before celebrating.

Interview questions

When should you fine-tune instead of using RAG?

Fine-tune to change behaviour (format, tone, domain language, a narrow task). Use RAG to add knowledge that changes. Often both are combined.

catastrophic forgetting کیا ہے؟

When fine-tuning makes a model lose general abilities. LoRA, small learning rates and mixing in general data reduce it.

The quick way to study this

Follow one LoRA notebook end to end on a small model, then repeat with your own data.

Practice project

Fine-tune a small model to write replies in a specific format, and show before/after scores.

5

Generative AI Engineer · Step 5 of 6 · 3 weeks

Multimodal: images, audio and video

Work beyond text.

Modern models can read images, charts and documents, transcribe speech and generate pictures and audio. Many valuable business tasks are multimodal: reading invoices, checking photos, transcribing calls.

Learn how images are sent to models (as tokens, which cost money) and how to resize them for the best cost-quality balance.

What you'll learn

  • Vision-language models
  • Image generation and diffusion basics
  • Speech-to-text and text-to-speech
  • Document understanding (OCR, layouts)
  • Video understanding
  • Safety and content rules for media

A multimodal invoice reader

  1. Photo of invoice
  2. Resize
  3. Vision model
  4. JSON fields
  5. Validate totals
  6. Save

Key concepts

Vision-language model
Understands images and text together.
Diffusion
Creates images by removing noise step by step.

Step by step

  1. 5.1

    Vision

    Send images to a vision-language model; extract fields as JSON.

  2. 5.2

    Speech

    Speech-to-text for transcripts, text-to-speech for voice output.

  3. 5.3

    Image generation

    Diffusion models; prompts, negative prompts and safety rules.

Notes

  • Large images use many tokens; resize before sending.
  • Respect copyright and consent when generating or editing media.

Tips & tricks

  • Try extracting tables from a scanned PDF with a vision model.
  • Combine speech-to-text with an LLM for meeting summaries.

Interview questions

How do you reduce cost when sending images to a model?

Resize and crop to the needed region, compress, use lower detail settings when possible, and batch requests.

The quick way to study this

Build one small multimodal feature, such as photo-to-description, in a weekend.

Practice project

An invoice reader that extracts fields from photos into validated JSON.

6

Generative AI Engineer · Step 6 of 6 · 3 weeks

Serving, evaluation and portfolio

Put models into production and prove quality.

Serving generative models efficiently is its own skill: batching requests, streaming tokens and choosing the right hardware. Measure quality with automated evaluations and red-team your system for harmful or leaked outputs.

Your portfolio should show depth: a fine-tuned model with honest evaluations, a multimodal app and a deployed service.

What you'll learn

  • Inference servers and batching
  • Latency vs throughput
  • Evaluation suites
  • Safety filters and red-teaming
  • Cost per request
  • Model monitoring

GenAI production stack

  1. App / API
  2. Guardrails & safety filters
  3. Inference server (batching, streaming)
  4. Model (+ adapters)
  5. GPUs & monitoring

Key concepts

Throughput vs latency
Requests per second vs time per request; batching raises throughput but can add latency.
Red-teaming
Deliberately trying to make the model misbehave to find weaknesses.

Step by step

  1. 6.1

    Serve efficiently

    Batching, streaming and a KV cache-aware inference server.

  2. 6.2

    Evaluate and red-team

    Automated evals plus adversarial testing for safety.

  3. 6.3

    Publish

    Write up a fine-tuning project with honest before/after numbers.

Notes

  • Throughput and latency trade off; decide which matters for your product.

Tips & tricks

  • Publish a short technical write-up for each project.
  • Contribute a fix or example to an open-source AI library.

Interview questions

How would you evaluate a fine-tuned model?

Held-out test set, task metrics (accuracy, format validity), LLM-judge with rubric plus human review, regression checks on general tasks, and safety tests.

The quick way to study this

Deploy your fine-tuned model behind an API and add a basic eval dashboard.

یہ صفحہ شیئر کریں