--- title: "Knowledge Sources Module Documentation" description: "Documentation for Knowledge Sources" --- ## Table of Contents 1. [Module Overview (Technical)](#1-module-overview-technical) 2. [Module Overview (Commercial/Business)](#2-module-overview-commercialbusiness) 3. [Module Overview (End User/Administrator)](#3-module-overview-end-useradministrator) 4. [Configuration Sections](#4-configuration-sections) 5. [Common Scenarios & Examples](#6-common-scenarios--examples) 6. [Troubleshooting Tips](#8-troubleshooting-tips) --- ## 1. Module Overview (Technical) ### What Are Knowledge Sources? **Knowledge Sources** provide dynamic, vectorized context to AI Agents (both Voice Agents and Web Chatbots). Instead of hardcoding all business logic into a system prompt, administrators can use the **AI Crawler Integration** to ingest public websites, documentation, and FAQs. The data is scraped, parsed, and embedded into a vector database, allowing the AI Agents to retrieve real-time, accurate context via Retrieval-Augmented Generation (RAG). ### Architecture ``` ┌─────────────────────────────────────────────────────────────────┐ │ Knowledge Sources Architecture │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ Knowledge Source Configuration │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ Type: Web Crawler │ │ │ │ Target URL: https://docs.ring2all.com │ │ │ │ Extraction Depth: 2 levels │ │ │ │ Sync Frequency: Every 24 hours │ │ │ └────────────────┬─────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ Crawler Engine (Upsert Strategy ON CONFLICT) │ │ │ │ - Avoids duplicate key constraints │ │ │ │ - Maintains Always-Active Save Standard │ │ │ └────────────────┬─────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ Vector Database (Dynamic Context) │ │ │ │ - Chunks Markdown & HTML │ │ │ │ - Generates Embeddings │ │ │ └────────────────┬─────────────────────────────────────────┘ │ │ │ │ │ ▼ │ │ ┌──────────────────────────────────────────────────────────┐ │ │ │ AI Agent (Voice or Web) │ │ │ │ - Interrogates Vector DB before responding to user │ │ │ └──────────────────────────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────────┘ ``` ### Key Technical Details - **Upsert Strategy:** The backend uses a highly robust ON CONFLICT upsert strategy (`uq_ai_agent_dynamic_contexts_agent_key`) to prevent primary key collisions when dynamically crawling URLs. - **Always-Active Save:** Configuration changes are saved immediately and background crawling tasks are queued without blocking the UI. --- ## 2. Module Overview (Commercial/Business) ### Business Value Without Knowledge Sources, an AI is limited by its training data and what can fit in a single system prompt. By integrating an AI Crawler, businesses can: - **Automate Support:** Point the AI to your company's FAQ page, and the AI will immediately know how to answer customer questions based on that page. - **Reduce Maintenance:** As your website updates, the AI automatically learns the new information without needing to manually rewrite prompts. - **Eliminate Hallucinations:** The AI is strictly constrained to the ingested facts. --- ## 3. Module Overview (End User/Administrator) ### What Can You Do? - Ingest web pages (URLs) for the AI to "read" and memorize. - Assign these knowledge bases to specific AI Agents. - View extraction status and resolve duplicate entries automatically. ### Navigation 1. Go to **Admin → AI → Knowledge Sources** (or manage them directly within the AI Agents form). 2. Click **+ Add Source**. 3. Provide the URL and the desired extraction parameters. --- ## 4. Configuration Sections | Field | Description | Example | |-------|-------------|---------| | **Source Type** | The origin of the data. | `Web Crawler` | | **Target URL** | The website to ingest. | `https://company.com/faq` | | **Max Depth** | How many links deep the crawler should follow. | `1` (Only the provided page) | | **Sync Interval** | How often the crawler checks for updates. | `Weekly` | | **Assigned Agents** | Which AI Agents have access to this knowledge. | `Support Voice Bot` | --- ## 5. Common Scenarios & Examples ### Scenario: Pointing a Web Chatbot to your Pricing Page 1. Create a new Knowledge Source. 2. Set Target URL to `https://yourcompany.com/pricing`. 3. Set Max Depth to `0` (exact page only). 4. Assign to the "Sales Web Chatbot". 5. When a customer asks the chatbot on your website "How much is the Pro plan?", the AI will search the vector database, retrieve the pricing from the URL, and answer accurately. --- ## 6. Troubleshooting Tips | Symptom | Possible Cause | Solution | |---------|---------------|----------| | Crawler fails to ingest | Blocking/Captcha | Ensure the target URL does not have anti-bot protections (like Cloudflare Turnstile) blocking the Ring2All crawler. | | AI gives outdated information | Sync Interval | Check if the sync interval is too long or force a manual re-sync of the knowledge source. | --- ## Glossary | Term | Definition | |------|------------| | **Knowledge Source** | Documents, text, or web links ingested for AI reference | | **Vector Database** | Database containing mathematical embeddings for fast similarity search | --- *Documentation last updated: May 2026*