A strong letter comes from genuinely impressing someone over time, not from asking nicely at the end, so this starts on day one of the rotation. Be the reliable, prepared, enthusiastic student who knows their patients deeply, follows through on every "I'll look it up," and treats everyone with respect. Get real face time with the attending who'll write for you, present well to them, ask thoughtful questions, take on extra, and let them see your growth across the rotation. A great letter is specific, the writer needs concrete memories of YOU doing well, so make those memories happen. When you ask, do it directly and earlyish, "Would you feel comfortable writing me a strong letter?", which politely gives them an out if they can't. Provide your CV and details to help them write it well. Earn it through consistent excellence and the letter writes itself.