The purpose of an exit interview is to gather employees' feedback on the work experience in order to improve working conditions and retain employees (specially in organizations with a high turn around of personnel). This can be handled by the Functional Manager since it gathers non compromising information.
In other cases the exit interviews are focused on improving work productivity, providing an early warning about potential harassment, workplace violence and discrimination issues and measuring the success of diversity initiatives. These should be managed by neutral parties like Human Resources since some questions (and honest answers) may be really sensitive and not recorded.
There several sites that provides you with specific details and questions to conduct them depending on what you'd like to achieve; e.g. transfer of knowledge to other employees.
I have listed below few samples of the most common exit interview questions that we have usually asked in my organization to departing employees:
- What is your primary reason for leaving?
- Did anything trigger your decision to leave?
- What was most satisfying about your job?
- What was least satisfying about your job?
- Did your job duties turn out to be as you expected?
- Did you receive enough training to do your job effectively?
- Did you receive sufficient feedback about your performance between merit reviews?
- Did this company help you to fulfill your career goals?
- What would you improve to make our workplace better?
- Were you happy with your pay, benefits and other incentives?
- What could your immediate supervisor do to improve his or her management style?
- Did any company policies or procedures (or any other obstacles) make your job more difficult?
- Did anyone in this company discriminate against you, harass you or cause hostile working conditions?
Since you are looking for a generic feedback you can conduct the interview using several generic questions related to the working environment and experience.
Finally, as David Espina has mentioned on his response, you should get an understanding on what you are allowed to ask since the rules may vary according to the organization's nature and policies. If you are not clear it's better to involve HR.