What a silly policy. Who but the most short-sighted possible person would quit after only two weeks on a job? That's not enough time to know if it'll work out and $5,000 is less than the monthly take-home pay for many software engineers.
Wait until six months in, and offer three months' salary. Then you'll see who wants to stay and who doesn't.
Your proposal will reward people who can find a new equivalent job in six months with a temporary 50% raise or fund people for three months to find another job.