Skip to the page
Tecyfy

Prompting interview question · medium

Explain the concept of “prompt tuning” and how it differs from traditional prompt engineering. Have you had any experience with it?

The short answerPrompt tuning learns a "soft prompt": a small set of trainable vectors (embeddings) placed in front of the input, adjusted by gradient descent on task examples while the model's own weights stay frozen.

The full answer

Prompt tuning learns a "soft prompt": a small set of trainable vectors (embeddings) placed in front of the input, adjusted by gradient descent on task examples while the model's own weights stay frozen. Traditional prompt engineering writes the prompt in words by hand and trains nothing.

How prompt tuning works

  1. Choose a number of virtual tokens, for example 20.
  2. Prepend 20 trainable embedding vectors to the embedded input; they don't correspond to real words.
  3. Train on labelled examples. Only those vectors change; the model is frozen.
  4. At inference, prepend the learned vectors for that task.

Lester and colleagues showed that as models get larger, prompt tuning approaches the quality of full fine-tuning while training only a tiny fraction of the parameters. Each task needs only its own small soft prompt, so one frozen model can serve many tasks.

Related methods

  • Prefix tuning (Li and Liang) learns vectors inserted at every layer of the model, not only the input, which gives more control.
  • P-tuning uses a small network to produce the prompt vectors.
  • LoRA and other adapters train small weight matrices inside the model; they are the most common parameter-efficient fine-tuning method today. The Hugging Face PEFT library implements all of these.

Comparison with prompt engineering

Prompt engineeringPrompt tuning
What changesWords in the promptLearned vectors
Needs training dataNo (a test set is still wise)Yes, labelled examples
Needs model accessAny APIThe model's weights and embeddings
Human-readableYesNo: the vectors aren't words
Time to changeMinutesA training run
PortabilityOften works across modelsTied to one model

When to use which

  • Hosted, closed models are reached through an API that accepts text, so prompt tuning isn't possible there; prompt engineering, retrieval and the provider's fine-tuning service are the options.
  • With an open-weights model you run yourself, prompt tuning or LoRA can adapt it cheaply to many tasks.

Experience In an interview, say honestly what you have done. A good answer might be: "I've used LoRA through the PEFT library on an open model for a classification task, and compared it with a few-shot prompt on the same test set. The prompt got close enough that we kept it, because it was easier to maintain." If you haven't used it, explain how you'd decide whether it was worth trying.

Last updated 16 October 2026