Lesson 19 of 25
The Elimination of Mental Static (Cleanliness)
A typo in a technical term, a half-named person, a sentence whose grammar hides two requests inside one - each makes the model guess, and a guess is where a wrong answer comes from. Clean the noise out: spell the function name correctly, give the full name, and split a compound request into separate numbered instructions. Note that the fixes in this chapter are all shorter than the problems. Clarity is not the same as length.
Tags remove the structural ambiguity that grammar creates: a fused request like "summarize and tell me its main points and why its important" becomes three tags, and there is no longer a question of whether that is one task or three. Keep the tagged version short - the tags are doing the disambiguating, so the prose inside them does not need to.
- Tags resolve ambiguity that grammar cannot.
- One task per tag - never two in one.
- Add a line: say so rather than assume.
- Keep the text inside tags short.
- Pasted material in its own tag, instruction last.
Instead of
Write a simple Javascript function that takes a JSON string and uses JSON.parse to turn it into an object, but make sure to include try...cacth for error handling.
Perplexity version
<task> A JavaScript function that parses a JSON string with `JSON.parse` inside a `try...catch` block. </task> <behaviour> Return the parsed object on success, `null` on failure, and log the error. </behaviour> <if_unclear> Name anything you had to interpret rather than choosing silently. </if_unclear>
Instead of
Tell me about the famous author Narayan who wrote about a fictional town in south india.
Perplexity version
<subject> R. K. Narayan, the Indian novelist. </subject> <task> 1. A brief biography. 2. The significance of Malgudi, his fictional South Indian town, in his work. </task> <uncertainty> Mark any date you are unsure of. </uncertainty>
Instead of
Summarize the article and tell me its main points and why its important.
Perplexity version
<article> [Paste the article here] </article> <task> Three separate sections: <summary>One paragraph.</summary> <main_points>Three, as a list.</main_points> <significance>Why it matters, and to whom.</significance> </task>