In late 2023 we started working on automated feedback for mock interviews. A candidate answers a set of questions on camera, one recording per question, and we wanted to score each answer on energy, communication, professionalism, sociability, positive emotion and a few speech measures (pace, clarity, sentiment, vocal energy), with a short reason for each score. We had a proof of concept by the end of the year, and it went live in 2024.
Why we didn't just give the video to a model
At the time, the LLMs that were good enough to reason about this kind of thing only took text. OpenAI's vision model had just become available to developers, but it worked on still images, the rate limits were low, and running it over enough frames of every answer wasn't going to be affordable. Nothing we could realistically use took video directly.
We also looked at whether we could train something ourselves. We didn't have rated interview data, though, and building a dataset before we knew whether the approach would work at all didn't seem like a good use of time.
Since we couldn't pass the video to an LLM, we looked at ways to extract useful information from it first. What we settled on was running a few specialised models over the video and giving their outputs to the LLM as text.
How a video was processed
Each answer was converted to MP4 with ffmpeg and split into five-second windows. For every window we collected four things:
- Transcript. The audio was cut into matching five-second clips and each clip went to OpenAI's Whisper API. With the rate limits we had, that worked out to about three clips a minute, so longer answers spent a fair amount of time waiting.
- Activity. Microsoft's X-CLIP scored the window against a list of behaviours like speaking, listening, looking away, eating or using a phone.
- Objects. YOLOS-tiny ran on one frame from the window and listed what it found: person, laptop, phone and so on.
- Posture. MediaPipe Pose ran on the same frame. Some basic geometry on the landmarks gave us head tilt, shoulder tilt, spine curvature and how close the person was to the camera.
That gave us one row of text per window. The rows went to GPT-3.5 Turbo Instruct through LangChain, seven at a time, with a prompt that described the nine parameters and a list of penalties: checking a phone, yawning, slouching, not speaking at all, and so on. The response was parsed into a fixed structure of nine scores, each with a reason. If an answer needed more than one batch, a second prompt merged the batch ratings into one and was told to weigh repeated problems more heavily than one-off slips.
An interview was this process repeated for each question. We pulled the list of videos for the interview, ran them through one at a time, and returned scores per answer.
Each answer video went through the same steps, one after another. The specialised models only produced text; the scoring happened in the two LLM steps on the right.
Where it fell short
- Five-second audio clips. Cutting the audio that finely split words and sentences across clips, which didn't help transcription. It was also why we kept running into rate limits. Whisper would have accepted a whole answer in one request and returned timestamps.
- The fallback score. When the LLM's response couldn't be parsed, the code defaulted every score to 50. That kept things running, but we couldn't tell a failed evaluation from a genuine score. We did stop caching results that came back as 50, but that was a workaround rather than a fix.
- Scores without a direct input. We reported a score for positive emotion from facial expression, but nothing in the pipeline looked at faces. The LLM was inferring it from posture and activity labels. The speech scores were similar: they came from transcripts, with no audio analysis behind them.
- The object rule. The prompt applied a heavy penalty for any object other than a person or a laptop. YOLOS-tiny on one frame every five seconds can easily pick up a chair or a mug, and that was enough to pull a reasonable answer down.
- Consistency. The LLM ran at a temperature of 0.3, so the same video could get slightly different scores on two runs.
- Shared temporary files. Audio was always written to the same path, and the working folders were cleared after each video. That's one reason videos had to be processed one at a time.
What changed in 2024
Gemini 1.5 Pro, in February, took video and audio directly. GPT-4o, in May, took images and audio. In August, OpenAI added structured outputs, so a response could be held to a fixed schema without the parse-and-retry handling we had built.
Given what was available in late 2023, I still think the approach made sense. By the middle of 2024, though, there was good reason to reconsider whether we needed most of this pipeline.
How we deployed and ran it is in the next article. How I'd approach it today, I'm leaving for a future one.
