1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Llamaindex で最もダウンロードされているベクトルストアライブラリとは?

Last updated at Posted at 2024-11-27

生成 AI アプリ開発フレームワークでおなじみ LlamaIndex は、ベクトル ストアなどの機能と統合することで LLM を RAG で強化することができます。LlamaIndex は現在 20 種類以上のベクトルストアをサポートしており、開発者は好みのモジュールを選んで実装することができます。

このダウンロード数を見ることで何らかのインサイトが得られる?かもしれません。

Download Ranking (Last Month)

image.png

pypistats から検索可能な llama-index-vector-stores-* から全部盛りでデータを取得。2024/11/27 に実行。CI Download も含む。

注意
ダウンロード数は単純にモジュールが「どれだけ使用されているか」を正確に反映しない場合があります。例えば、継続的インテグレーション(CI/CD)システムが頻繁に依存関係を再インストールすることで、ダウンロード数が増加することがあります。ですのであくまで複数の指標のうちの一つとして捉える必要があります。

pypistats with Python

pip install pypistats

import pypistats
import json

result = pypistats.recent("llama-index-vector-stores-postgres", format="json")
json.loads(result)
{'data': {'last_day': 1489, 'last_month': 220037, 'last_week': 64206},
 'package': 'llama-index-vector-stores-postgres',
 'type': 'recent_downloads'}

TOP 10(Last Month)

image.png

PostgreSQL が 1位!

オープンソースの RDBMS でベクトルストアにも対応(pgvector 拡張)している PostgreSQL が最もダウンロードされているようです。Azure だけでなくさまざまなクラウドプラットフォームに対応しており、オンプレでも実行できるため数で勝るというところでしょうか。

image.png
DB-Engines Ranking (Vector DB + secondary database models, Nov.2024)

DB-Engines Ranking でも PostgreSQL は上位のベクトルストア(セカンダリ DB モデルを含む)ですね。

azure_ai 拡張

Azure の話にはなりますが Azure Database for PostgreSQL - フレキシブル サーバーでは、azure_ai 拡張で Azure OpenAI と連携して Embeddings を格納したりできます。

image.png

-- Insert embeddings 
INSERT INTO conference_session_embeddings
    (session_id, session_embedding)
SELECT
    c.session_id, (azure_openai.create_embeddings('text-embedding-ada-002', c.session_abstract))
FROM
    conference_sessions as c  
LEFT OUTER JOIN
    conference_session_embeddings e ON e.session_id = c.session_id
WHERE
    e.session_id IS NULL;

-- Create a HNSW index
CREATE INDEX ON conference_session_embeddings USING hnsw (session_embedding vector_ip_ops);
    
-- Retrieve top similarity match
SELECT
    c.*
FROM
    conference_session_embeddings e
INNER JOIN
    conference_sessions c ON c.session_id = e.session_id
ORDER BY
    e.session_embedding <#> azure_openai.create_embeddings('text-embedding-ada-002', 'Session to learn about building chatbots')::vector
LIMIT 1;

Daily Download 時系列

image.png
https://pypistats.org/packages/llama-index-vector-stores-postgres

11/14 に何があった!?

Azure AI Search が 2位!

Azure AI Search が 2位となりました!こちらは Azure オンリーのフルマネージド全文検索+ベクトルストアです。気軽に RAG システムを構築するには超便利ですし、Azure OpenAI Service との連携もしやすいのでよくダウンロードされているのかもしれません。

image.png
↑Azure で RAG と言ったらコレ!といつも出している鉄板ネタ

リファレンスアーキテクチャを構成する

image.png

Azure AI Search は 基本的な生成 AI チャットアプリケーションのリファレンスアーキテクチャを構成します。

Daily Download 時系列

image.png
https://pypistats.org/packages/llama-index-vector-stores-azureaisearch

11/14 に何があった!?

参考

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?