このリポジトリは、日本語検索拡張生成(RAG)を強化するための方法論、モデル、リソースのコレクションです。
RAG アプリケーションは、基本的に 3 つの主要なコンポーネントで構成されています:
- データローダー&インデキシング
- 検索
- 生成
-
データローダー:
- PaddleOCR-日本語:日本語テキスト抽出のための OCR ツール。
- PDF 内の表の処理:PDF ドキュメント内の表データを扱う技術。
- 私のカスタムパーサー(DOCX 変換された HTML 用、近日オープンソース化予定)。
-
日本語 Tokenizer: for hybrid search
Sudachi | MeCab | kuromoji | |
---|---|---|---|
Multiple Segmentation | Yes | No | Limited ^a |
Normalization | Yes | No | Limited ^b |
Joining, Correction | Yes | No | Limited ^b |
Use multiple user dictionary | Yes | Yes | No |
Saving Memory | Good ^c | Poor | Good |
Accuracy | Good | Good | Good |
Speed | Good | Excellent | Good |
- ^a: approximation with n-best
- ^b: with Lucene filters
- ^c: memory sharing with multiple Java VMs
-
Embedding モデル:
- OpenAI Embedding (text-embedding-3-small, text-embedding-3-large).
- BGE-Embedding: 多言語用高性能 Embedding モデル
-
Fine-tuning Embeddings:
- Fine-tune Embeddings with LlamaIndex: 日本語専門文書のために Finetuning
-
Re-rankers:
- BGE Re-ranker: 多言語対応の Reranker 商用モデル
- Cohere Re-ranker:
- BGE Re-ranker: 多言語対応の Reranker オープンソースモデル
-
Retrievers:
- Experiment with Various Retrievers in LlamaIndex Modules: 様々な Retriever の集合
GPT-4 はほとんどのシナリオで良好に機能しますが、カスタマイズされた結果が必要な場合は、日本語 LLM を使用するか、オープンソースの LLM をファインチューニングすることを検討してください。
- 日本語 LLM:日本語言語モデルのコンパイル。
このリポジトリへの貢献を歓迎します!リソース、モデル、または方法論の改善についての提案がある場合は、プルリクエストを送信するか、イシューを開いてください。一緒により良い日本語 RAG を作りましょう。