[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-03。"],[[["\u003cp\u003eThis tutorial guides users through setting up a Dialogflow agent to recognize alphanumeric sequences over voice input.\u003c/p\u003e\n"],["\u003cp\u003eUsers should first create a new Dialogflow agent, or use an existing one that has auto speech adaptation enabled in the agent settings.\u003c/p\u003e\n"],["\u003cp\u003eA regexp entity, named "alphanumeric," is created to recognize partial alphanumeric sequences, adhering to auto speech adaptation guidelines with the format \u003ccode\u003e^[a-zA-Z0-9]{3}[a-zA-Z0-9]*$\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe defined regexp entity strictly looks for strings of alphanumerics without spaces or dashes, allowing for recognition of spelled-out sequences and easy exit from sequence recognition.\u003c/p\u003e\n"],["\u003cp\u003eFor numeric-only values, the user could opt to make a more tailored entity like \u003ccode\u003e[0-9]{3}[0-9]*\u003c/code\u003e, or use the built-in \u003ccode\u003e@sys.number-sequence\u003c/code\u003e entity.\u003c/p\u003e\n"]]],[],null,["# Before you begin\n\nBefore trying this tutorial,\nyou should be familiar with Dialogflow basics covered in\n[Quickstarts](/dialogflow/docs/quick).\n\nCreate an agent\n---------------\n\nUse the [Dialogflow ES console](https://dialogflow.cloud.google.com) to create an agent named \"PackageTracker\".\nIf you are unsure how to do this,\nrevisit the [Quickstarts](/dialogflow/docs/quick).\n\nIf you prefer to work with an existing agent, that is okay too. Just be sure that you\n[enable auto speech adaptation](/dialogflow/es/docs/speech-adaptation#enable_or_disable_auto_speech_adaptation)\nin the agent settings. This is enabled by default for new agents.\n\nCreate a sequence recognizer entity\n===================================\n\nThe core function of this agent is understanding alphanumeric sequences over\nvoice. Specifically, you'll set up the agent to listen for a handful of characters\nat a time, eventually putting all sub-sequences together before validating the\nfinal sequence against a data store. Let's start by defining an entity to\nrecognize the partial sequences.\n\nCreate the regexp sequence entities\n-----------------------------------\n\nWe need to use a regexp entity to capture sequences so that auto speech\nadaptation will know to listen for \"ABC\" instead of \"a bee sea\".\n\nThese entities must conform to the\n[auto speech adaptation regexp enitity guidelines](/dialogflow/es/docs/speech-adaptation#regexp_entities)\nto ensure the speech recognition is tuned to recognize spelled-out sequences.\n\n### Partial sequence entity\n\nWe'll set up the entity to accept any alphanumeric sequence of at least 3\ncharacters. Later, you'll add a webhook so that you can validate the final\nsequence against a data store or API.\n\n1. Create a new entity. We'll name it \"alphanumeric\" because it will accept any alphanumeric input.\n2. Check the box for **Regexp entity**\n3. Add a single entry, `^[a-zA-Z0-9]{3}[a-zA-Z0-9]*$`\n4. Click **SAVE**.\n\nNotice that the regexp you added is very strict in that it is looking only for\na string of alphanumerics, without any spaces or dashes. This is important for\ntwo reasons:\n\n1. This regexp follows the auto speech adaptation [requirements](/dialogflow/es/docs/speech-adaptation#regexp_entities) for enabling the \"spelled-out sequence\" recognizer mode.\n2. By not looking for spaces and only looking for entire phrases (`^`...`$`), you allow end-users to easily exit the sequence recognition. For example, when you prompt \"what's your order number\" and an end-user replies \"no I want to place an order\", the regexp will reject and Dialogflow will know to look for another intent that might match that phrase.\n\nIf you are only interested in numeric values, you could create a more tailored\nentity like `[0-9]{3}[0-9]*`, or even just use the built-in `@sys.number-sequence`\nentity.\n\nThe rest of the tutorial assumes you are collecting alphanumeric sequences. Jump\nto the next section to see how to set up intents to collect these sequences."]]