@@ -178,5 +178,66 @@ If the customer is a business customer, the use case #business_customer_support
178178
179179```
180180
181+ ### Flow Options
181182
183+ Flow Options enables Use Case authors to express decision trees within the Use Case markdown.
182184
185+ To achieve this, the Use Case writer can simply add so called Flow Options to the bottom of any Use Case as follows:
186+
187+ ``` markdown
188+ [ option 1] command
189+ [ option 2] command 2
190+ ```
191+
192+ ** Option** Used to match the user's input to the command that should be executed.
193+
194+ ** Command** This can be any instruction given to the LLM to perform. Examples include:
195+ - Tool calls
196+ - A reply to give to the user
197+ - A use case reference
198+
199+ The options should be placed at the bottom of the solution section of a use case.
200+
201+ There can be any number of options, i.e. from 1 to N.
202+
203+ Example
204+
205+ ``` markdown
206+ #### Use Case: buy_car
207+ Customer wants to buy a car Use Case.
208+
209+ #### Description
210+ The customer wants to buy a car.
211+
212+ #### Solution
213+ Ask the customer what type of car they would like to buy.
214+
215+ [ bmw] go to the case #buy_bmw
216+ [ other] reply that we don't sell that type of car.
217+
218+ #### Case: buy_bmw
219+ Ask the customer what color would they like.
220+
221+ [ color selected] go to the final case #buy_bmw_with_color
222+ [ other] reply with "ok, we need to know the color "
223+
224+ #### Case: buy_bmw_with_color
225+ Call the tool @buy_car() to finalize the purchase.
226+ And reply to the customer that we are grateful for their businees.
227+
228+ ```
229+
230+ In this flow, we start by asking the customer what type of car they would like to buy.
231+
232+ Based on their response, the agent will either return the solution defined
233+ in the #buy_bmw use case or reply that "We dont sell that type of car. "
234+
235+ If the customer wants to buy a BMW, the agent will then ask what color they would like.
236+ If the customer provides a color, the agent will proceed to the final case #buy_bmw_with_color
237+ where it will call the tool @buy_car() to finalize the purchase
238+ and reply to the customer that we are grateful for their business.
239+
240+ By modularizing the flow in this way, the Use Case Compiler can re-enforce that the agent follows the defined flow.
241+
242+ This feature also introduces "Cases". These are Use Cases that are only reachable via a Flow Option.
243+ Unlike regular Use Cases, Cases do not have Examples nor a Description section.
0 commit comments