Hello Pavithra,
- ❌ Why the regex entity isn't recognized during slot-filling in Copilot Studio Even though CLU correctly detects the entity (
AccountNumber
) in its own test environment, Copilot Studio does not automatically use or trust regex-based custom entities for slot-filling. Specifically:- ExternalEntityReference in Copilot Studio relies on prebuilt or ML entities, not pure regex.
- Slot-filling fails when the entity isn’t detected with a confidence threshold or isn't passed back in the
RecognizerResult
Copilot Studio expects.
- In CLU Project:
- Ensure the
AccountNumber
entity is explicitly labeled in utterances and tied to the intent used by Copilot Studio.
- Ensure the
- In Copilot Studio (code editor):
- In the Question node, do not just use
ExternalEntityReference
. - Add manual validation logic via
condition
nodes or post-processing usingdialog.variable
to: - Extract a 6-digit number using regex (e.g.,
dialog.input.match(/\b\d{6}\b/)
) - Then assign it to the correct variable.
- In the Question node, do not just use
- Alternative workaround (recommended):
- Use a Question node with text input and apply a custom validation expression in the UI:
- Under “Validate user response,” add regex:
^\d{6}$
- Set error message: “Please enter a 6-digit account number.”