BotSharp icon indicating copy to clipboard operation
BotSharp copied to clipboard

Add a regex expression validation for required fields.

Open Deep-Blue-2013 opened this issue 2 years ago • 0 comments

Sometimes LLM will hallucinate and simulate a value that does not exist. For example, it fills in a false value in the order number below. I want a user-defined validator that can validate the data format in advance.

{ "function": "route_to_agent",
  "reason": "User wants to pay in cash",
  "next_action_agent": "Payment",
  "user_goal_agent": "Payment",
  "args": {
    "order_number": "order number"
  }
}

Below is part of the Router prompt:

* Agent: Payment
Make payment when user wants to pay for the order
Required args: {
    "order_number": "order number",
    }

Deep-Blue-2013 avatar Oct 20 '23 21:10 Deep-Blue-2013