先日こちらの記事を書いたのですが、コンテキストのウィンドウが4096トークンしかない問題があり、あまり良い結果が得られませんでした。 そこで改善策として、次の点を実施してみました。 記事を要約することで、コンテキストに詰め込める情報量を増やす。 英語に翻訳する。日本語に比べるとトークン数が半減する。また、英語の方が精度が上がる。 ドキュメントを要約&翻訳する今回もライブドアニュースを使用します。 openai.ChatCompletion.create()を使用して要約します。出力は英語になります。 プロンプトは以下のようになります。要約後のトークンが4096になるようにします。 {"role": "system", "content": '''summarize this document for me and keep the summary to around less than 4
Embeddings are numerical representations of concepts converted to number sequences, which make it easy for computers to understand the relationships between those concepts. Our embeddings outperform top models in 3 standard benchmarks, including a 20% relative improvement in code search. Embeddings are useful for working with natural language and code, because they can be readily consumed and comp
自然言語処理モデルT5を使って文章単位の埋め込み量(Sentence Embedding)を取得することを考えます。T5のEmbeddingはトークン単位ですが、平均を取ることで、簡単に文章単位に変換できます。Sentence T5としてモデルが公開されていない場合でも、既存のT5から自在に特徴量を取得できることを目標とします。Flan-T5からSentence Embeddingをとって見たりします。 はじめに 普段画像処理ばっかりやってる自然言語処理素人だけど、Imagenで使っていたり、Unified IOがベースにしていたり、何かとT5を聞きますよね。 調べていたらtransformersのライブラリから簡単に利用できることがわかったので、今回遊んでいきたいと思います。このブログでは珍しいNLPの内容です。 問題点 (自然言語処理やっている人には当たり前かもしれませんが、)一つ問題
この記事はオープンソースのベクトル検索エンジンQdrant(クワッドラント)の使い方と類似記事検索についての前編になります。 初心者向けにコンセプトの理解を優先し、難しい用語の使用はあえて避けています。 使用するもの Qdrant オープンソースベクトル検索エンジン (Rust実装) GiNZA spaCy ドキュメントのベクトル化 livedoorニュースコーパス ライブドアのニュース記事 (株式会社ロンウィット) Python 3.10 Qdrantとは? オープンソースのRust製ベクトル検索エンジンです。クライアントはPython SDK、REST API、gRPCで接続できます。クラウドサービス版も準備中のようです。 Qdrantを使用したデモサイトもあります。 ベクトル検索エンジンとは? みなさんが思い浮かべる検索エンジンはキーワードを使用して検索するものでしょう。検索ボックス
はじめに 5月からTuringに中途入社した棚橋です。リクルートで広告配信システムの開発や量子アニーリングに関する研究開発に関わっていました。現在、Turingのリサーチチームで完全自動運転システムの研究開発に取り組んでいます。 3行でまとめ 今月開催されるCVPR2023では約2400本もの論文が発表されるため、見るべき論文を事前に検索しておきたい。 社内で行われた大規模言語モデル(LLM)ハッカソンをきっかけに、LLMのEmbeddingを用いて論文の「検索・推薦・要約」システムを作成し公開した。 検索クエリに文章を使った曖昧な検索が行えたり、類似論文の推薦ができる。6/13にアップデートされたGPT3.5の新機能であるファンクション機能を使うことで、複数観点に分けて研究内容の要約を出力させた。 ↓ 今回作成した、LLMを使ったCVPR論文検索システム 事の発端 Turingは、ハンド
A new PostgreSQL extension is now available in Supabase: pgvector, an open-source vector similarity search. The exponential progress of AI functionality over the past year has inspired many new real world applications. One specific challenge has been the ability to store and query embeddings at scale. In this post we'll explain what embeddings are, why we might want to use them, and how we can sto
How to implement Q&A against your documentation with GPT3, embeddings and Datasette 13th January 2023 If you’ve spent any time with GPT-3 or ChatGPT, you’ve likely thought about how useful it would be if you could point them at a specific, current collection of text or documentation and have it use that as part of its input for answering questions. It turns out there is a neat trick for doing exac
【2023/11/7追記】 OpenAI Dev Dayにて、開発者向けの大型アップデートが発表されました。この記事で紹介している手法は、Retrieval-Augmented Generation(RAG)と呼ばれてきましたが、今回のアップデートでコンテクスト長(やりとりできるテキストの長さの上限)がこれまでの8Kから128K(12万8千トークン)に大幅にアップするため、一般的な本の内容は1冊分丸ごと渡すことができるようになります。独自データベースとの連携という意味では、ここで紹介している手法も引き続き有効な手法ですが、API関連でも様々な機能が追加されているので、リリースやSam Altmanによるキーノートは要チェックです。 ChatGPTは、膨大な量のテキストを学習してはいますが、天気予報のような最新の情報や、ある特定の本の内容や、特定のサービスの詳細についてはじめから知っているわ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く