12
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

langchainのMultiVectorRetrieverを使って、PDFデータのRAGを進化する

Posted at

中国のSNSでlangchainでPDFデータをうまくRAGする手法の記事を読みました。

PDFデータにRAGを適用する際に、よくある問題は、PDF内にテーブルが存在すること、またはテーブルが画像形式で含まれていることです。これらのテーブルを適切に分解せずにembeddingすると、モデルの性能がかなり下がります。今まであまりよい解決方法なくて、PDFのRAG処理はいつも難しかったです。

この人が考えてた手法は、OCR作業(tableの部分を識別)と普通のテキストembeddingを同時に進めて、その後langchainの「MultiVectorRetriever」を使えてRAGするやり方です。MultiVectorRetrieverは複数のembeddingのRAGを同時に実行できるものです。MultiVectorRetrieverをマルチモーダルで使うことは意外にいけます。
(少し複雑なタスクなので、GPT4以外はまだうまく対応できないような感じです。)

アーキテクチャとしては以下のようです。最近試してみたいと思います。
图片_20231020121434.png

12
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?