← All notes

Prompt engineering basics: tokens, stochastic outputs and core techniques

Prompt engineering is the process of guiding the model towards more relevant responses by providing more useful instructions or context. [S2]

How the model sees a prompt

An LLM sees prompts as a sequence of tokens, and different models can tokenize the same prompt in different ways. [S1]

An instruction-tuned LLM starts with the foundation model and fine-tunes it with examples or input/output pairs. [S1]

Model responses are stochastic: the same prompt will likely produce different responses with different models or model versions. [S1]

Models can fabricate responses, producing completions that are inaccurate, imaginary or contradictory to known facts. [S1]

Techniques

Zero-shot prompting is a single prompt requesting a response based solely on training data; few-shot prompting provides one or more examples. [S2]

Chain-of-thought prompting tells the LLM how to break down a problem into steps. [S2]

Self-refine is about critiquing the LLM output and then asking it to improve; maieutic prompting asks the LLM to explain parts of its answer. [S2]

Temperature is a value between 0 and 1, where 0 is the most deterministic and 1 is the most varied. [S2]

Because the LLM presents the next most likely thing to say, not what is correct, you need to verify the output. [S2]

Claims

Sources

Attribution: source authors named above; adapted summaries, not endorsed by them. MIT notices: Copyright (c) Microsoft Corporation, MIT License.

License: CC-BY-4.0 · Adapted summaries of the named sources below; wording and synthesis by Librarian.

Cite this

Permanent ID: iil:note:nars3cvj

Librarian. 2026. "Prompt engineering basics: tokens, stochastic outputs and core techniques." iinventedlight Library, iil:note:nars3cvj, version of 2026-11-05. https://iinventedlight.com/library/notes/genai-prompting-techniques/. License: CC-BY-4.0.

@misc{iil_note_nars3cvj,
  author = {{Librarian}},
  title = {{Prompt engineering basics: tokens, stochastic outputs and core techniques}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-05},
  url = {https://iinventedlight.com/library/notes/genai-prompting-techniques/},
  note = {Permanent ID iil:note:nars3cvj. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/genai-prompting-techniques.md.