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
110
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
500
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Done Done
chrislema
187
17k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
890
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
From π to Pie charts
rasagy
1
400
Building Applications with DynamoDB
mza
96
7.2k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
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でなんでもできる!
以上です。