etc

Rasa # 5, 6, 7 Core

썬2 2021. 4. 9. 18:10

# 5: Intro to dialogue management model

스토리 예시

* 스토리 이름

- 액션 이름{엔티티 이름:엔티티 값}

 

stories.md 예시
대화를 통한 예시

# 6: Domain, custom actions and slots

dialogue mangement가 하는 일

Domain

domain.yml 예시

intents:

(nlu.md에 있는 모든 intent 적기)

 

entities:

(읽을 값들 모두 적기)

 

actions:

(stories.md에 있는 모든 action 적기)

 

templates: (실제 반응을 적는 곳. 각 utterence에 답할 수 있는 값이 1개 이상 가능)

- text: 출력할 문장

- image: 보여줄 이미지

templates 부분만

Custom actions

api 부르기나 데이터베이스 접근 등

custom action을 actions.py에 저장함

이때, def name의 "action_facility_search"는 domain.yml의 actions에 있어야된다.

 

Slots

slot 예시
domain.yml에 slot 지정

entities의 value와 slot의 이름이 같으면 자동으로 매칭.

만약 자동으로 매칭하기 싫으면 위 처럼 auto_fill: False라고 하기

Slot의 종류: text, boolean, categorical, float, list, unfeaturized

수정
수정

custom action은 모델과 다른 서버에서 동작한다.

endpoint라고 명함: 웹 서버여야된다.

endpoints.yml이라고 명함

# 7: Dialogue policies

components that predict dialogue system's next action.
makes decisions about how conversation flow should proceed

config.yml

max_history대신 slot에 넣는게 좋긴하다.

data augmentation

 

memoization policy

mapping policy

mapping policy 사용

max_history, epochs, validation_split, random_seed 사용 가능

# 8: Implementing custom actions, forms and fallback

데이터베이스에 있는 데이터를 API를 이용해 가져오기

action.py

물어야될것들 다 물을때까지 계속 요청

domain.yml
config.yml

 

TwoStageFallback Policy

 

'etc' 카테고리의 다른 글

poetry - docker file 만들기  (0) 2022.05.23
웹 크롤링 관련  (0) 2021.09.28
Rasa #2, 3, 4  (0) 2021.04.09
Rasa #0~1  (0) 2021.04.09
교보문고 도서 크롤링  (0) 2021.03.13