Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.zapthinker.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The RAG Bot integration allows you to create AI-powered chatbots that can answer questions based on your own documents and knowledge base. Using advanced semantic search and vector databases, RAG bots provide accurate, context-aware responses by retrieving relevant information from your uploaded documents.

Key Features

  • Document Upload: Upload PDFs, text files, and other documents to build your knowledge base
  • Semantic Search: Advanced vector search to find the most relevant information
  • AI-Powered Responses: Generate natural language responses using GPT models
  • Session Management: Track and manage conversations with users
  • Customizable Prompts: Define custom response templates and behavior
  • API Tools Integration: Connect external APIs to extend bot capabilities
  • Fallback Support: Configure fallback bots for handling queries outside your knowledge base

How It Works

  1. Upload Documents: Add your knowledge base documents (PDFs, text files, etc.)
  2. Automatic Processing: Documents are split into chunks and converted to vector embeddings
  3. Semantic Search: When users ask questions, the system searches for relevant document chunks
  4. AI Response Generation: The AI model generates responses based on retrieved context
  5. Continuous Learning: Update your knowledge base anytime by uploading new documents

Configuration

Basic Setup

{
  "enabled": true,
  "triggerType": "all",
  "triggerOperator": "contains",
  "triggerValue": "",
  "maxResults": 5,
  "similarityThreshold": 0.7,
  "modelName": "gpt-4o-mini",
  "temperature": 0.7,
  "keyspace": "your-keyspace-id"
}

Parameters

  • maxResults: Number of document chunks to retrieve (1-20)
  • similarityThreshold: Minimum similarity score (0-1) for relevant results
  • modelName: AI model to use (gpt-4o-mini, gpt-4o, etc.)
  • temperature: Response creativity (0 = focused, 2 = creative)
  • responsePrompt: Custom system prompt to guide AI behavior

Use Cases

Customer Support

Build a support bot that answers questions based on your product documentation, FAQs, and help articles.

Internal Knowledge Base

Create an internal assistant that helps employees find information from company policies, procedures, and documentation.

Educational Content

Develop a learning assistant that answers questions based on course materials, textbooks, and study guides.

Product Information

Build a product expert bot that provides detailed information from product manuals, specifications, and guides.

Best Practices

  1. Document Quality: Upload well-structured, clear documents for better results
  2. Chunk Size: Keep document sections focused and coherent
  3. Similarity Threshold: Start with 0.7 and adjust based on result quality
  4. Custom Prompts: Use response prompts to define bot personality and behavior
  5. Regular Updates: Keep your knowledge base current by uploading new documents
  6. Fallback Strategy: Configure fallback bots for queries outside your domain

API Tools Integration

Enhance your RAG bot with external API capabilities:
  • Weather Information: Provide real-time weather data
  • Database Queries: Fetch live data from your systems
  • Third-Party Services: Integrate CRM, ticketing, or other platforms
  • Custom Functions: Execute any custom logic via API calls

Session Management

Track and manage user conversations:
  • View active sessions
  • Monitor conversation history
  • Pause or close sessions
  • Reset conversation context
  • Add internal notes for human handoff

Advanced Features

Ignore JIDs

Prevent the bot from responding to specific phone numbers or groups.

Message Sync

Sync existing WhatsApp messages to your vector database for improved context.

Sync Status

Monitor the progress of document processing and message synchronization.

Getting Started

  1. Create a RAG bot via the API
  2. Upload your knowledge base documents
  3. Configure similarity threshold and model settings
  4. Test with sample questions
  5. Deploy to your WhatsApp instance
For detailed API documentation, see the API Reference section.