Skip to content

Expert Selection

with pick() and pick_multiple()

This example demonstrates LLMling-agent's type-safe selection methods:

  • Using pick() for single expert selection
  • Using pick_multiple() for team selection
  • Type-safe results with reasoning
  • Team-based agent selection

How It Works

  1. Single Selection (pick):
  2. Takes a team of agents and a task description
  3. Returns a single expert with reasoning
  4. Result is type-safe: Pick[Agent]

  5. Multiple Selection (pick_multiple):

  6. Takes same inputs plus min/max picks
  7. Returns multiple experts with reasoning
  8. Result is type-safe: MultiPick[Agent]

Example Output:

This demonstrates:

  • Type-safe agent selection
  • Reasoned decision-making
  • Team-based operations
  • Flexible expert allocation