# Generative models, tokens and useful prompts

> An autoregressive language model predicts successive tokens from context. A token may be a word piece, punctuation or another encoded unit.

Course: [Generative AI, RAG and practical evaluation](https://studybrix.com/en/courses/generative-ai-and-rag/index.md)
Level: school
Prerequisites: AI basics, reading and structured instructions.

## Notes

### Generation

An autoregressive language model predicts successive tokens from context. A token may be a word piece, punctuation or another encoded unit.

### Prompting

State the task, relevant context, constraints and desired format. Examples can clarify the task, but they can also bias the response.

### Context

The context window is finite and measured in model-specific tokens. Word counts are not a universal token-count conversion.

### Checking

Generation can produce plausible unsupported content. Important outputs need verification, and private data should not be included without authorization.

## Practice questions

### 1. Must one token equal one English word?

A. Yes, for every model
B. No
C. Yes, in every language
D. Only if a prompt is short

Answer: No

Explanation: Tokenization depends on the vocabulary and encoding.

### 2. Which prompt is better specified for a study task?

A. Summarize the supplied passage in five factual sentences and flag missing evidence
B. Do everything perfectly
C. Guess facts not in the passage
D. Hide uncertainty and invent citations

Answer: Summarize the supplied passage in five factual sentences and flag missing evidence

Explanation: A clear task and evidence boundary are testable.

### 3. A toy context budget is 1000 tokens with 700 reserved for input. How many tokens remain for output under that simple shared-budget model?

Answer: 300

Explanation: 1000−700=300; actual system budgets must follow their documented rules.

### 4. Does adding a request to be accurate guarantee factual accuracy?

A. Yes, always
B. Only if repeated ten times
C. No
D. Only in capital letters

Answer: No

Explanation: Instructions can help but do not replace verification.

### 5. Why should example answers be chosen carefully in a prompt?

Sample answer / marking guidance: They teach format and task patterns but may introduce bias, unwanted assumptions or misleading examples.

Explanation: Credit both benefit and risk.

### 6. Rewrite a vague request to make a verifiable summarization task.

Sample answer / marking guidance: Specify the source text, audience, length, format, and a rule not to add unsupported claims; ask to identify uncertainty or missing information.

Explanation: Credit a concrete task specification rather than one mandatory wording.

### 7. A response has 4 claims and independent checking supports 3. Find the supported-claim fraction in this toy audit.

Answer: 0.75

Explanation: 3/4=0.75.

### 8. Which content should not be casually pasted into an external AI service?

A. A public practice sentence
B. A synthetic number table
C. An original nonsensitive exercise
D. Unapproved private records

Answer: Unapproved private records

Explanation: Data use must respect authorization and privacy.

## Further reading

- https://developers.google.com/machine-learning/crash-course
- https://cs229.stanford.edu/

Original AI-assisted educational draft; not independently teacher-reviewed. References support further study, not copied exercises, affiliation or curriculum accreditation.
