Roma, Italy +39 389 972 2602

All projects

AI · SaaS

Chat RAG — AI Document Assistant

A RAG-powered chatbot that lets users upload documents and have intelligent conversations with AI, complete with source citations.

Chat RAG title card, retrieval, context, citations, surrounded by document tiles linked by thin lines on a dark blue background
  • Vector Search
  • Streaming Responses

RAG architecture

Year
2025
Client
MonteDelGallo (Product)
Duration
1 month
Services
AI Development, Product Development
Platforms
Web
Built with
  • Hotwire
  • OpenAI
  • pgvector
  • PostgreSQL
  • Ruby on Rails

The Project

Chat RAG is a Retrieval-Augmented Generation platform that transforms static documents into interactive knowledge bases. Users upload PDFs or text files, and the system creates vector embeddings that enable AI-powered conversations with accurate source references.

Key Features

  • Document upload & processing — PDFs and text files are chunked, embedded, and indexed automatically
  • Semantic search via pgvector — finds relevant document passages using vector similarity
  • Source citations — every AI response includes references to the specific document sections used
  • Multi-user chat — each user has their own document library and conversation history
  • Real-time streaming — AI responses stream token-by-token via WebSockets
  • Role-based access — superadmin manages all documents, users manage their own

Technical Highlights

Rails 8.1 with PostgreSQL + pgvector extension for vector storage and similarity search. RubyLLM for LLM orchestration (OpenAI, OpenRouter). tiktoken_ruby for accurate token counting. Background document processing via Solid Queue. Real-time streaming via Turbo Streams.

All projects