Add tool_search_alternate_approaches notebook#306
Conversation
Notebook ChangesThis PR modifies the following notebooks: 📓
|
Summary
Errors per inputErrors in temp_md/tool_search_alternate_approaches.md
|
Notebook ChangesThis PR modifies the following notebooks: 📓
|
|
Hi! @noble-ant not sure why the notebook review didnt post! but here it is Notebook Review: tool_search_alternate_approaches.ipynb Strengths
CRITICAL ISSUES: None MAJOR ISSUES:
MINOR ISSUES: Inconsistent reference in cell-0 (tool_search_alternate_approaches.ipynb:3) States: "Recommend first reading see the cookbook: Tool Search with Embeddings" Uses relative path: ./tool_search_with_embeddings.ipynb Consider verifying this file exists at that path The turn counter shows "tools in request" but doesn't show which tools Could be more informative: f"--- Turn {turn + 1} (tools: {[t['name'] for t in active_tools]}) ---" Consider adding a cell showing cache metrics or token counts to demonstrate the caching benefit Could add a visualization comparing request sizes with/without defer_loading Code Quality: The execute_tool function could use type hints for better IDE support Documentation: Could explicitly mention that this pattern requires the "advanced-tool-use-2025-11-20" beta Code Correctness Verification API calls use proper parameters Security & Best Practices Conclusion Recommendation: APPROVE with minor corrections |
Description
Adds a new cookbook demonstrating alternate approaches to tool discovery with Claude. This cookbook complements the existing "Tool Search with Embeddings" cookbook by showing simpler patterns that
don't require embeddings infrastructure.
Key concepts demonstrated:
toolslist until Claude needs themdefer_loading=True: Preserves prompt caching when adding discovered tools mid-conversationtool_referencein results: How to signal tool availability to ClaudeThe cookbook uses a
describe_toolexample but emphasizes this is just one flavor—the same pattern applies tolist_tools, hierarchical discovery, or hybrid approaches.Type of Change
Cookbook Checklist (if applicable)
Testing
Additional Context
tool_use/tool_search_with_embeddings.ipynbanthropic-beta: advanced-tool-use-2025-11-20header fortool_referencesupport