Smart Interviews: AI-Powered Recruitment
Learn how to create a robot that can conduct interviews for you and report on how the candidate did using sentiment analysis and speech recognition.
Many times, as a recruiter, you’ll find both active and passive candidates who fulfill a job description. Some problems arise when the candidate has to go to the office to conduct an interview with the recruiter. The main issues are related to distance and transportation. Also, if we are dealing with a passive candidate who already has a job, conducting an interview is almost impossible. If you can reach them, you need to provide facilities to proceed with the interview. We provide a solution architecture based on an interactive chatbot. As a recruiter, the chatbot begins with a welcome message using the voice of the Google Translate service and the candidate interacts with the chatbot by voice. Once the interview is finished, an email with a report including the contact data, a sentiment analysis process, a summary, and the transcription is sent to the human recruiter. This system can be developed and deployed and allow candidates to take the interview anytime and anywhere.
In the next figure, we provide a high-level functional description overview.
The idea is to automate the candidate interview process using artificial intelligence technologies. First, we develop a virtual assistant, as shown in the figure above, which is a conversational agent capable of orchestrating the whole interview process. Then, we use different machine learning techniques to build and train models which will be capable of executing the various steps in the figure above. The following is a description of each step in the process, as illustrated above:
1. The virtual assistant presents the candidate with a web form for capturing name and contact information.
2. The virtual assistant starts the chat, welcomes candidate to the interview, and proceeds with interview questions via voice and text.
3. The responses received from the candidate are analyzed to detect the predominant feeling for every response and to generate a bar chart for inclusion within the final interview report.
4. The responses are also used to build a summary of the interview to be included in the final report.
5. Upon finishing the interview, the virtual assistant generates the report and sends via email to the human hiring manager.
The next figure shows the technical description of our system. Next sections provide some creative ways to use and develop the several components we’ve implemented.
We have designed a front-end for the user and a formatted report to be presented as a prototype to the recruiter, as the next figure shows. The next sections correspond with each of the services developed.
For speech to text, we use the Web Speech API, which makes it easy to add speech recognition to your web pages. This API allows satisfactory control and flexibility for Chrome version 25 and later.
Bot Engine (NLP)
For the virtual assistant engine, we use api.ai/DialogFlow to configure all our intents, entities, and so on. Before you begin, check out the weather virtual agent tutorial here. Once you are familiar with concepts like intents, entities, and webhooks, you can design your own bot engine with text capabilities. What can we do to provide speech capabilities to our bot? The idea is to use a webhook to fulfill the request and use a cloud function to manipulate each of the intent messages. We will explain this in the next section.
We can create a simple Node.js application using the Google’s TTS API to convert text to audio and create a response that sends it to DialogFlow and then to the user front-end. The response is sent by a JSON file.
First, we need to get the Firebase SDK using the following code into a shell.
Execute the following command to authenticate into Firebase using your Google account linked to Google Cloud.
Then, go to your project directory and execute the following command.
Once all is completed, you’ll have a project directory similar to this:
Copy the previous Node.js function to the file index.js and deploy your function using:
If all is going right, then an URL will be provided, similar to:
More information can be found here. Sometimes, you may need to add these variables to your index.js:
It’s important to note that you need a Google Cloud project configured in order to use this code.
We designed a summarizer in Python and exposed the service using Django. For the Python summarizer, we used the Python summy library:
For sending the email, two server-side libraries are required: nodemailer.js and body-parser.js. The first library is used to configure the SMTP transport layer and send the email. The second library is used to manage attachments and POST requests.
And that’s it! You just need to connect all components in the middleware in order to manage each task.