Skip to content

LLM Processing

Claude Integration

The system uses Anthropic's Claude Sonnet 4 model as the primary AI engine.

Configuration

Setting Value
Model claude-sonnet-4-20250514
Temperature 0.1 (for consistent responses)
Max Tokens 4096
Streaming Enabled

System Prompts

  • Slack - Optimized for Slack communication style
  • Teams - Optimized for Microsoft Teams environment
  • Default - General-purpose AI assistant

Tool Integration

  • MCP tools for external data access
  • Web search capabilities
  • File processing tools
  • Custom business logic tools

Message Processing Flow

  1. Input Validation - Validates message format and user permissions
  2. Content Processing - Processes text, files, and audio content
  3. Context Building - Retrieves conversation history and user context
  4. AI Processing - Sends to Claude with appropriate system prompts
  5. Response Generation - Streams response back to user
  6. Persistence - Saves conversation and usage data

Debug Modes

Mode Description
[debug] Full request/response logging with tool call details
[info] Basic tool call notifications
Default Standard processing without debug output

File Processing

Supported File Types

Text Files:

  • PDF: Native Claude processing
  • TXT: Direct text processing
  • HTML: Structured content extraction

Structured Data:

  • CSV: LangChain CSVLoader with column support
  • Excel: XLSX/XLS processing with sheet support
  • JSON: Structured data processing

Media Files:

  • Images: JPG, PNG, GIF, WebP, BMP, TIFF
  • Audio: MP3, WAV, M4A, OPUS (with transcription)

Documents:

  • DOC/DOCX: Microsoft Word documents
  • PPT/PPTX: PowerPoint presentations

File Import Workflow

  1. Upload - File uploaded via multipart form data
  2. Validation - File type and size validation
  3. Storage - Upload to Google Cloud Storage
  4. Processing - AI-powered format conversion
  5. Template Application - Structured data extraction
  6. Output Generation - Convert to requested format
  7. Storage - Save processed file
  8. Registration - Register with commercial API
  9. Response - Return content or download URL

Template System

interface Template {
    name: string;
    entityType: string;
    description: string;
    requiredFields: string[];
    fields: string[];
}