대화형 작업이 2023년 6월 13일에 지원 중단되었습니다. 자세한 내용은
대화 작업 지원 중단을 참고하세요.
유형
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
유형을 통해 어시스턴트 NLU (자연어 이해)를 구성할 수 있습니다.
사용자 입력에서 정형 데이터를 추출합니다. 나
는 다음 상황에서 유형을 사용할 수 있습니다.
인텐트에서 학습 문구에 다음과 같은 유형으로 주석을 달 수 있습니다.
슬롯을 만듭니다. 사용자가 슬롯과 일치하는 것을 말하면 NLU 엔진은
유형이 지정된 매개변수로 추출하므로 장면에서 처리할 수 있습니다.
장면의 슬롯 채우기 단계에서는
사용자가 광고를 게재하기 전에 제공하려는
장면 밖으로 나갈 수도 있습니다.
장면의 conditions 단계 내에서 다음을 기반으로 할 수 있습니다.
매개변수에 유형에 정의된 특정 값이 있는지 여부에 대한 로직
맞춤 유형
커스텀 유형을 사용하면 NLU에 알리는 자체 유형 사양을 만들 수 있습니다.
단일 키에 값 집합을 할당할 수 있습니다. 다양한 유형의
있습니다.
- 단어와 동의어를 사용하면 여러 값을 단일 키에 매핑할 수 있으며
항목이라고 부릅니다. 유형에는 하나 이상의 항목이 포함될 수 있습니다. 만약
이 옵션을 선택하면 다음 NLU 설정을 사용할 수도 있습니다.
<ph type="x-smartling-placeholder">
</ph>
- 퍼지 일치 사용 - 이 기능은 두 개 이상의
일치하는 단어로 검색되지 않습니다.
- 알 수 없는 값 허용 - 가능한 모든 값을 지정할 수 없는 경우
언어 프로세서는 주변을 기반으로 알 수 없는 단어나 문구를 받아들일 수 있음
식료품점에 추가될 품목과 같은 입력 및 인텐트 학습 데이터
목록.
- 정규 표현식을 사용하면 유형에서 정규 표현식을 사용하여 값을 일치시킬 수 있습니다.
기반으로 하는
Google의 RE2 표준입니다.
- 자유 형식 텍스트는 텍스트 유형을
사용자가 하는 말입니다. 주석 달기
이 유형의 인텐트를 사용하면 모든 입력을
전달할 수 있습니다
시스템 유형
시스템 유형을 사용하면 사용자 입력에서 잘 알려진 데이터에 주석을 달고 추출할 수 있습니다.
모델을 학습시키는 작업도
반복해야 합니다 다음 시스템 유형은
지원됨:
유형 |
설명 |
actions.type.DateTime |
사용자의 기기 설정을 기반으로 한 날짜, 시간, 시간대가 포함됩니다.
슬롯 채우기 및 학습 문구 주석에 사용할 수 있습니다.
|
actions.type.Date |
날짜만 포함합니다. 슬롯 채우기에만 사용할 수 있습니다. |
actions.type.Time |
시간만 포함됩니다. 슬롯 채우기에만 사용할 수 있습니다. |
actions.type.Number |
Number 유형은 서수 및 카디널과 일치합니다.
있습니다. |
DateTime
, Date
, Time
사용량
이러한 유형은 유형을 사용하는 위치와
사용자 입력을 나타냅니다.
인텐트와 함께 사용
인텐트에서 학습 문구 주석 달기는 DateTime
유형만 지원합니다. 사용자
입력이 전체 DateTime
값과 일치하지 않아도 됩니다. 예를 들어 사용자가
연도만 제공하는 경우 세션 매개변수는 다음과 같을 수 있습니다.
"date_time": {
"year": 2019
}
슬롯 채우기와 함께 사용
슬롯 채우기는 DateTime
, Date
, Time
를 지원합니다.
- 슬롯 유형이
DateTime
이면 어시스턴트는 사용자에게 완전히 충전될 때까지 사용자에게 메시지를 표시합니다.
값이 제공됩니다.
- 슬롯 유형이
Date
인 경우 어시스턴트가 날짜까지 사용자에게 메시지를 표시합니다.
값이 제공됩니다. 수집되면 수신되는 매개변수는
DateTime
(시간을 00:00으로 설정)
- 슬롯 유형이
Time
이면 어시스턴트는 지정된 시간이 될 때까지 사용자에게 메시지를 표시합니다.
값이 제공됩니다. 수집되면 수신 매개변수가 가득 찼습니다.
날짜가 현재 날짜로 설정된 DateTime
객체
예를 들어 로스앤젤레스에 있는 사용자가 "Hey Google, 리마인더 만들어 줘
2024년 1월 15일 오후 8시에 예약해 주세요." DateTime
가 슬롯의 일부로 추출되는 경우
전체 매개변수는 다음과 같을 수 있습니다.
"date_time": {
"day": 15,
"hours": 20,
"minutes": 0,
"month": 1,
"nanos": 0,
"seconds": 0,
"time_zone": {
"id": "America/Los_Angeles"
},
"year": 2024
}
조건과 함께 사용
조건에는 숫자와 문자열만 사용할 수 있으므로 최상위 수준
DateTime
매개변수를 사용하면 조건의 결과가 False입니다. 예를 들면 다음과 같습니다.
$session.params.my_dateTime.day > 5
는 유효한 조건입니다.
day
값은 숫자이며 지원됩니다.
$session.params.my_dateTime > "01-01-2010"
은(는) 다음과 같은 이유로 잘못된 조건입니다.
최상위 'DateTime' 객체가 숫자나 문자열이 아닙니다.
런타임 유형 재정의
런타임 유형 재정의를 사용하면
합니다. 이 기능을 사용하면
런타임 환경입니다 예를 들어 백엔드 데이터 소스를 확인하여 일일 메뉴를 로드할 수 있습니다.
항목을 처리의 유형으로 변환할 수 있습니다.
자세한 내용은 웹훅 가이드를 참조하세요.
을 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[[["\u003cp\u003eTypes are used to extract structured data from user input, allowing you to create slots in intents, manage slot filling within scenes, and define conditions based on parameter values.\u003c/p\u003e\n"],["\u003cp\u003eYou can create custom types using words and synonyms, regular expressions, or free-form text to define how the NLU interprets user input.\u003c/p\u003e\n"],["\u003cp\u003eSystem types such as \u003ccode\u003eDateTime\u003c/code\u003e, \u003ccode\u003eDate\u003c/code\u003e, \u003ccode\u003eTime\u003c/code\u003e, and \u003ccode\u003eNumber\u003c/code\u003e provide built-in data extraction for common data formats.\u003c/p\u003e\n"],["\u003cp\u003eRuntime type overrides enable dynamic modification of types during fulfillment, allowing you to adjust types based on real-time data.\u003c/p\u003e\n"]]],[],null,["# Types let you configure the Assistant NLU (natural language understanding)\nengine to extract structured data from user input. You\ncan use types in the following situations:\n\n- In [intents](/assistant/conversational/intents), you can annotate training phrases with types to\n create slots. When users say something that matches a slot, the NLU engine\n extracts it as a typed parameter, so you can process it in a [scene](/assistant/conversational/scenes).\n\n- Within a scene's [slot filling](/assistant/conversational/scenes#slot_filling) stage, you can specify\n multiple slots that you want the user to provide before they can\n transition or exit out of the scene.\n\n- Within a scene's [conditions](/assistant/conversational/scenes#conditions) stage, you can base\n logic on whether a parameter has a specific value that's defined in a type.\n\nCustom types\n------------\n\nCustom types let you create your own type specification to notify the NLU to\nassign a set of values to a single key. You can specify types in a variety of\nways:\n\n- **Words and synonyms** allow you to map multiple values to a single key, which are called an entry. Your type can contain one or many entries. If you choose this option, you can also enable the following NLU settings:\n - **Enable fuzzy matching** - This feature allows entries with more than one word to be matched, even when the words are spoken in a different order.\n - **Accept unknown values** - When you can't specify all possible values, the language processor can accept unknown words or phrases based on surrounding input and intent training data, such as items that might be added to a grocery list.\n- **Regular expressions** allows the type to match values using regular expression patterns based on [Google's RE2 standard](https://github.com/google/re2/wiki/Syntax).\n- **Free form text** allows the type to match anything a user says. Annotating an intent with this type lets you consume all input as a parameter that you can pipe to your own NLU.\n\nSystem types\n------------\n\nSystem types let you annotate and extract well-known data from user input\nusing system-provided training data and values. The following system types are\nsupported:\n\n| Type | Description |\n|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| **`actions.type.DateTime`** | Contains date, time, and timezone based on the user's device settings. Available for slot filling and training phrase annotation. |\n| **`actions.type.Date`** | Contains date only. Available for slot filling only. |\n| **`actions.type.Time`** | Contains time only. Available for slot filling only. |\n| **`actions.type.Number`** | The `Number` type matches ordinal and cardinal numbers. |\n\n### `DateTime`, `Date`, and `Time` usage\n\nThese types behave differently depending on where you use the type and the\nuser input that matches the type.\n\n#### Using with intents\n\nAnnotating training phrases in intents supports only the `DateTime` type. User\ninput doesn't need to match an entire `DateTime` value. For example, if a user\nprovides only the year, the session parameter might look like this: \n\n \"date_time\": {\n \"year\": 2019\n }\n\n#### Using with slot filling\n\nSlot filling supports `DateTime`, `Date`, and `Time`.\n\n- If the slot type is `DateTime`, the Assistant prompts the user until a full value is provided.\n- If the slot type is `Date`, the Assistant prompts the user until a date value is provided. When collected, the parameter you receive is a full `DateTime` with the time set to 00:00.\n- If the slot type is `Time`, the Assistant prompts the user until a time value is provided. When collected, the parameter your receive is a full `DateTime` object with the date set to the current date.\n\nFor example, suppose a user in Los Angeles said, \"Hey Google, create a reminder\nfor January 15, 2024 at 8 pm.\" When `DateTime` is extracted as part of a slot\nfilling process, the full parameter might look like this: \n\n \"date_time\": {\n \"day\": 15,\n \"hours\": 20,\n \"minutes\": 0,\n \"month\": 1,\n \"nanos\": 0,\n \"seconds\": 0,\n \"time_zone\": {\n \"id\": \"America/Los_Angeles\"\n },\n \"year\": 2024\n }\n\n#### Using with conditions\n\nConditions only allow the use of numbers and strings, so using the top level\n`DateTime` parameter results in a **False** result for the condition. For\nexample:\n\n- `$session.params.my_dateTime.day \u003e 5` is a valid condition, because the `day` value is a number and is supported.\n- `$session.params.my_dateTime \u003e \"01-01-2010\"` is an invalid condition, because the top level 'DateTime' object is not a number or string.\n\nRuntime type overrides\n----------------------\n\nRuntime type overrides let you dynamically create or modify types in\nfulfillment. This feature lets you add to or replace a type's specification at\nruntime. For example, you can check a backend data source to load daily menu\nitems into a type in your fulfillment.\n\nSee the [webhooks](/assistant/conversational/webhooks#runtime_type_overrides) guide for more information\non how to build type overrides."]]