DEV Community

Cover image for Customer Support RAG Assistant
kobtze
kobtze

Posted on

Customer Support RAG Assistant

This is a submission for the Open Source AI Challenge with pgai and Ollama

What I Built

I created a customer support RAG assistant.

  1. User request for is submitted (e.g. 'having trouble with XYZ')
  2. Semantic search is performed to look for similar tickets in DB
  3. Prompt to LLM includes user query and similar tickets retrieved
  4. Server returns suggested response to user

Demo

https://bit.ly/4flG7xI
MS Office issue

Tools Used

pgvector

Signed up for TimescaleDB service to create a PostgreSQL instance with vector capabilities using pgvector.

Timescale CSV import

Used this dataset from Kaggle with ~600 customer support tickets.

pgai Vectorizer / Open AI API

Created a vectorizer to create vector embeddings of users requests (email body column).

gpt-3.5-turbo

Server calls gpt-3.5-turbo completions API to compose suggested response to user based on their query and similar tickets found.

Source Code

Server App
Client Web App

Final Thoughts

Prize categories

Vectorizer Vibe😃

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free