Development & Implementation of an AI Chatbot

Completed
August 2025 - Oct 2025
Freelancer project

The client operates a web application for care facilities where employees and partners regularly submit support requests. To reduce the workload and automate answers to recurring questions, a chatbot was integrated into the existing Next.js app. The chatbot was built with the Vercel AI SDK, written in TypeScript, and uses PostgreSQL to store chat sessions and context data.

The challenge

Before the chatbot, the client’s support team received many repetitive requests via email and phone. Most of these questions were already covered in the internal documentation but were hard to access. The main challenge was to make this documentation usable and to provide instant answers inside the web application without adding extra work for the support staff.

  • High number of repeated support inquiries
  • Existing documentation was underutilized
  • Need for a seamless integration within the existing web app

Project goals

The goals of the project were:

  • Reduce recurring support requests
  • Provide an interactive chat interface within the existing app
  • Use the client’s documentation as a knowledge base (RAG)
  • Store chat histories for future improvements
  • Ensure scalability and easy model updates

Solution approach

The chatbot was developed as a separate module inside the existing Next.js architecture. Using the Vercel AI SDK, a direct connection to the language model was established. The client’s documentation was integrated as a Retrieval-Augmented Generation (RAG) source to ensure context-aware responses. All user interactions were stored in a PostgreSQL database for later evaluation and optimization.

  • Modular integration within the existing Next.js app
  • RAG setup to leverage the existing documentation
  • Database persistence for sessions and analytics
  • Seamless TypeScript and Vercel CI/CD workflow

The implementation

The implementation included:

  • Frontend: Chat UI integrated into the existing Next.js web app
  • Backend: API routes connecting the frontend to the Vercel AI SDK
  • RAG Integration: Indexed documentation used for contextual responses
  • Database: PostgreSQL for chat sessions and user feedback
  • Deployment: Hosted on Vercel with automated CI/CD pipelines
  • Language: Fully implemented in TypeScript

The result

The project successfully delivered a fully functional chatbot that is now actively used by the client’s staff. It reduced repetitive support requests and provided faster, more consistent answers to users. The internal team reported noticeable time savings and improved efficiency.

  • Live chatbot used in production
  • Reduced number of recurring support emails and calls
  • Improved user satisfaction and response time

Insights

This was my first AI-focused project and an important milestone in learning how to design and deploy RAG-based chatbots. I gained hands-on experience with AI model integration, prompt design, and data-driven chatbot architectures. The successful launch strengthened my expertise in combining modern AI technologies with production-grade web systems.

  • First hands-on AI project experience
  • Deeper understanding of RAG architectures
  • Learned to integrate AI systems into real-world Next.js apps