reply-prediction について
見込み客の返信を予測し、事前に回答を用意する営業ボットの開発者向けスキルです。会話の文脈に応じた予測、返信のキャッシュ、予測結果の評価を扱います。
主な機能
- 01返信タイプの確率予測
- 02想定される質問内容の予測
- 03会話の文脈に応じた予測調整
- 04返信の事前生成とキャッシュ
- 05精度と返信効果の追跡
活用シーン
- 01見込み客の返信前に回答を準備
- 02顧客セグメント別の過去返信分析
- 03キャッシュ済み予測の利用状況測定
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ louisblythe/ sales-skills --skill reply-predictionインストール後、Claude Code で/reply-predictionを入力して読み込まれたか確認します。
詳細
返信予測
見込み顧客から寄せられる可能性の高い返信を予測し、適切なフォローアップを事前に準備するセールスボットの構築に精通しています。開発者が返信を予測し、適切な回答をあらかじめ用意するシステムを作成できるよう支援します。
返信予測が重要な理由
受動的な対応の問題
Traditional approach:
1. Bot sends message
2. Waits for response
3. Analyzes response
4. Generates reply
5. Sends reply
Time to reply: Seconds to minutes
Quality: Variable, sometimes off-target
予測型のアプローチ
Predictive approach:
1. Bot sends message
2. Predicts likely responses
3. Pre-generates replies for each
4. Response arrives
5. Matches to prediction
6. Sends pre-optimized reply
Time to reply: Near-instant
Quality: Pre-reviewed, consistent
予測のカテゴリ
返信タイプの予測
For any given message, predict likelihood of:
Positive responses:
- "Yes, I'm interested"
- "Tell me more"
- "Let's schedule a call"
Neutral responses:
- "What exactly do you do?"
- "How is this different from X?"
- "I need to check with my team"
Negative responses:
- "Not interested"
- "We already have a solution"
- "Bad timing"
No response:
- Probability of no reply
内容の予測
Predict specific content:
Questions likely to be asked:
- Pricing questions
- Feature questions
- Comparison questions
- Implementation questions
Objections likely to be raised:
- Budget concerns
- Timing concerns
- Authority concerns
- Competitor mentions
Information likely to be shared:
- Company details
- Pain point specifics
- Timeline information
予測の実装
確率モデル
class ReplyPredictor:
def __init__(self, model):
self.model = model
self.predictions = {}
def predict_responses(self, context):
"""Generate probability distribution of likely responses"""
features = extract_features(context)
predictions = {
"positive_interest": 0,
"question_pricing": 0,
"question_features": 0,
"question_comparison": 0,
"objection_timing": 0,
"objection_budget": 0,
"objection_competitor": 0,
"not_interested": 0,
"no_response": 0
}
# Use model to predict probabilities
probabilities = self.model.predict_proba(features)
for response_type, prob in zip(self.model.classes_, probabilities):
predictions[response_type] = prob
return predictions
def get_top_predictions(self, context, n=3):
all_predictions = self.predict_responses(context)
sorted_predictions = sorted(
all_predictions.items(),
key=lambda x: x[1],
reverse=True
)
return sorted_predictions[:n]
過去のパターン分析
def predict_from_history(message_template, prospect_segment):
"""Predict based on historical response patterns"""
# Get historical responses to this template
historical = get_historical_responses(
template_id=message_template.id,
segment=prospect_segment
)
# Calculate response distribution
response_counts = Counter([r.response_type for r in historical])
total = len(historical)
predictions = {}
for response_type, count in response_counts.items():
predictions[response_type] = count / total
# Get common response content
content_patterns = extract_common_content(historical)
return {
"type_probabilities": predictions,
"content_patterns": content_patterns,
"sample_size": total
}
コンテキストを考慮した予測
def predict_with_context(context):
"""Adjust predictions based on conversation context"""
base_predictions = predict_from_history(
context.last_message.template,
context.prospect.segment
)
# Adjust for conversation stage
stage_adjustments = {
"discovery": {"question_features": 0.2, "not_interested": -0.1},
"evaluation": {"question_pricing": 0.3, "question_comparison": 0.2},
"proposal": {"objection_budget": 0.2, "positive_interest": 0.1},
"negotiation": {"objection_budget": 0.3, "positive_interest": 0.2}
}
adjustments = stage_adjustments.get(context.stage, {})
adjusted = apply_adjustments(base_predictions, adjustments)
# Adjust for prospect engagement
if context.prospect.engagement_score > 70:
adjusted["positive_interest"] *= 1.3
adjusted["not_interested"] *= 0.5
# Adjust for recent behavior
if context.prospect.asked_pricing_before:
adjusted["question_pricing"] *= 1.5
return adjusted
事前生成された返信
予測に応じた返信テンプレート
PREDICTED_REPLY_TEMPLATES = {
"positive_interest": {
"replies": [
"Great! What specifically caught your attention?",
"Glad to hear it. Would a quick call or more info be more helpful right now?"
],
"next_action": "advance_to_meeting"
},
"question_pricing": {
"replies": [
"Happy to walk through pricing. To give you accurate info, can I ask a few questions about your team size and needs?",
"Pricing depends on a few factors. What's your team size, and what's most important to you in a solution?"
],
"next_action": "qualify_then_price"
},
"question_comparison": {
"replies": [
"Good question—here's how we're different: [comparison points]. What matters most to you?",
"We get asked that a lot. The main difference is [key differentiator]. What's driving the comparison?"
],
"next_action": "understand_evaluation"
},
"objection_timing": {
"replies": [
"Totally understand—when would be a better time to revisit this?",
"Makes sense. If I check back in [timeframe], would that work better?"
],
"next_action": "schedule_future_outreach"
},
"not_interested": {
"replies": [
"No problem. Mind if I ask what's not a fit? Helps me know if I should reach out again in the future.",
"Understood. If anything changes, feel free to reach out. Best of luck!"
],
"next_action": "disqualify_or_nurture"
}
}
動的な返信の選択
def select_preloaded_reply(actual_response, predictions, context):
"""Match actual response to predictions and select reply"""
# Classify actual response
response_type = classify_response(actual_response)
# Check if we predicted this
if response_type in predictions and predictions[response_type] > 0.1:
# Use preloaded reply
template = PREDICTED_REPLY_TEMPLATES.get(response_type)
if template:
reply = select_best_reply(template["replies"], context)
return {
"reply": reply,
"source": "predicted",
"confidence": predictions[response_type]
}
# Fall back to real-time generation
return {
"reply": generate_reply_realtime(actual_response, context),
"source": "generated",
"confidence": None
}
予測のキャッシュ
事前計算
def precompute_replies(conversation):
"""Precompute replies before response arrives"""
# Get predictions
predictions = predict_responses(conversation.context)
top_predictions = get_top_predictions(predictions, n=5)
# Generate and cache replies
cached_replies = {}
for response_type, probability in top_predictions:
if probability > 0.05: # Only cache if >5% probability
template = PREDICTED_REPLY_TEMPLATES.get(response_type)
if template:
reply = personalize_reply(
template["replies"],
conversation.prospect
)
cached_replies[response_type] = {
"reply": reply,
"probability": probability,
"generated_at": datetime.now()
}
# Store in cache
cache_key = f"replies:{conversation.id}"
cache.set(cache_key, cached_replies, ttl=3600)
return cached_replies
キャッシュの取得
def get_reply_for_response(conversation_id, actual_response):
"""Retrieve cached reply if available"""
cache_key = f"replies:{conversation_id}"
cached = cache.get(cache_key)
if not cached:
return None
# Match response to cached predictions
response_type = classify_response(actual_response)
if response_type in cached:
return cached[response_type]
return None
学習と改善
予測精度の追跡
def track_prediction_accuracy(conversation_id, predicted, actual):
"""Track how accurate predictions were"""
log_prediction_result(
conversation_id=conversation_id,
predicted_type=max(predicted, key=predicted.get),
predicted_probability=max(predicted.values()),
actual_type=actual,
correct=actual == max(predicted, key=predicted.get)
)
# Update model if enough data
if should_retrain_model():
retrain_prediction_model()
フィードバックループ
def improve_predictions(results):
"""Use outcomes to improve prediction model"""
for result in results:
# Was predicted reply effective?
if result["source"] == "predicted":
effectiveness = measure_reply_effectiveness(result)
if effectiveness < THRESHOLD:
# Flag reply for review
flag_for_review(
response_type=result["response_type"],
reply=result["reply"],
effectiveness=effectiveness
)
# Aggregate learnings
improvement_suggestions = analyze_prediction_patterns(results)
return improvement_suggestions
指標
予測品質
Track:
- Prediction accuracy (did we predict right type?)
- Reply match rate (how often was cached reply used?)
- Response time improvement
- Reply effectiveness by source (predicted vs generated)
Optimize:
- Which responses are predictable?
- Where do we need better predictions?
- Which templates perform best?
コメント
Markdown 対応