Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
メールの分類をLLMをつかってやってみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ramo798
May 23, 2024
100
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
メールの分類をLLMをつかってやってみた
https://meguro-lt.connpass.com/event/305703/
ramo798
May 23, 2024
More Decks by ramo798
See All by ramo798
APIサーバのレスポンス速度をふわっと把握したかった
ramo798
0
490
Featured
See All Featured
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
610
It's Worth the Effort
3n
188
29k
30 Presentation Tips
portentint
PRO
1
400
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.1k
Product Roadmaps are Hard
iamctodd
55
13k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Mobile First: as difficult as doing things right
swwweet
225
10k
New Earth Scene 8
popppiees
4
2.6k
Technical Leadership for Architectural Decision Making
baasie
3
570
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
540
Designing for Timeless Needs
cassininazir
1
480
Transcript
メールの分類を LLMをつかってやってみた ramo
自己紹介 ramo 仕事→ URIHOというサービス開発。 好きなフレームワーク→ remix, sveltekit マイブーム→ cloudflare workers
最近matzさんとツーショット撮りました
URIHOについて 販売企業 URIHOは企業間取引において発生する 売掛金の未払い・倒産に備える保証サービスです。 購入企業
やりたいこと 問い合わせメールの分類を行って よくある質問ページを拡充したい!
やったこと 1600件の問い合わせメールのうち 1000件を手動で分類 ↓ 分類モデルを作成し、残り600件の分類を自動化 内容の傾向の把握
技術的にやったこと LLMのBERTをファインチューニングして 分類モデルを作成しました その結果、少量のデータでもそれなりの精度になった
技術的にやったこと ・「cl-tohoku/bert-base-japanese-v3」というBERTモデ ルを使用 ・Hugging Faceのtransformersライブラリを使用する ・AutoModelForSequenceClassificationというクラスを使 用して分類問題を解けるようにファインチューニング
やったこと tokenizer = AutoTokenizer.from_pretrained("cl-tohoku/bert-base-japanese-v3") encoding = tokenizer(df_email['Content'].tolist(), padding=True, truncation=True, return_tensors="pt",
max_length=256) model = AutoModelForSequenceClassification.from_pretrained("cl-tohoku/bert-base-japanese-v3", num_labels=len(df_email['question_id'].unique())) # 訓練用のデータの準備等(省略) model.train()
結果 分類の種類 「よくある質問ページに書いてあること」 「サービスの説明をしてください」 「広告」 「その他」
結果 分類の種類 「よくある質問ページに書いてあること」 「サービスの説明をしてください」 「広告」 「その他」 → 90%の精度で分類可能に!
結果 分類の種類 「よくある質問ページに書いてあること」 ↓ よくある質問ページの大分類(5択) + それ以外 でタグ付けを行って学習
結果 分類の種類 「よくある質問ページに書いてあること」 ↓ よくある質問ページの大分類(5択) + それ以外 でタグ付けを行って学習 ↓ 約81%の精度
結果 90%の精度で分類可能に!
その他手法 ・Sentence Transformer + lightGBM →55% ・BoW + SVM →37%
・TF-IDF + SVM →40%
まとめ ・LLMを使うと少数のデータでもそれなりの精度がでる ・Hugging Faceでなんでもできる!
以上です。