Skip to content

[200] fix the structure of the interview - #170

Merged
Andriamanampisoa merged 21 commits into
stagingfrom
200-fix-the-structure-of-the-interview
Jul 14, 2026
Merged

[200] fix the structure of the interview#170
Andriamanampisoa merged 21 commits into
stagingfrom
200-fix-the-structure-of-the-interview

Conversation

@Andriamanampisoa

Copy link
Copy Markdown
Collaborator

What type of PR is this? (check all applicable)

  • ✨ Feature
  • 🛑 Bug
  • ⚠️ Anomaly
  • 📝 Doc
  • 🎨 Style
  • 🧑‍💻 Refactor
  • 🛠️ Setup
  • 🏗️ Build
  • 🔥 Perfs
  • ✅ Test
  • 🔁 CI
  • ⏩ Revert

Description

This pull request introduces a new "session_start" flow for interviews, improves the speech-to-speech interview engine, and updates prompt and token settings for the LLM. The main changes are grouped by theme below:

Backend WebSocket and Microservice Integration:

  • Added support for a new session_start WebSocket message type, including handler methods in both WebsocketManager and MicroservicesManager. This enables the backend to trigger a proactive opening greeting from the STS microservice at the start of an interview. [1] [2] [3] [4]
  • Implemented the send_session_start_to_sts and process_session_start_job methods to enqueue and process session start jobs for the STS microservice, including error handling and response routing. [1] [2] [3] [4] [5] [6]
  • Added a new SessionStart job kind to the STS job enum to distinguish session start logic from other job types.

Interview Engine Improvements:

  • Introduced a new interview_flow.py module to manage interview flow state, including logic for opening greetings, phase transitions, user presentation detection, and dynamic instructions for each interview phase. This supports more natural and structured interview conversations.

Prompt and LLM Configuration Updates:

  • Updated the LLM system prompt in config.json to clarify the recruiter’s proactive role, ensure structured interview phases, and require concise, single-turn responses.
  • Increased the LLM's maximum new tokens from 160 to 320 in both the microservice config and Docker Compose, allowing for longer responses when needed. [1] [2]

Linked GitHub Ticket

Closes EpitechPromo2027/G-EIP-600-NAN-6-1-eip-tugdual.de-reviers#200

Workspace

  • 🖥️ Web
  • 🛠️ Server
  • 🔁 CI
  • 🤖 Ai
  • 📱 App

Screenshots

Screenshot From 2026-07-14 14-53-49

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
talk-up-ai-dev Ready Ready Preview, Comment Jul 14, 2026 6:03pm

@cursor

cursor Bot commented Jul 14, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches the live simulation WebSocket path, STS interview state, and Redis session history; regressions could affect greetings, mid-interview reconnects, or interview completion, though coverage is added for flow and restore logic.

Overview
Proactive start and end-to-end wiring: When a call becomes active, the web client sends session_start once over the simulation WebSocket. The C++ AI gateway handles that message, enqueues an STS SessionStart job, and returns the opening sts_result (audio) to the browser. STS generates the welcome via generate_opening_greeting, with reconnect-safe replay of a stored greeting and silence if the candidate has already spoken.

Structured interview behavior in STS: New interview_flow drives phase instructions (presentation → parcours → compétences → motivation → échange → conclusion), tracks greeting/farewell/presentation state, and sets simulation_complete after the closing exchange. Recruiter prompts are aligned across STS, Nest simulation context, and config; LLM_MAX_NEW_TOKENS rises to 320. LLM output strips bracket placeholders before TTS.

Session history: Nest exposes POST .../assistant-turn so the opening (and other assistant-only) turns persist in Redis without a user message; STS calls this when the greeting is sent.

Web session UX: Session restore distinguishes transient vs terminal API errors, can resume queued sessions, clears stale slots before a new interview, and ends the call when simulation_complete is signaled after playback.

Build/ops: Several AI Dockerfiles add apt/pip retries and leaner package installs; simulation HTTP client timeout is configurable via SIM_AI_INIT_TIMEOUT_MS.

Reviewed by Cursor Bugbot for commit e7024c0. Bugbot is set up for automated code reviews on this repo. Configure here.

@Andriamanampisoa
Andriamanampisoa marked this pull request as draft July 14, 2026 13:07
@railway-app
railway-app Bot temporarily deployed to talk-up-ai / TalkUp.AI-pr-170 July 14, 2026 13:07 Destroyed
@Andriamanampisoa Andriamanampisoa self-assigned this Jul 14, 2026
Comment thread ai/microservices/speech-to-speech/engine/stsProcess.py
Comment thread ai/microservices/speech-to-speech/engine/interview_flow.py
Comment thread ai/microservices/speech-to-speech/engine/pipeline.py
Comment thread ai/microservices/speech-to-speech/engine/interview_flow.py
@railway-app

railway-app Bot commented Jul 14, 2026

Copy link
Copy Markdown

🚅 Deployed to the TalkUp.AI-pr-170 environment in talk-up-ai

Service Status Web Updated (UTC)
Backend ✅ Success (View Logs) Jul 14, 2026 at 6:03 pm

@railway-app
railway-app Bot temporarily deployed to talk-up-ai / TalkUp.AI-pr-170 July 14, 2026 14:47 Destroyed
Comment thread ai/microservices/speech-to-speech/engine/pipeline.py
Comment thread ai/microservices/speech-to-speech/engine/interview_flow.py Outdated
Comment thread web/src/hooks/simulation/useInterviewSession.ts Outdated
Comment thread ai/microservices/speech-to-speech/engine/interview_flow.py Outdated
Comment thread ai/microservices/speech-to-speech/engine/pipeline.py
Comment thread server/src/modules/simulation/simulation-internal.controller.ts
Comment thread server/src/modules/simulation/simulation.module.ts Outdated
Comment thread ai/microservices/speech-to-speech/engine/interview_flow.py
Comment thread ai/microservices/speech-to-speech/config.json
…ubstring match, prettier, tsc, test gaps
@railway-app
railway-app Bot temporarily deployed to talk-up-ai / TalkUp.AI-pr-170 July 14, 2026 16:52 Destroyed
Comment thread web/src/hooks/simulation/useInterviewSession.ts
Comment thread ai/core/server/src/network/MicroservicesManager.cpp
Comment thread ai/microservices/speech-to-speech/engine/pipeline.py
Comment thread web/src/components/organisms/simulation-workspace/index.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e7024c0. Configure here.

Comment thread web/src/components/organisms/simulation-workspace/index.tsx
@railway-app
railway-app Bot temporarily deployed to talk-up-ai / TalkUp.AI-pr-170 July 14, 2026 18:02 Destroyed
@BhuvanArn
BhuvanArn self-requested a review July 14, 2026 19:58
@Andriamanampisoa
Andriamanampisoa merged commit 7fd3d2e into staging Jul 14, 2026
12 checks passed
@Andriamanampisoa
Andriamanampisoa deleted the 200-fix-the-structure-of-the-interview branch July 14, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants