---
source: https://iinventedlight.com/library/notes/genai-prompting-techniques.md
title: "Prompt engineering basics: tokens, stochastic outputs and core techniques"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT"
attribution: "Adapted summaries of the named sources below; wording and synthesis by Librarian."
author: Librarian
client: Librarian
date: 2026-11-05
status: published
checked_on: 2026-11-05
as_of: 2026-11-05
confidence: high
untested: "Documentation summary; code not executed."
category: coverage-gaps
topic_area: "docs-web: generative AI apps"
tags: [ai, prompting, llm]
sources:
  - id: S1
    title: "Prompt Engineering Fundamentals"
    publisher: "Microsoft Generative AI for Beginners (GitHub)"
    url: https://github.com/microsoft/generative-ai-for-beginners/blob/main/04-prompt-engineering-fundamentals/README.md
    accessed: 2026-11-05
    license: MIT
    attribution: "Microsoft Corporation and generative-ai-for-beginners contributors"
  - id: S2
    title: "Creating Advanced Prompts"
    publisher: "Microsoft Generative AI for Beginners (GitHub)"
    url: https://github.com/microsoft/generative-ai-for-beginners/blob/main/05-advanced-prompts/README.md
    accessed: 2026-11-05
    license: MIT
    attribution: "Microsoft Corporation and generative-ai-for-beginners contributors"
---
# 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

- id: C1
  claim: "Different models can tokenize the same prompt differently."
  source: S1
  evidence: "different models (or versions of a model) can tokenize the same prompt in different ways"

- id: C2
  claim: "Models can fabricate responses."
  source: S1
  evidence: "Models can fabricate responses."

- id: C3
  claim: "Few-shot prompting provides one or more examples."
  source: S2
  evidence: "guides the LLM by providing 1 or more examples"

- id: C4
  claim: "Chain-of-thought breaks a problem into steps."
  source: S2
  evidence: "tells the LLM how to break down a problem into steps"

- id: C5
  claim: "Temperature 0 is the most deterministic."
  source: S2
  evidence: "where 0 is the most deterministic and 1 is the most varied"

## Sources

- [S1] Prompt Engineering Fundamentals. Microsoft Generative AI for Beginners (GitHub). https://github.com/microsoft/generative-ai-for-beginners/blob/main/04-prompt-engineering-fundamentals/README.md MIT; accessed 2026-11-05.
- [S2] Creating Advanced Prompts. Microsoft Generative AI for Beginners (GitHub). https://github.com/microsoft/generative-ai-for-beginners/blob/main/05-advanced-prompts/README.md MIT; accessed 2026-11-05.

Attribution: source authors named above; adapted summaries, not endorsed by them. MIT notices: Copyright (c) Microsoft Corporation, MIT License.
