Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
メールの分類をLLMをつかってやってみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ramo798
May 23, 2024
0
88
メールの分類をLLMをつかってやってみた
https://meguro-lt.connpass.com/event/305703/
ramo798
May 23, 2024
Tweet
Share
More Decks by ramo798
See All by ramo798
APIサーバのレスポンス速度をふわっと把握したかった
ramo798
0
440
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
1
58
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
110
The SEO identity crisis: Don't let AI make you average
varn
0
330
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Abbi's Birthday
coloredviolet
1
4.8k
Six Lessons from altMBA
skipperchong
29
4.2k
Become a Pro
speakerdeck
PRO
31
5.8k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
150
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
30 Presentation Tips
portentint
PRO
1
220
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でなんでもできる!
以上です。