1. Setup Embedded Chat – https://trailhead.salesforce.com/content/learn/modules/web-chat
2. Enable Survey in Salesforce setup.
3. Go to Surveys tab and create a simple Survey.
4. Go to Embedded Service Deployments in Setup.
5. Select View from the Action menu.
6. Click Start button in Chat Settings section. Use the Survey in Embedded Chat.