Skip to main content

CPAI Platform Documentation

CPAI (Cognitive PDF AI) is a self-hosted, CPU-based AI document intelligence platform built for the AI Essentials demo. It enables users to upload PDF documents, automatically extract and vectorize content using a RAG (Retrieval-Augmented Generation) pipeline, and generate comprehensive AI-powered summaries — all running on commodity hardware without a GPU.

What CPAI Does

  1. Upload a PDF document through the web interface
  2. Extract text content from the PDF
  3. Chunk the text into overlapping segments and generate vector embeddings
  4. Store chunks with embeddings in PostgreSQL (pgvector)
  5. Summarize using RAG — retrieve relevant chunks, assemble a prompt, and generate a structured summary via Qwen2.5 LLM
  6. Chat — ask follow-up questions about the document using the same RAG pipeline

Key Features

FeatureDescription
PDF UploadDrag-and-drop, up to 50 MB
RAG PipelineAutomated text extraction, chunking, embedding, and summarization
Interactive ChatAsk questions about uploaded documents
JWT AuthenticationSecure login with role-based access
Audit LoggingAll operations tracked with user, action, timestamp, IP
7 LanguagesCS, EN, DE, FR, ES, RU, ZH
Real-time MetricsService health, response times, success rates
PDF ExportExport summaries as branded PDF reports
Dark/Light ThemeToggle between dark and light modes

Architecture at a Glance

Technology Stack

LayerTechnology
FrontendReact 19, Vite 7, TailwindCSS 4, TypeScript
Backend.NET 10, ASP.NET Core, EF Core
DatabasePostgreSQL 16 + pgvector 0.7
Workflowsn8n Community Edition
LLMOllama + Qwen2.5-1.5B (CPU)
DeploymentCoolify on Hetzner (64 GB RAM, no GPU)