feat: Implement routing pattern with native framework implementations#2
Merged
Conversation
- Added routing pattern implementation across three frameworks - LangChain routing using RunnableBranch with Google Gemini LLM - LlamaIndex routing with simple manual LLM-based classification - Google ADK routing using sub-agent delegation with Auto-Flow - Created comprehensive routing pattern README with theory and examples - Added three new make targets for running routing examples - Fixed LangChain chaining filename to avoid circular imports - Updated dependencies for Google ADK and Gemini integration - All implementations use LLM-based routing (not hardcoded if/else) - Full type safety compliance with strict MyPy checking 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace manual LLM-based routing with LlamaIndex's native RouterQueryEngine architecture for more robust and framework-compliant implementation. Changes: - Use RouterQueryEngine with PydanticSingleSelector for intelligent routing - Create custom BookingQueryEngine, InfoQueryEngine, UnclearQueryEngine classes - Implement QueryEngineTool abstractions with detailed descriptions - Maintain same functional behavior with improved architecture - Update README.md to reflect native LlamaIndex routing capabilities - Add proper Routing section organization in Makefile 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement comprehensive routing pattern demonstrations across three major AI frameworks (LangChain, LlamaIndex, Google ADK) with proper framework-native architectures and extensive documentation.
Key Features
Technical Implementation
LangChain (
langchain_routing.py)RunnableBranchfor conditional routing logicLlamaIndex (
llamaindex_routing.py)Google ADK (
google_adk_routing.py)Routing Scenarios Tested
All implementations handle three test scenarios:
Quality Assurance
Architecture Improvements
Test Plan
🤖 Generated with Claude Code