CMClearMathAcademy

Logic in AI Prompts and Clear Instructions

A free Logic lesson from the “Logic Applications and Final Review” unit, with a worked example and practice problems including step-by-step solutions.

Clear instructions often have logical structure. Conditions, constraints, examples, and non-examples help a human or AI system know what counts as success. Learning objective: Write precise if-then and constraint-based instructions. Prerequisite: No formal prerequisite. Work in this lesson starts with ordinary language, then connects the idea to symbols only after the meaning is clear. Example 1: An algebra rule may apply only if a denominator is not zero. Example 2: A program condition such as 'if score >= 70 and quiz submitted' uses logic to decide what happens next. A common misconception is to treat familiar wording as proof; instead, check exactly what the statement says and what follows from it.

What you'll learn

Why it matters: Logic transfers to algebra, geometry, statistics, computer science, AI prompts, and clear written explanations.

Worked example

Problem. Example case A (Logic in AI Prompts and Clear Instructions): Worked example: Which instruction is most precise for a human, algorithm, or AI system?

  1. Clear instructions state a condition and an action.
  2. The if-then form is testable.
  3. The other choices are too vague to check.

Answer: If the answer uses units, include the unit in the final sentence.

Practice problems

1. Practice case A (Logic in AI Prompts and Clear Instructions): Practice: Which instruction is most precise for a human, algorithm, or AI system?

Choices: If the answer uses units, include the unit in the final sentence. · Make it good. · Do the thing. · Use common sense somehow.

Show solution
  1. Clear instructions state a condition and an action.
  2. The if-then form is testable.
  3. The other choices are too vague to check.

Answer: If the answer uses units, include the unit in the final sentence.

2. Practice case B (Logic in AI Prompts and Clear Instructions): Practice: Which instruction is most checkable (you can verify it was followed)?

Choices: List exactly three examples, each on its own line. · Give a few examples, nicely formatted. · Explain it well. · Be thorough.

Show solution
  1. A checkable instruction has a measurable condition.
  2. 'Exactly three, one per line' can be verified.
  3. The others are subjective.

Answer: List exactly three examples, each on its own line.

3. Practice case C (Logic in AI Prompts and Clear Instructions): Practice: A user wants every section summarized. Which instruction matches that all-constraint?

Choices: Summarize each section of the document. · Summarize a section of the document. · Summarize some sections if you like. · Summarize the document somehow.

Show solution
  1. 'Every section' is a universal requirement.
  2. 'Each section' covers all of them.
  3. 'A section' or 'some' would miss the all-constraint.

Answer: Summarize each section of the document.

4. Practice case D (Logic in AI Prompts and Clear Instructions): Practice: Which instruction is structured as a clear if-then rule?

Choices: If the input is empty, return an error message. · Handle empty inputs nicely. · Empty inputs are bad. · Avoid problems with inputs.

Show solution
  1. An if-then rule names a condition and an action.
  2. 'If empty, return an error' is testable.
  3. The others lack a clear condition or action.

Answer: If the input is empty, return an error message.

5. Practice case E (Logic in AI Prompts and Clear Instructions): Practice: "Summarize the report or list its key points" is ambiguous because:

Choices: it does not say whether to do one task or either task. · it has too many numbers. · it is too short to read. · it uses the word report.

Show solution
  1. The 'or' leaves the choice unclear.
  2. A clearer prompt picks one task or allows both explicitly.
  3. Ambiguity makes success hard to check.

Answer: it does not say whether to do one task or either task.

Practice this interactively with instant feedback and an AI tutor.

Practice Logic in AI Prompts and Clear Instructions Take the free placement check

More Logic lessons