RCP-001-001-010-ERROR-TRANS – Intelligent Error Message Translator with Adaptive Explanations

Automatically detects technical errors and translates them into plain-language explanations adapted to user expertise level. Categorizes severity, provides context-aware recovery guidance, and offers prioritized action steps. Transforms confusing error codes into constructive problem-solving opportunities.

Recipe Name: RCP-001-001-010-ERROR-TRANS – Intelligent Error Message Translator with Adaptive Explanations
RCP-001-001-010-ERROR-TRANS
Automatically detects complex technical errors and
translates them into user-friendly messages. This recipe
categorizes severity levels, adapts tone based on user
expertise, and offers structured recovery assistance.
Ideal for improving communication when technical issues
arise during AI-assisted workflows.
Multi-Recipe Combo Stage Single Recipe
Recipe Category CFT-FWK-COOKBK-CORE – CRAFT CORE Cookbook
Recipe Subcategory Blogging with A.I., Brainstorming with A.I.
Recipe Difficulty Easy
Recipe Tags: Foundational | Introduced in the POC

How To Start
 

A Note From The Author of CRAFT
  • After hundreds (perhaps thousands) of hours of using these recipes, I rarely need to use any of the CORE Cookbook recipes aside from Recipes RCP-001-001-002-HANDOFF-SNAPSHOT and RCP-001-001-002-HANDOFF-SNAPSHOT, but when I do, they are essential to the functioning of CRAFT. Also, the A.I. reads all of these recipes at the start of each session. This happens quietly in the background. Even though you may never need to call the recipe, the A.I. will know all of them and it helps the A.I. to understand what CRAFT is and how it works.
    Even if you rarely need to use these recipes, they are still working for you and are essential to the CRAFT Framework.
STEP 1: Assess Error Complexity
  • Evaluate whether the error requires translation by
    assigning a complexity score from 0 to 10.
    Simple errors (score below 4) pass through without
    translation. Complex errors (score 4 or higher)
    proceed to full translation workflow.
STEP 2: Categorize Error Type and Severity
  • Identify the error type from categories including
    network issues, permission problems, data validation
    failures, missing resources, system limitations,
    code errors, and API failures.
    Assign severity as CRITICAL (task blocked), WARNING
    (task impacted but workarounds exist), or INFO
    (minor issue with minimal impact).
STEP 3: Detect and Adapt Tone
  • If user expertise is auto-detect, analyze the
    conversation for technical terms, code snippets,
    and question complexity.
    Adapt tone based on user expertise and severity
    combination for optimal communication.
STEP 4: Translate Error Message
  • Create user-friendly explanation using the format:
    Severity Level followed by plain language explanation
    in one to two sentences. Include analogy or metaphor
    if helpful for understanding.
STEP 5: Provide Initial Response
  • Deliver translated message using appropriate CRAFT
    comment format based on severity level. Ask if user
    wants recovery assistance.
STEP 6: Provide Recovery Assistance
  • If requested, provide structured recovery guidance
    with numbered steps, quick fixes, workarounds, and
    prevention tips for future reference.
STEP 7: Set Clear Expectations
  • Be explicit about expected outcomes. Indicate if
    the issue is user-fixable, requires external help,
    or represents a permanent limitation.

How AI Reads This Recipe

When processing this recipe, the AI assistant:
1. Receives the error message and any context about
what the user was attempting when error occurred.
2. Assesses complexity to determine if translation
is needed. Score of 4 or higher triggers the
full translation workflow.
3. Categorizes the error type and assigns severity
level as CRITICAL, WARNING, or INFO.
4. Detects or applies user expertise setting to
determine appropriate communication tone.
5. Translates technical error into user-friendly
language with appropriate analogies.
6. Delivers response using severity-appropriate
CRAFT comment formatting.
7. Offers recovery assistance and sets clear
expectations about resolution path.
PROCESSING PRIORITY
Priority Description
CRITICAL Assess complexity first
HIGH Categorize type and severity
MEDIUM Adapt tone to user expertise
LOW Provide optional recovery help
INTEGRATION NOTES
This recipe works with EXPECT-SET for communicating
limitations and PROGRESS-TRACK for error recovery
status updates.

When to Use This Recipe

IDEAL USE CASES
When AI encounters technical error messages containing
jargon, codes, or stack traces that need translation.
When a user receives an error and asks what it means
or how to resolve it.
When communicating platform limitations or system
restrictions to non-technical users.
When recovery guidance would help user resolve the
issue independently.
WHEN NOT TO USE
For simple, self-explanatory error messages such as
file not found or invalid password.
When user is clearly technical and prefers raw error
output for debugging purposes.
When error requires immediate escalation rather than
translation.

Recipe FAQ

Q: When does this recipe activate automatically?
A: The recipe activates when the AI encounters complex
technical errors that would benefit from translation
before presenting to the user.
Q: What if the error is already clear?
A: Simple errors with complexity score below 4 are
passed through without translation. The recipe only
adds value when translation improves clarity.
Q: How does auto-detect expertise work?
A: The AI analyzes conversation history for technical
terms, code snippets, and question complexity to
determine appropriate tone adaptation.
Q: Can I override the severity assessment?
A: Yes, you can specify severity context when providing
the error message for more accurate categorization.
Q: Does this recipe integrate with other recipes?
A: Yes, it works with EXPECT-SET for communicating
limitations and PROGRESS-TRACK for error recovery
status updates.
 
EXAMPLE 1: Technical Error for Non-Technical User
Input:
error_message: “TypeError: Cannot read property
‘map’ of undefined at UserList.render”
error_context: “I was trying to view my contacts”
user_expertise: non-technical
Output:
#AI->H::Note: (WARNING – Display Issue)
The contact list could not load because it
received empty data instead of your contacts.
In simple terms: Imagine opening a filing cabinet
expecting folders but finding it empty. The system
looked for your contacts but found nothing there.
#AI->H::Question: (Would you like me to explain
how to fix this?)
EXAMPLE 2: API Error for Technical User
Input:
error_message: “HTTP 429 Too Many Requests –
Rate limit exceeded for API endpoint”
error_context: “Running automated data sync”
user_expertise: technical
Output:
#AI->H::Note: (WARNING – Rate Limiting)
API rate limit exceeded. Your automated sync is
sending requests faster than the endpoint allows.
How to fix this:
1. Add delay between requests (recommended
500ms minimum)
2. Implement exponential backoff on retries
3. Check API documentation for rate limits
4. Consider batching multiple operations
#AI->H::Note: (This can be resolved by adjusting
your sync configuration)
EXAMPLE 3: Critical System Error
Input:
error_message: “ECONNREFUSED 127.0.0.1:5432 –
Connection refused”
error_context: “Application won’t start”
user_expertise: auto-detect
Output:
#AI->H::Caution: (CRITICAL – Database Unavailable)
The application cannot connect to the database
server. This prevents the application from
starting or functioning.
In simple terms: The application is trying to
talk to the database, but nobody is answering.
The database service may not be running.
How to fix this:
1. Quick fix: Check if database service is
running and restart if needed
2. Workaround: Verify connection settings
match database configuration
3. Prevention: Set up monitoring to alert
when database becomes unavailable
#AI->H::Note: (This needs assistance from admin
or developer if database service restart does
not resolve the issue)

Actual Recipe Code

(Copy This Plaintext Code To Use)
# =========================================================
# START RECIPE-ID: RCP-001-001-010-ERROR-TRANS-v1.00a
# =========================================================
ERROR_TRANSLATOR_RECIPE = Recipe(
recipe_id="RCP-001-004-010-ERROR-TRANS-v1.00a",
title="Intelligent Error Message Translator with Adaptive Explanations",
description="Automatically detects complex technical errors and translates them to user-friendly messages, categorizes severity, and offers recovery assistance when requested",
category="CAT-Foundational",
subcategory="SUBCAT-Base-Cookbook",
difficulty="medium",
parameters={
"error_message": {
"type": "string",
"required": True,
"description": "The technical error message to translate"
},
"error_context": {
"type": "string",
"required": False,
"description": "What the user was trying to do when error occurred"
},
"user_expertise": {
"type": "string",
"required": False,
"default": "auto-detect",
"options": ["technical", "non-technical", "auto-detect"],
"description": "User's technical level for tone adaptation"
}
},
prompt_template="""
#H->AI::Directive: (Analyze '{error_message}' for complexity and translate if needed)
#H->AI::Context: (User was: {error_context})
STEP 0: POLICY PRE-CHECK
======================
Scan prompt for sensitive categories:
– Platform capabilities/limitations
– Security/vulnerability research
– Personal data handling
– Political topics
IF potential conflict detected:
#AI->H::PolicyCaution: (This research topic may trigger usage policies)
#AI->H::RecommendedChange: (Consider focusing on [specific safe aspect])
STEP 1: COMPLEXITY ASSESSMENT
=============================
Evaluate if error needs translation:
SIMPLE/CLEAR ERRORS (No translation needed):
– "File not found"
– "Invalid password"
– "Connection timeout"
– "Access denied"
– Clear permission messages
COMPLEX/TECHNICAL ERRORS (Translation needed):
– Stack traces
– Type errors
– Null/undefined references
– API response codes
– Technical jargon
– Multi-line errors
Complexity Score: [0-10]
IF score < 4: Skip translation
IF score >= 4: Proceed to translation
STEP 2: ERROR CATEGORIZATION
============================
Identify error type and severity:
ERROR TYPES:
– Network/Connection issues
– Permission/Access problems
– Data validation failures
– Missing resources
– System/Platform limitations
– Code/Syntax errors
– API/Integration failures
SEVERITY LEVELS:
🔴 CRITICAL: Task cannot proceed
🟡 WARNING: Task impacted but workarounds exist
🔵 INFO: Minor issue, minimal impact
STEP 3: TONE DETECTION
======================
Adapt based on context and user:
IF {user_expertise} == "auto-detect":
Check conversation for:
– Technical terms used
– Code snippets shared
– Question complexity
Set tone:
– Technical user + Critical: Direct, specific
– Non-technical + Any: Friendly, simple
– Any user + Info: Light, reassuring
STEP 4: ERROR TRANSLATION
========================
Create user-friendly explanation:
For {error_message}, translate to:
{SEVERITY_ICON} **What happened:**
[Plain language explanation in 1-2 sentences]
**In simple terms:**
[Analogy or metaphor if helpful]
Common translations:
– "TypeError: undefined" → "The system couldn't find something it expected"
– "403 Forbidden" → "You don't have permission to access this"
– "ECONNREFUSED" → "Couldn't connect to the service"
– "ValidationError" → "The information provided doesn't match what's required"
STEP 5: INITIAL RESPONSE
=======================
Provide translated message:
#AI->H::Note: ({SEVERITY} – {translated_explanation})
For CRITICAL errors:
#AI->H::Caution: (This prevents the task from completing)
For WARNING errors:
#AI->H::Note: (This might cause issues but we can work around it)
For INFO errors:
#AI->H::Note: (Minor issue – shouldn't affect your work)
Then ask:
#AI->H::Question: (Would you like me to explain how to fix this?)
STEP 6: RECOVERY ASSISTANCE
==========================
IF user wants help:
**How to fix this:**
1. [First step – most likely solution]
2. [Second step – if first doesn't work]
3. [Third step – alternative approach]
**What you can try:**
– Quick fix: [Immediate action]
– Workaround: [Alternative approach]
– Prevention: [How to avoid this next time]
For platform limitations:
#AI->H::Note: (This is a system limitation – here's what we can do instead:)
[Alternative approaches]
STEP 7: EXPECTATION SETTING
==========================
Be clear about outcomes:
IF fixable by user:
#AI->H::Note: (This can be resolved by following the steps above)
IF requires external help:
#AI->H::Note: (This needs assistance from [admin/support/developer])
IF permanent limitation:
#AI->H::Note: (This is a built-in limitation – we'll need to use a different approach)
ERROR PATTERN EXAMPLES:
======================
Network Error Pattern:
Technical: "Error: connect ETIMEDOUT 192.168.1.1:8080"
Friendly: "Couldn't reach the server – it might be down or your internet connection might be interrupted"
Permission Pattern:
Technical: "Error: EACCES: permission denied, open '/var/log/app.log'"
Friendly: "The system blocked access to a file – you might need administrator privileges"
Validation Pattern:
Technical: "ValidationError: Invalid value for field 'email': Does not match pattern"
Friendly: "The email address format isn't quite right – make sure it includes @ and a domain"
#H->AI::OnError: (If error pattern unknown, provide generic but honest explanation)
"""
)
# USAGE EXAMPLES:
# ==============
# Automatic translation:
# AI encounters: "TypeError: Cannot read property 'map' of undefined"
# Recipe triggers automatically, provides friendly explanation
# Manual translation request:
# execute_recipe({
# "error_message": "CORS policy: No 'Access-Control-Allow-Origin' header",
# "error_context": "trying to fetch recipe from website",
# "user_expertise": "non-technical"
# })
# Severity examples:
# CRITICAL: "Database connection failed"
# WARNING: "API rate limit approaching"
# INFO: "Cache miss – fetching fresh data"
# =========================================================
# START RECIPE-ID: RCP-001-001-010-ERROR-TRANS-v1.00a
# =========================================================

Similar Posts

Leave a Reply