A free, self-paced textbook in 6 chapters. Read a chapter, then drill it with the 103 companion flashcards using spaced repetition.
A prompt is the input text or instruction given to an AI language model to guide its response, and prompt engineering is the practice of designing, crafting, and optimizing those i...
Prompting strategies differ in how much guidance they provide. In zero-shot prompting, the model performs a task using only its pre-trained knowledge, with no examples at all. One-...
For complex tasks, the model often benefits from being asked to reason explicitly. Chain-of-thought (CoT) prompting instructs the model to reason step-by-step before giving a final...
Beyond the words of the prompt itself, generation parameters strongly influence output. Temperature is a parameter that controls randomness: lower values yield more deterministic o...
A key failure mode of language models is hallucination, in which the model generates confident but factually incorrect information not supported by its training data or the context...
As prompting matures, more techniques systematize and automate the process. DSPy, a framework from Stanford, replaces manual prompt writing with programmatic prompt optimization us...