How to structure an earn out to align incentives

Hey yall,

I'm about to put in an offer for a service business with around 2M in revenue and I'd like to include an earnout or another vehicle to align our incentives over the medium term,

What have you experienced? What has worked and what hasn't? My goal is for the sellers to get the full asking price for their business while incentivizing them to remain and assist with transferring relationships and training.

Thanks!