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
- Upload Documents: Add your knowledge base documents (PDFs, text files, etc.)
- Automatic Processing: Documents are split into chunks and converted to vector embeddings
- Semantic Search: When users ask questions, the system searches for relevant document chunks
- AI Response Generation: The AI model generates responses based on retrieved context
- Continuous Learning: Update your knowledge base anytime by uploading new documents
Configuration
Basic Setup
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
- Document Quality: Upload well-structured, clear documents for better results
- Chunk Size: Keep document sections focused and coherent
- Similarity Threshold: Start with 0.7 and adjust based on result quality
- Custom Prompts: Use response prompts to define bot personality and behavior
- Regular Updates: Keep your knowledge base current by uploading new documents
- 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
- Create a RAG bot via the API
- Upload your knowledge base documents
- Configure similarity threshold and model settings
- Test with sample questions
- Deploy to your WhatsApp instance

