Pattern 1
RAG Pipeline — which retrieval strategy works for YOUR queries?
LangSmith traces 1,000 retrievals. You see latency and token counts. But after 1,000 queries, which strategy (dense, sparse, hybrid, rerank) actually produces correct answers for which query types? LangSmith can't tell you — it doesn't learn from outcomes.
categories = ["compliance", "product", "financial", "technical"]
actions = ["dense_only", "sparse_only", "hybrid", "hybrid_rerank"]
factors = ["query_complexity", "corpus_coverage",
"recency_requirement", "precision_requirement",
"query_length", "entity_density"]
After 1,000 queries
compliance→ hybrid_rerank (p=0.273)
product→ dense_only (p=0.274)
financial→ hybrid (p=0.272)
technical→ sparse_only (p=0.270)
dominant factorsrecency, complexity, entity_density
JM learned: compliance needs reranking. Product lookups are faster AND more accurate with dense-only. Stop reranking product queries — save latency, gain accuracy.
Pattern 2
Multi-Agent Router — which agent should handle this?
You have 4 agents (research, code, data, writing). A router picks one per request. LangSmith traces all 1,500 routing decisions. But the router still uses Day 1 rules.
categories = ["code_question", "research", "data_analysis",
"content_creation", "ambiguous"]
actions = ["research_agent", "code_agent",
"data_agent", "writing_agent"]
factors = ["has_code_keywords", "needs_web_search",
"has_data_reference", "creative_intent",
"technical_depth", "user_history_code",
"user_history_research", "request_length"]
After 1,500 decisions
Day 1 accuracy66%
Day 1500 accuracy80%
improvement+14pp
research_agent86.3% (387 routed)
code_agent78.4% (380 routed)
data_agent78.0% (378 routed)
writing_agent75.8% (355 routed)
The router learned YOUR users' request patterns. Routing accuracy improved 14pp without changing a single routing rule — centroids absorbed the pattern from verified feedback.
Pattern 3
Alert Triage — should this auto-resolve?
Your agent triages production alerts. LangSmith traces 2,000 triage decisions. But the auto-resolve threshold is static. After 500 correct auto-resolves for disk_space alerts, the system still asks a human every time.
categories = ["disk_space", "memory_leak", "api_latency",
"cert_expiry", "deploy_failure", "security_scan"]
actions = ["auto_resolve", "escalate_l1",
"escalate_l2", "page_oncall"]
factors = ["severity", "recurrence_count", "blast_radius",
"time_of_day", "similar_resolution",
"source_reliability", "sla_remaining_pct"]
After 2,000 alerts
disk_space auto-resolve92% accurate (294/321)
cert_expiry auto-resolve95% accurate (196/207)
api_latency auto-resolve59% accurate (60/101)
security_scan auto-resolve40% accurate (2/5)
memory_leak auto-resolve56% accurate (45/81)
JM learned the difference. disk_space and cert_expiry earned autonomy (92%, 95%). security_scan did not (40%). Each expansion step bounded by the conservation law — θmin = 23.53/(α×V). The system can improve. It cannot silently degrade.