Features

Knowledges

Build and manage your team's operational knowledge base.

What is Knowledges?

Knowledges is Castrel's operational knowledge management system that stores your team's operational experience, troubleshooting guides, and system documentation in a structured format. This knowledge is automatically retrieved and referenced by Castrel AI, helping it better understand your system environment and provide more accurate diagnostics and recommendations.

Unlike traditional documentation, Knowledges uses a Trigger mechanism that activates knowledge at the right moment. For example, when the AI analyzes an alert for a specific service, knowledge bound to that service is automatically included in the context.

How it Works

Knowledge Types

Castrel supports two knowledge types:

TypeDescriptionUse Cases
SimplePlain text contentBrief configuration notes, caveats, quick references
DocumentMarkdown-formatted documentsDetailed architecture docs, troubleshooting guides, best practice manuals

Trigger Conditions

Trigger conditions determine when knowledge is referenced by the AI. Choosing the right trigger ensures knowledge is activated in the most relevant scenarios:

TriggerDescriptionExample
AlwaysAlways active, available in all conversationsCompany-wide ops policies, general security guidelines
ApplicationBound to a specific applicationPayment app deployment procedures
ServiceBound to a specific serviceOrder service architecture documentation
InfrastructureBound to specific infrastructureMySQL primary database configuration guide
ConnectorBound to a specific data connectorPrometheus query tips and tricks
AlertMatches based on alert content"OOMKilled" troubleshooting runbook
Best Practice: Create knowledge entries for each critical service and infrastructure component. The AI will automatically reference this knowledge when analyzing related issues, providing more accurate diagnostics.

Creating Knowledge

Manual Creation

In the Castrel console, navigate to Settings > Knowledges and click Create Knowledge:

  1. Fill in Basic Information
    • Knowledge ID: Unique identifier, use meaningful names (e.g., payment-gateway-architecture)
    • Name: Knowledge name
    • Type: Choose Simple or Document
    • Description: Brief description of the content and purpose
  2. Configure Trigger Conditions
    • Select the trigger type
    • Configure the associated resource (Application, Service, Infrastructure, etc.)
  3. Write Content
    • Simple type: Enter plain text directly
    • Document type: Use the Markdown editor
  4. Add Labels (Optional)
    • Use key-value labels to organize knowledge
    • Enables filtering and retrieval later

Creating from Conversations

When Castrel AI generates valuable analysis reports during troubleshooting, you can save them as knowledge with one click:

  1. After the AI completes its analysis, a Save as Knowledge button appears
  2. Click to automatically extract key information
  3. Confirm and add trigger conditions to save

This approach is ideal for capturing troubleshooting experience, turning your team's incident history into reusable knowledge assets.

Creating from Resource Detail Pages

In the detail pages for Applications, Services, Infrastructure, and Connectors, you'll find a Related Knowledge tab:

  • View all knowledge associated with the current resource
  • Create new knowledge that's automatically bound to the current resource

Knowledge in Action

When properly configured, knowledge automatically takes effect in these scenarios:

Alert Analysis

User: Analyze the high latency alert for mysql-prod-01

AI: I've retrieved knowledge documents related to mysql-prod-01...
    Based on the "Database High Latency Analysis Report", similar issues
    are typically caused by:
    1. Missing indexes leading to full table scans
    2. Slow query backlog
    3. Connection pool misconfiguration

    Let me start investigating...

Incident Investigation

When diagnosing incidents, the AI automatically references:

  • Knowledge bound to the affected service
  • Knowledge bound to related infrastructure
  • Knowledge matching alert patterns
  • Always-active general knowledge

Q&A Queries

User: What's the timeout threshold for our payment service?

AI: According to the "Payment Gateway Architecture" document,
    the payment service timeout settings are:
    - Default timeout: 30s
    - Retry attempts: 3
    - Concurrency limit: 1000 req/s

Tips for Better Results

TipGood PracticePoor Practice
Precise BindingBind knowledge to specific services or infrastructureSet all knowledge to Always active
Structured ContentUse Markdown headings, lists, and code blocksLarge blocks of unformatted text
Keep UpdatedUpdate knowledge after system changesKnowledge inconsistent with actual config
Use LabelsAdd labels like env=production, type=troubleshootingNo classification labels
Alert MatchingUse precise keywords like "OOMKilled", "Connection refused"Overly broad matching terms

When to Use Knowledges

Ideal For:

  • Service architecture and configuration documentation
  • Troubleshooting guides and runbooks
  • System best practices and operational standards
  • Alert response guidelines
  • Frequently asked questions (FAQ)
  • Change history and lessons learned

Not Ideal For:

  • Real-time data that needs live updates (use Connectors instead)
  • Temporary debugging information
  • Unverified speculation or guesses

Common Questions