Generative AI
primer-original-v2easyGenerative AIPrompt EngineeringFew-ShotLLMprimer-original-v2

What technique involves providing a few examples in the prompt to guide an LLM's response?

Answer options

A
Zero-shot prompting
B
Few-shot prompting
C
Fine-tuning
D
Transfer learning

Correct answer: Few-shot prompting

Detailed Solution & Conceptual Analysis

Few-shot prompting involves providing a few input-output examples in the prompt to demonstrate the desired task and format. This leverages the model's in-context learning ability without updating its weights.

Key Engineering Takeaway

In Generative AI, understanding the underlying mechanics of Generative AI is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.

Related Generative AI questions

Practice more Generative AI questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.