Q1 Q: What is prompt engineering?
ANS: Prompt engineering is the practice of designing, structuring,
and refining input text (prompts) given to AI language models
to elicit desired, accurate, and useful outputs.
Q2 Q: Why is prompt engineering important?
ANS: It bridges the gap between human intent and machine output.
Well-engineered prompts dramatically improve response
quality, reduce hallucinations, and save cost and tokens.
Q3 Q: What is a language model (LLM)?
ANS: A Large Language Model is a neural network trained on
massive text corpora to predict and generate human-like text
based on input context.
Q4 Q: What is a token in the context of LLMs?
ANS: A token is the smallest unit of text processed by an LLM —
roughly 4 characters or 0.75 words in English. LLMs have
context limits measured in tokens.
Q5 Q: What is a system prompt?
ANS: A system prompt is a special instruction block given to an
LLM before the user's message, used to set persona,
behavior, tone, constraints, and context.
Page 1 of 60
,Q6 Q: What is a user prompt?
ANS: The user prompt is the input provided by the human in a
conversation turn — the direct instruction or question to the
model.
Q7 Q: What is zero-shot prompting?
ANS: Zero-shot prompting asks the model to perform a task with no
examples — relying purely on the model's pretrained
knowledge.
Q8 Q: What is few-shot prompting?
ANS: Few-shot prompting provides a small number of input-output
examples within the prompt to demonstrate the desired
format or behavior.
Q9 Q: What is one-shot prompting?
ANS: One-shot prompting provides exactly one example to guide
the model's response format or behavior.
Q10 Q: What is a completion?
ANS: A completion is the model's generated response to a given
prompt — the text output produced by the LLM.
Q11 Q: What is temperature in LLMs?
ANS: Temperature controls randomness in output. Low values (e.g.
0.1) make responses deterministic; high values (e.g. 1.5)
make them more creative and varied.
Q12 Q: What is top-p (nucleus) sampling?
ANS: Top-p sampling limits token selection to the smallest set of
tokens whose cumulative probability exceeds p, dynamically
adjusting the candidate pool.
Page 2 of 60
,Q13 Q: What is top-k sampling?
ANS: Top-k restricts token selection to the k most likely next tokens
at each step, reducing randomness by eliminating low-
probability options.
Q14 Q: What is a context window?
ANS: The context window is the maximum number of tokens an
LLM can process at once — both input and output combined.
Beyond this limit, earlier content is truncated.
Q15 Q: What does 'grounding' mean in prompt engineering?
ANS: Grounding means anchoring the model's responses to
specific, verifiable information — like documents or
databases — to reduce hallucinations.
Q16 Q: What is prompt injection?
ANS: Prompt injection is a security attack where malicious content
in user input attempts to override or hijack the system prompt
instructions.
Q17 Q: What is a hallucination in LLMs?
ANS: A hallucination is when an LLM generates confident-sounding
but factually incorrect or fabricated information not supported
by its training data or provided context.
Q18 Q: What is the difference between generative AI and
discriminative AI?
ANS: Generative AI creates new content (text, images, code), while
discriminative AI classifies or distinguishes between existing
categories of data.
Q19 Q: What does 'inference' mean in the context of LLMs?
Page 3 of 60
, ANS: Inference is the process of running a trained model on new
input to generate an output — the actual usage phase as
opposed to training.
Q20 Q: What is instruction tuning?
ANS: Instruction tuning fine-tunes a model on instruction-response
pairs, training it to follow explicit instructions more reliably,
improving its zero-shot capabilities.
Page 4 of 60
ANS: Prompt engineering is the practice of designing, structuring,
and refining input text (prompts) given to AI language models
to elicit desired, accurate, and useful outputs.
Q2 Q: Why is prompt engineering important?
ANS: It bridges the gap between human intent and machine output.
Well-engineered prompts dramatically improve response
quality, reduce hallucinations, and save cost and tokens.
Q3 Q: What is a language model (LLM)?
ANS: A Large Language Model is a neural network trained on
massive text corpora to predict and generate human-like text
based on input context.
Q4 Q: What is a token in the context of LLMs?
ANS: A token is the smallest unit of text processed by an LLM —
roughly 4 characters or 0.75 words in English. LLMs have
context limits measured in tokens.
Q5 Q: What is a system prompt?
ANS: A system prompt is a special instruction block given to an
LLM before the user's message, used to set persona,
behavior, tone, constraints, and context.
Page 1 of 60
,Q6 Q: What is a user prompt?
ANS: The user prompt is the input provided by the human in a
conversation turn — the direct instruction or question to the
model.
Q7 Q: What is zero-shot prompting?
ANS: Zero-shot prompting asks the model to perform a task with no
examples — relying purely on the model's pretrained
knowledge.
Q8 Q: What is few-shot prompting?
ANS: Few-shot prompting provides a small number of input-output
examples within the prompt to demonstrate the desired
format or behavior.
Q9 Q: What is one-shot prompting?
ANS: One-shot prompting provides exactly one example to guide
the model's response format or behavior.
Q10 Q: What is a completion?
ANS: A completion is the model's generated response to a given
prompt — the text output produced by the LLM.
Q11 Q: What is temperature in LLMs?
ANS: Temperature controls randomness in output. Low values (e.g.
0.1) make responses deterministic; high values (e.g. 1.5)
make them more creative and varied.
Q12 Q: What is top-p (nucleus) sampling?
ANS: Top-p sampling limits token selection to the smallest set of
tokens whose cumulative probability exceeds p, dynamically
adjusting the candidate pool.
Page 2 of 60
,Q13 Q: What is top-k sampling?
ANS: Top-k restricts token selection to the k most likely next tokens
at each step, reducing randomness by eliminating low-
probability options.
Q14 Q: What is a context window?
ANS: The context window is the maximum number of tokens an
LLM can process at once — both input and output combined.
Beyond this limit, earlier content is truncated.
Q15 Q: What does 'grounding' mean in prompt engineering?
ANS: Grounding means anchoring the model's responses to
specific, verifiable information — like documents or
databases — to reduce hallucinations.
Q16 Q: What is prompt injection?
ANS: Prompt injection is a security attack where malicious content
in user input attempts to override or hijack the system prompt
instructions.
Q17 Q: What is a hallucination in LLMs?
ANS: A hallucination is when an LLM generates confident-sounding
but factually incorrect or fabricated information not supported
by its training data or provided context.
Q18 Q: What is the difference between generative AI and
discriminative AI?
ANS: Generative AI creates new content (text, images, code), while
discriminative AI classifies or distinguishes between existing
categories of data.
Q19 Q: What does 'inference' mean in the context of LLMs?
Page 3 of 60
, ANS: Inference is the process of running a trained model on new
input to generate an output — the actual usage phase as
opposed to training.
Q20 Q: What is instruction tuning?
ANS: Instruction tuning fine-tunes a model on instruction-response
pairs, training it to follow explicit instructions more reliably,
improving its zero-shot capabilities.
Page 4 of 60