Implement generative AI and agentic solutions 2.3 Optimize and operationalize generative AI systems

A Microsoft Agent Framework workflow uses a classifier agent to label each incoming email…

Study guide skill: Orchestrate multiple models, flows, or hybrid LLM and rules engines

Question B6-027

A Microsoft Agent Framework workflow uses a classifier agent to label each incoming email as billing, technical, or general. Each email must go to exactly one matching handler executor, and the handlers' outputs must then go to a single summary executor. Which two edge types should you use? (Choose two.)

Select 2 answers.

  • A A group chat orchestration in place of edges
  • B Direct edges only
  • C Multi-selection (fan-out) edges
  • D Fan-in edges ✓ Correct answer
  • E Switch-case edges ✓ Correct answer

Answer: D, E

Switch-case edges route a message to different executors based on conditions, which fits multi-branch routing to one handler. Fan-in edges send messages from multiple executors to a single target for aggregation. Direct edges are simple one-to-one connections, fan-out sends one message to multiple targets for parallel processing, and group chat has agents collaborate in a shared conversation.

Deep dive

How it works

In a Microsoft Agent Framework workflow, edges define how messages flow between executors. Edges can include conditions that control routing based on message contents. The framework has several edge types, each with a typical use case:

  • Direct: simple one-to-one connections. Use case: linear pipelines.
  • Conditional: edges with conditions that decide when messages flow. Use case: binary routing (if/else).
  • Switch-case: route to different executors based on conditions. Use case: multi-branch routing.
  • Multi-selection (fan-out): one executor sends messages to multiple targets. Use case: parallel processing.
  • Fan-in: multiple executors send to a single target. Use case: aggregation.

This workflow has two steps. First, route each email to exactly one of three handlers based on the classifier's label: three-way, one target, so switch-case. The edges tutorial uses switch-case to replace multiple conditional edges for cleaner three-way routing. Second, send all handler outputs into one summary executor: fan-in.

The other options, and when you'd use them

  • Group chat instead of edges: In group chat, agents collaborate in a shared conversation. This workflow needs deterministic routing between executors.
  • Direct edges only: They're simple one-to-one connections with no routing logic.
  • Multi-selection (fan-out): It sends one message to multiple targets for parallel processing. Each email must reach exactly one handler.

Exam tip

One of N by condition = switch-case. Many targets at once = fan-out. Many into one = fan-in. A to B = direct.

References

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Generative AI & agents questions · AI-103 study guide

Thanks for your feedback!