AI Onboarding Assistant — Prompt Design & Challenges
GSK AI Assessment · Tomasz Adamusiak
Tool Choice
I built this as a Next.js web application using the Vercel AI SDK with Anthropic's Claude Sonnet as the underlying model. The Vercel AI SDK provides streaming chat responses out of the box, making it an ideal low-code framework for building conversational AI agents. The entire application was generated using Claude Code (Anthropic's CLI tool) as the development assistant.
System Prompt Design
The core of the agent is a detailed system prompt that encodes the full SOP 15 v4.0 knowledge. Key design decisions:
- •Structured SOP extraction: The entire SOP was parsed and organized into clear sections (Required Trainings, Checklist Items, Contacts, Deadlines) so the model can retrieve specific information quickly.
- •Conversational flow instructions: The prompt instructs the agent to start by welcoming the user, asking their name/role, and then guiding them step-by-step through the onboarding process—rather than dumping all information at once.
- •Deadline awareness: The prompt emphasizes key deadlines (e.g., “within 2 weeks of hire”) and renewal periods (e.g., GCP every 3 years) so the agent proactively reminds users of time-sensitive requirements.
- •Branching logic: The prompt includes conditional routing (e.g., third-party employees are directed to SOP 21), showing the agent can adapt to different user contexts.
- •Scope boundaries: The agent is instructed to politely redirect if asked about topics outside the onboarding scope, keeping conversations focused and accurate.
Challenges Encountered
- •Balancing detail vs. overwhelm: The SOP contains dense regulatory information. A key challenge was structuring the prompt so the agent reveals information progressively rather than overwhelming new hires with everything at once.
- •Contact information accuracy: The SOP references specific people and email addresses for scheduling trainings. These may change over time, so in a production system the prompt should be dynamically updated from a maintained data source.
- •Progress tracking limitations: A conversational agent has no persistent state across sessions. A production version would benefit from a database-backed checklist that persists the employee's training completion status.
- •Handling ambiguity: Some trainings are “as applicable” (e.g., RedCap, phlebotomy). The agent needs to ask clarifying questions about the employee's specific role to determine which optional trainings apply.
Architecture
The application uses a simple but effective architecture: a Next.js App Router frontend with a streaming chat UI, backed by a single API route that calls OpenAI's GPT-4o-mini with the SOP-encoded system prompt. The Vercel AI SDK's useChat hook handles message state, streaming, and the request lifecycle. Deployed on Vercel for instant global availability.