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πŸ˜ƒ

Top comments (0)