Add a regex expression validation for required fields.
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.1k
- Forks
- 651
- Avg merge
- 15h 2m
- Merged PRs (30d)
- 36
Description
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",
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the Router handles required args and agent prompts. Determine where a user-defined regex validator would fit, then verify that a fabricated order_number such as "order number" is rejected while a matching value is accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- ai
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100