Write a polite but firm email to a landlord who has not fixed the heating for three weeks. I want the repair, not a fight.
Grok 4.20 Reasoning
Here's a polished, polite but firm email:
Subject: Request for Urgent Heating Repair – 3 Weeks Outstanding
Dear [Landlord's Name],
I hope you're doing well.
I'm writing to follow up on the heating issue in [your apartment/unit number]. I first reported the problem on [date you first told them], and it has now been three full weeks without heat.
The lack of heating has made the apartment very uncomfortable, especially with the recent cold weather. I would greatly appreciate your help in getting this repaired as quickly as possible. A functioning heating system is essential, and I’d like to have this resolved promptly.
Could you please let me know when I can expect a technician, ideally within the next few days? I’m happy to be flexible with scheduling to make it as easy as possible.
Thank you for your prompt attention to this. I’d prefer to resolve this cooperatively and quickly.
Best regards, [Your Full Name]
Why this version works:
It’s polite and collaborative (“I’d prefer to resolve this cooperatively”)
It’s firm about the timeline (“three full weeks,” “as quickly as possible”)
It focuses on the solution rather than blame
It creates gentle pressure without threats
The subject line is clear and professional
Would you like a slightly stronger version or a more gentle one? I can adjust the tone easily.
Asked Nov 1, 2026. Unedited.
Write a React hook that debounces a value and cancels on unmount. Include the TypeScript types.
Grok 4.20 Reasoning
useDebounce Hook
import { useState, useEffect } from 'react';
/**
* Debounces a value and cancels the timeout on unmount (prevents memory leaks
* and updates to unmounted components).
*
* @param value The value to debounce
* @param delay Delay in milliseconds
* @returns The debounced value
*/
export function useDebounce<T>(value: T, delay: number): T {
const [debouncedValue, setDebouncedValue] = useState<T>(value);
useEffect(() => {
const timer = setTimeout(() => {
setDebouncedValue(value);
}, delay);
// Cleanup: cancel timeout on unmount or when value/delay changes
return () => {
clearTimeout(timer);
};
}, [value, delay]);
return debouncedValue;
}Usage Example
function SearchInput() {
const [query, setQuery] = useState('');
const debouncedQuery = useDebounce(query, 300);
// `debouncedQuery` will only update 300ms after the user stops typing
useEffect(() => {
if (debouncedQuery) {
fetchResults(debouncedQuery);
}
}, [debouncedQuery]);
return <input value={query} onChange={(e) => setQuery(e.target.value)} />;
}The hook properly cleans up the timeout in the useEffect return function, ensuring no state updates occur after the component unmounts.
Asked Nov 1, 2026. Unedited.
A drug test is 99% accurate, and 0.5% of people use the drug. Someone tests positive. What is the probability they use it, and why does the answer surprise people?
Grok 4.20 Reasoning
The probability is about 33.2%.
Exact Calculation (Bayes' Theorem)
Prior probability of using the drug: P(D) = 0.5% = 0.005
Probability of not using: P(~D) = 0.995
True positive rate (sensitivity): P(+|D) = 99% = 0.99
False positive rate: P(+|~D) = 1% = 0.01
We want P(D|+) — the probability the person uses the drug given a positive test.
$$ P(D|+) = \frac{P(+|D) \times P(D)}{P(+)} $$
First calculate the total probability of a positive test:
$$ P(+) = (0.99 \times 0.005) + (0.01 \times 0.995) = 0.00495 + 0.00995 = 0.0149 $$
Now plug in:
$$ P(D|+) = \frac{0.00495}{0.0149} \approx 0.3322 = \mathbf{33.2\%} $$
So even though the test is 99% accurate, a positive result only means a ~33% chance the person actually uses the drug.
Intuitive Explanation (Natural Frequencies)
Imagine 10,000 people are tested:
50 actually use the drug (0.5%).
Of those 50, ~49.5 test positive (99%).
9,950 do not use the drug.
Of those 9,950, ~99.5 still test positive (1% false positive rate).
Total positive tests: 49.5 + 99.5 = 149
Out of those 149 positive results, only ~49.5 are true users.
→ 49.5 / 149 ≈ 33.2%
Why This Surprises People
This is a classic example of the base rate fallacy. Most people intuitively think “the test is 99% accurate, so a positive means ~99% chance they use it.” They focus only on the accuracy of the test and ignore how rare the condition is (the base rate of 0.5%).
When a condition is rare, false positives dominate. Even a tiny error rate (1%) applied to the vast majority of non-users (99.5% of people) creates more false positives than there are actual users.
This same pattern appears in medical testing, airport screening, criminal forensics, and many other areas — highly accurate tests can still be mostly wrong when the underlying event is uncommon.
Asked Nov 1, 2026. Unedited.
What it’s good at
Ranked against 42 models, from public leaderboards and our own blind tests where we have them. How we rank
- #27of 42 for research
- #29of 42 for writing
- #30of 42 for everyday chat
The facts
Grok 4.20 Reasoning is xAI’s Grok 4.20 in its reasoning mode. It reads images and PDFs as well as text.
Scores from artificialanalysis.ai and lmarena.ai.
- Made by
- xAI
- API price, per 1M tokens
- $1.25 in, $2.50 out
- Speed
- No public score
- Artificial Analysis Index
- No public score
- LMArena text
- No public score
- LMArena coding
- No public score
- Updated
- Oct 26, 2026