mirror of
https://github.com/anthropics/claude-cookbooks.git
synced 2025-10-06 01:00:28 +03:00
Updates output to have correct model name for launch
This commit is contained in:
@@ -189,7 +189,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -197,7 +197,7 @@
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"✓ API key loaded\n",
|
||||
"✓ Using model: bobcat-v22-prod\n"
|
||||
"✓ Using model: claude-sonnet-4-5-20250929\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -1032,7 +1032,58 @@
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": "### What Claude Actually Learns\n\nThis is what makes memory powerful - **semantic pattern recognition**, not just syntax:\n\n**Session 1: Thread-Based Web Scraper**\n\n```python\n# Bug: Race condition\nclass WebScraper:\n def __init__(self):\n self.results = [] # Shared state!\n \n def scrape_urls(self, urls):\n with ThreadPoolExecutor() as executor:\n for future in as_completed(futures):\n self.results.append(future.result()) # RACE!\n```\n\n**What Claude Stores in Memory** (example file: `/memories/concurrency_patterns/thread_safety.md`):\n\nWhen Claude encounters this pattern, it stores the following insights to its memory files:\n- **Symptom**: Inconsistent results in concurrent operations\n- **Cause**: Shared mutable state (lists/dicts) modified from multiple threads\n- **Solution**: Use locks, thread-safe data structures, or return results instead\n- **Red flags**: Instance variables in thread callbacks, unused locks, counter increments\n\n---\n\n**Session 2: Async API Client** (New conversation!)\n\nClaude checks memory FIRST, finds the thread-safety pattern, then:\n1. **Recognizes** similar pattern in async code (coroutines can interleave too)\n2. **Applies** the solution immediately (no re-learning needed)\n3. **Explains** with reference to stored knowledge\n\n```python\n# Claude spots this immediately:\nasync def fetch_all(self, endpoints):\n for coro in asyncio.as_completed(tasks):\n self.responses.append(await coro) # Same pattern!\n```\n\n---\n\n**Why This Matters:**\n\n- ❌ **Syntax checkers** miss race conditions entirely\n- ✅ **Claude learns** architectural patterns and applies them across contexts\n- ✅ **Cross-language**: Pattern applies to Go, Java, Rust concurrency too\n- ✅ **Gets better**: Each review adds to the knowledge base"
|
||||
"source": [
|
||||
"### What Claude Actually Learns\n",
|
||||
"\n",
|
||||
"This is what makes memory powerful - **semantic pattern recognition**, not just syntax:\n",
|
||||
"\n",
|
||||
"**Session 1: Thread-Based Web Scraper**\n",
|
||||
"\n",
|
||||
"```python\n",
|
||||
"# Bug: Race condition\n",
|
||||
"class WebScraper:\n",
|
||||
" def __init__(self):\n",
|
||||
" self.results = [] # Shared state!\n",
|
||||
" \n",
|
||||
" def scrape_urls(self, urls):\n",
|
||||
" with ThreadPoolExecutor() as executor:\n",
|
||||
" for future in as_completed(futures):\n",
|
||||
" self.results.append(future.result()) # RACE!\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"**What Claude Stores in Memory** (example file: `/memories/concurrency_patterns/thread_safety.md`):\n",
|
||||
"\n",
|
||||
"When Claude encounters this pattern, it stores the following insights to its memory files:\n",
|
||||
"- **Symptom**: Inconsistent results in concurrent operations\n",
|
||||
"- **Cause**: Shared mutable state (lists/dicts) modified from multiple threads\n",
|
||||
"- **Solution**: Use locks, thread-safe data structures, or return results instead\n",
|
||||
"- **Red flags**: Instance variables in thread callbacks, unused locks, counter increments\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"**Session 2: Async API Client** (New conversation!)\n",
|
||||
"\n",
|
||||
"Claude checks memory FIRST, finds the thread-safety pattern, then:\n",
|
||||
"1. **Recognizes** similar pattern in async code (coroutines can interleave too)\n",
|
||||
"2. **Applies** the solution immediately (no re-learning needed)\n",
|
||||
"3. **Explains** with reference to stored knowledge\n",
|
||||
"\n",
|
||||
"```python\n",
|
||||
"# Claude spots this immediately:\n",
|
||||
"async def fetch_all(self, endpoints):\n",
|
||||
" for coro in asyncio.as_completed(tasks):\n",
|
||||
" self.responses.append(await coro) # Same pattern!\n",
|
||||
"```\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"**Why This Matters:**\n",
|
||||
"\n",
|
||||
"- ❌ **Syntax checkers** miss race conditions entirely\n",
|
||||
"- ✅ **Claude learns** architectural patterns and applies them across contexts\n",
|
||||
"- ✅ **Cross-language**: Pattern applies to Go, Java, Rust concurrency too\n",
|
||||
"- ✅ **Gets better**: Each review adds to the knowledge base"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
@@ -1218,4 +1269,4 @@
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user