Create AI Instruction Sets to Guide Automated Debugging

AI Instruction sets are the main mechanism to guide the behavior of Relvy’s AI agent during real-time incident analysis. When incidents occur, Relvy’s AI-based investigation engine uses your instructions to plan and execute the debugging process.

How AI Instructions Work in Relvy

Relvy’s AI investigation system consists of:
  • A Planner, which orchestrates the overall debugging strategy.
  • Specialized Data Source Agents for logs, metrics (dashboards), events, and traces.
When an investigation is triggered (manually or via alert), the planner:
  • Reads applicable instructions relevant to the incident symptoms or tags.
  • Uses the instructions to prioritize certain signals and tools.
  • Dispatches tasks to the data source agents accordingly.
  • Aggregates findings into a unified Root Cause Analysis.
AI Instructions provide a way for your team to configure and influence the planner using natural language. You define what your team considers best practices — and the planner follows them when forming its investigation plan. This allows you to encode organizational knowledge and system-specific workflows directly into the AI.

Creating AI Instruction sets

There are 3 ways to create AI Instruction sets:

Manual Creation

To add an instruction set:
  1. Navigate to the AI Instruction Sets tab in the Discovery section on the left sidebar.
  2. Click Create New Instruction Set.
  3. Fill out the form:
    • Title: A clear and concise label.
    • Type: e.g., General Planning, Log Analysis, Event Analysis.
    • Symptom / When to Use: Describe when this instruction set is applicable.
    • Instructions: Write your investigation steps in natural language.
    • Tags (optional): Add tags like user-facing, latency, kubernetes, etc.
  4. Click Create Instruction Set to save.
Create Runbook

Import Existing

Relvy can automatically generate executable AI Instruction sets for you from your existing documentation sources like Atlassian Confluence. We support the following data sources for automatic import of AI Instructions:
  • Atlassian Confluence
Steps
  1. Navigate to the AI Instruction Sets tab in the Discovery section on the left sidebar.
  2. Click on the ‘Import Runbooks’ icon from the left panel. Import Runbook - Step 2
  3. Search and select documents that you want to create AI instructions from. These are typically your existing runbooks or postmortem documents. Import Runbook - Step 3
  4. Click on ‘Generate AI Instructions’ from the selected documents.
  5. Relvy AI will generate detailed instructions with executable queries from your documents for your review.
Import Runbook - Step 4
  1. Review generated instructions, edit and save the ones you like.

From Investigations

Relvy can save your investigation as an AI Instruction Set for easy reuse on similar future investigations. Steps
  1. Once you are happy with the steps taken during an investigation, click on “Save as AI Instructions”.
From Investigation
  1. Select any subset of steps that are relevant for future similar invesigations, and hit Save.

Example AI Instructions

Example 1: General Debugging Instructions

TitleGeneral Debugging Instructions
When to UseWhen debugging any incident
Instructions1. Check RED metrics dashboard as a starting point for most investigations
2. For user facing issues, check frontend service logs and metrics
3. To check recent deployments, filter events by @source:kubernetes and look for pod restarts, scaling or service deployments
4. Check Runtime metrics dashboard for CPU/memory utilization
5. To locate traces from logs, use otel.trace_id and otel.span_id
💡 Relvy’s planner will use these general guidelines as a foundation for any investigation, adapting the approach based on the specific incident context.

Example 2: Latency in Backend Services

TitleLatency in Core APIs
When to UseWhen alerts mention increased latency in APIs
Instructions1. Begin with the API service metrics dashboard
2. Compare current latency to 1h and 24h baselines
3. Check for saturation in DB or cache services connected to the API
4. Investigate traces for slow spans and associated service calls
5. Review logs for errors or warnings in the same time range
💡 The planner will dynamically follow these steps, dispatching tasks to metric, trace, and log agents to execute them in order.

Example 3: Debugging Kafka Issues

TitleDebugging Kafka issues
When to UseWhen debugging a kafka related alert
Instructions1. Look at the kafka dashboard for the appropriate topic / consumer group - identify specific affected partitions
2. Identify if any consumer pods are down
3. Check logs for consumer and producer services
4. For lag issues, check if this is because of traffic surges
5. Finally, check the kafka infra metrics dashboards for issues with kafka itself
💡 Relvy’s planner will interpret this and structure its investigation to answer the above questions.

Example 4: Application Architecture Overview

TitleApplication and System Description
When to UseWhen debugging all incidents
InstructionsThis is an ecommerce application (Astronomy Shop). This is the list of critical services:

- accounting
- ad
- cart
- checkout
- currency
- email
- frontend
- payment
- product-catalog
- quote
- recommendation
- shipping
💡 Relvy’s planner will use this architectural knowledge to prioritize services during investigations.

6.5 Runbook Management

  • Runbooks can be searched and filtered by tags.
  • You can edit them anytime to evolve with your system.

Benefits of Configurable AI Planning

With AI Instructions:
  • You encode team knowledge into the AI, turning experience into automation.
  • Investigations become standardized, repeatable, and transparent.
  • New team members benefit from a guided process, and experts can continuously improve it.
Whether you’re debugging application errors, latency spikes, infrastructure issues, or deployment regressions — Relvy’s AI will follow your instructions, step-by-step.