โ† Back to Portfolio
CS 491 - Senior Capstone Final Technical Report

Merck AI Scenario Planning Chatbot

Developing an LLM-driven project scheduling tool using Next.js, AI SDK, and tool-calling for Merck's planning workflows.

Author / Lead DevPercy Flores
InstitutionNJIT
CourseCS 491 - Spring 2025
SponsorRyan Blanton (Merck)
Tech StackNext.js, Server Actions, Vercel Blob
Outcomeโœ“ Successfully Deployed
Abstract

The AI Planning Scenario Chatbot project was developed as my final Capstone under the sponsorship of Ryan Blanton from Merck. The primary objective was to create a conversational interface that allows users to upload and interact with Microsoft Project plan files, enabling natural language exploration of project tasks, schedules, and dependencies. By replacing rigid, manual methods of interpreting project plans, this LLM-driven chatbot brings automation and conversational intelligence directly into the enterprise planning workflow. As the lead full-stack developer, I architected the Next.js application, integrated the AI runtime, and engineered the function-calling logic that maps natural language queries to discrete data operations.

ยง 1

System Architecture & Tech Stack

I designed the application using a modern, scalable, serverless-first architecture optimized for generative AI workloads.

ยง 2

LLM Tool Calling Implementation

To give the chatbot the ability to actually perform actions rather than just chat, I engineered a robust tool-calling (function-calling) pipeline. When the LLM determines a user query requires data manipulation or retrieval, it invokes specific server-side functions I exposed to its runtime context.

TYPESCRIPT - TOOL CALLING REGISTRY
const tools = {
  getProjectSummary: tool({
    description: 'Retrieves the high level summary of the uploaded project plan.',
    parameters: z.object({ projectId: z.string() }),
    execute: async ({ projectId }) => fetchSummary(projectId),
  }),
  findTaskDependencies: tool({
    description: 'Finds blocking upstream tasks for a specific task.',
    parameters: z.object({ taskName: z.string() }),
    execute: async ({ taskName }) => queryDependencies(taskName),
  }),
  // 7 additional tools engineered for MS Project queries...
};

By defining strict zod schemas, the LLM is forced to return highly structured JSON matching the expected parameter types, preventing runtime errors and ensuring deterministic data querying. The AI SDK seamlessly handles the conversational loop, calling my functions, awaiting the Promises, and returning the aggregated data to the user in natural language.

ยง 3

Deployment & Evaluation

The application was deployed seamlessly to Vercel, providing automated CI/CD directly from the GitHub repository. During testing, the chatbot successfully parsed complex Microsoft Project constraint structures and correctly answered multi-hop queries (e.g., "If Task A is delayed by 3 days, what is the impact on Milestone B?") by utilizing the findTaskDependencies and impactAnalysis tools.

โœ“

Sponsor Acceptance

The final deliverable met all core functional requirements outlined by the Merck sponsor, successfully demonstrating how an LLM can automate complex scheduling analytics.

Appendix: Raw Execution Evidence

The following are the raw screenshots and diagrams captured during the original execution and presentation of the Capstone project.

Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail Merck Project Detail