LoginSignup
6
4

WebクロールしてRAGの情報源にしたいなと思いApache StormCrawlerを試しました!!(未達)

Posted at

Amazon KendraやAmazon Q Businessのように、Webサイトをクロールさせて独自ナレッジにする方法を調べてました。そんな中で見つけたのが、Apache StormCrawlerです。

Apacheプロジェクトにこういったものがあるとは知らず、興味を持ったので調査を始めましたがあまり情報もなく、難易度高め。。

Apache StormCrawlerとは

Geminiに聞いてみました。こちら

Apache StormCrawler は、Apache Storm をベースとした分散型 Web クローラ開発のためのオープンソースのライブラリとリソースのコレクションです。低遅延でスケーラブルな Web クローラを構築するために設計されており、以下のような機能を提供します。

主な機能:

  • 分散処理: Apache Storm の分散処理能力を活用して、大規模な Web サイトを効率的にクロールできます
  • スケーラブル: クローリングの負荷に応じて、リソースを自動的にスケールアップ/スケールダウンできます
  • リアルタイム処理: クローリングされたデータはリアルタイムで処理され、分析や可視化に利用できます
  • モジュール性: クローリングパイプラインを柔軟に構成できるモジュール設計を採用しています
  • 拡張性: 独自のプラグインやモジュールを開発して、機能を拡張できます

StormCrawlerの環境構築

Dockerで簡単に環境構築できるものを見つけたのでこれで検証してみました。

まず、Git Cloneします。

git clone https://github.com/DigitalPebble/stormcrawler-docker.git
cd stormcrawler-docker

作業用に使用するrunnerコンテナのイメージをビルドします。

docker build -t digitalpebble/storm_maven:2.6 .

必要なディレクトリを作成します。権限を777で付与します。

mkdir -m 777 crawldata
mkdir -m 777 frontier

docker-compose.ymlにOpenSearchとOpenSearch Dashboardを追加します。

diff --git a/docker-compose.yml b/docker-compose.yml
index 08904dc..82358d0 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -70,6 +70,42 @@ services:
     volumes:
       - ./frontier:/crawldir
 
+  opensearch-node1:
+    image: opensearchproject/opensearch:latest
+    container_name: opensearch-node1
+    environment:
+      - discovery.type=single-node
+      # - cluster.name=opensearch-cluster # Name the cluster
+      - node.name=opensearch-node1 # Name the node that will run in this container
+      # - discovery.seed_hosts=opensearch-node1,opensearch-node2 # Nodes to look for when discovering the cluster
+      # - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 # Nodes eligibile to serve as cluster manager
+      - bootstrap.memory_lock=true # Disable JVM heap memory swapping
+      - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
+      - "DISABLE_INSTALL_DEMO_CONFIG=true" # Prevents execution of bundled demo script which installs demo certificates and security configurations to OpenSearch
+      - "DISABLE_SECURITY_PLUGIN=true" # Disables Security plugin
+    ulimits:
+      memlock:
+        soft: -1 # Set memlock to unlimited (no soft or hard limit)
+        hard: -1
+      nofile:
+        soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
+        hard: 65536
+    volumes:
+      - opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container
+    ports:
+      - 9200:9200 # REST API
+      - 9600:9600 # Performance Analyzer
+  opensearch-dashboards:
+    image: opensearchproject/opensearch-dashboards:latest
+    container_name: opensearch-dashboards
+    ports:
+      - 5601:5601 # Map host port 5601 to container port 5601
+    expose:
+      - "5601" # Expose port 5601 for web access to OpenSearch Dashboards
+    environment:
+      - 'OPENSEARCH_HOSTS=["http://opensearch-node1:9200"]'
+      - "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true" # disables security dashboards plugin in OpenSearch Dashboards
+
 volumes:
   storm-ui-logs:
     driver: local
@@ -77,3 +113,4 @@ volumes:
     driver: local
   storm-supervisor-logs:
     driver: local
+  opensearch-data1:
docker-compose.yml 全体
docker-compose.yml
version: '3.1'

services:
  zookeeper:
    image: zookeeper:3.7.0
    container_name: zookeeper
    restart: always

  nimbus:
    image: storm:2.6
    container_name: nimbus
    command: storm nimbus
    depends_on:
      - zookeeper
    restart: always
    volumes:
      - storm-nimbus-logs:/logs

  supervisor:
    image: storm:2.6
    container_name: supervisor
    command: storm supervisor -c worker.childopts=-Xmx%HEAP-MEM%m
    depends_on:
      - nimbus
      - zookeeper
    restart: always
    volumes:
      - storm-supervisor-logs:/logs

  ui:
    image: storm:2.6
    container_name: ui
    command: storm ui
    depends_on:
      - nimbus
    restart: always
    ports:
      - "127.0.0.1:8080:8080"
    volumes:
      - storm-ui-logs:/logs

  runner:
    image: digitalpebble/storm_maven:2.6
    container_name: runner
    depends_on:
      - nimbus
    volumes:
      - "./crawldata:/crawldata"

# the logviewer does not work in a container environment 
# see https://issues.apache.org/jira/browse/STORM-1759

#  logviewer:
#    image: storm:2.4.0-temurin
#    container_name: logviewer
#    command: storm logviewer
#    depends_on:
#      - nimbus
#      - supervisor
#    restart: always
#    ports:
#      - "127.0.0.1:8000:8000"

  frontier:
    image: crawlercommons/url-frontier
    container_name: frontier
    command: rocksdb.path=/crawldir/rocksdb
    ports:
      - "127.0.0.1:7071:7071"
    volumes:
      - ./frontier:/crawldir

  opensearch-node1:
    image: opensearchproject/opensearch:latest
    container_name: opensearch-node1
    environment:
      - discovery.type=single-node
      # - cluster.name=opensearch-cluster # Name the cluster
      - node.name=opensearch-node1 # Name the node that will run in this container
      # - discovery.seed_hosts=opensearch-node1,opensearch-node2 # Nodes to look for when discovering the cluster
      # - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2 # Nodes eligibile to serve as cluster manager
      - bootstrap.memory_lock=true # Disable JVM heap memory swapping
      - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM
      - "DISABLE_INSTALL_DEMO_CONFIG=true" # Prevents execution of bundled demo script which installs demo certificates and security configurations to OpenSearch
      - "DISABLE_SECURITY_PLUGIN=true" # Disables Security plugin
    ulimits:
      memlock:
        soft: -1 # Set memlock to unlimited (no soft or hard limit)
        hard: -1
      nofile:
        soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
        hard: 65536
    volumes:
      - opensearch-data1:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container
    ports:
      - 9200:9200 # REST API
      - 9600:9600 # Performance Analyzer
  opensearch-dashboards:
    image: opensearchproject/opensearch-dashboards:latest
    container_name: opensearch-dashboards
    ports:
      - 5601:5601 # Map host port 5601 to container port 5601
    expose:
      - "5601" # Expose port 5601 for web access to OpenSearch Dashboards
    environment:
      - 'OPENSEARCH_HOSTS=["http://opensearch-node1:9200"]'
      - "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true" # disables security dashboards plugin in OpenSearch Dashboards

volumes:
  storm-ui-logs:
    driver: local
  storm-nimbus-logs:
    driver: local
  storm-supervisor-logs:
    driver: local
  opensearch-data1:

Docker Composeで起動

docker compose up

以下のコンテナが起動します。

コンテナ名 コンテナイメージ command
zookeeper zookeeper:3.7.0
nimbus storm:2.6 storm nimbus
supervisor storm:2.6 storm supervisor -c worker.childopts=-Xmx%HEAP-MEM%m
ui storm:2.6 storm ui
runner 先ほどビルドしたdigitalpebble/storm_maven:2.6
frontier crawlercommons/url-frontier rocksdb.path=/crawldir/rocksdb
opensearch-node1 opensearchproject/opensearch:latest
opensearch-dashboards opensearchproject/opensearch-dashboards:latest

Apache ZooKeeperApache Stormで構成されているようです。
OpenSearchを使用するので、crawlercommons/url-frontierはおそらく不要と思います。

画面を確認

起動したコンテナで画面があるものを紹介

  • Storm UI (コンテナ名:ui)

http://localhost:8080/ でアクセス

image.png

  • OpenSearch Dashboards (コンテナ名:opensearch-dashboards)

http://localhost:5601/ でアクセス

localhost_5601_app_home.png

StormCrawlerプロジェクトの作成

StormCrawlerに関する作業はrunnerコンテナ内で行います。

runnerコンテナにログイン(?)します。

docker compose run runner bash

Mavenコマンドにエイリアスを追加します。(ホームディレクトリがないため)
その後で、カレントディレクトリを移動します。

on runner container
alias mvn="mvn -Dmaven.repo.local=/crawldata/.repository"
cd /crawldata

StormCrawlerプロジェクトを作成します。

on runner container
mvn archetype:generate \
  -DarchetypeGroupId=com.digitalpebble.stormcrawler \
  -DarchetypeArtifactId=storm-crawler-opensearch-archetype \
  -DarchetypeVersion=2.9 \
  -DartifactId=crawler \
  -DgroupId=com.digitalpebble \
  -Dversion=1.0

「y」で回答します。

Confirm properties configuration:
StormCrawlerVersion: 2.9
groupId: com.digitalpebble
artifactId: crawler
version: 1.0
package: com.digitalpebble
 Y: : y ←入力

StormCrawlerプロジェクトが作成されます。

以下のファイルが作成されます。
(stormcrawler-docker/crawldata/crawlerフォルダーです)

tree
crawler
├── crawler-conf.yaml
├── crawler.flux
├── dashboards
│   ├── importDashboards.sh
│   ├── metrics.ndjson
│   ├── status.ndjson
│   └── storm.ndjson
├── injection.flux
├── opensearch-conf.yaml
├── pom.xml
├── README.md
└── src
    └── main
        └── resources
            ├── default-regex-filters.txt
            ├── default-regex-normalizers.xml
            ├── jsoupfilters.json
            ├── parsefilters.json
            └── urlfilters.json

4 directories, 15 files

作成したStormCrawlerプロジェクトに移動します。

on runner container
cd crawler

StormCrawlerのjarを生成します。

on runner container
mvn clean package

設定ファイル(opensearch-conf.yaml)に以下の修正を行います。

  • 接続先がlocalhostになっているので、opensearch-node1(OpenSearchのコンテナ名)に変更
opensearch-conf.yaml
diff --git a/opensearch-conf.yaml b/opensearch-conf.yaml
index 99a706e..188f6ac 100644
--- a/opensearch-conf.yaml
+++ b/opensearch-conf.yaml
@@ -4,7 +4,7 @@ config:
 
   # address to use unless a more specific one has been 
   # defined for a component
-  opensearch.addresses: "http://localhost:9200"
+  opensearch.addresses: "http://opensearch-node1:9200"
   #opensearch.user: "USERNAME"
   #opensearch.password: "PASSWORD"
   opensearch.concurrentRequests: 2
@@ -12,7 +12,7 @@ config:
   # Indexer bolt
   # adresses can be specified as a full URL
   # if not we assume that the protocol is http and the port 9200
-  opensearch.indexer.addresses: "localhost"
+  opensearch.indexer.addresses: "opensearch-node1"
   opensearch.indexer.index.name: "content"
   # opensearch.indexer.pipeline: "_PIPELINE_"
   opensearch.indexer.create: false
@@ -25,7 +25,7 @@ config:
   opensearch.metrics.index.name: "metrics"
   
   # Spout and persistence bolt
-  opensearch.status.addresses: "http://localhost:9200"
+  opensearch.status.addresses: "http://opensearch-node1:9200"
   opensearch.status.index.name: "status"
   #opensearch.status.user: "USERNAME"
   #opensearch.status.password: "PASSWORD"

OpenSearch DashboardsにStormCrawlerのダッシュボード(ステータスメトリクス)を作成します。(画面イメージは後ほど)

作成スクリプトの接続先をopensearch-dashboardsに変更します。

dashboards/importDashboards.sh
diff --git a/dashboards/importDashboards.sh b/dashboards/importDashboards.sh
index 96488ce..1edbf8e 100755
--- a/dashboards/importDashboards.sh
+++ b/dashboards/importDashboards.sh
@@ -1,11 +1,11 @@
 #!/bin/sh
 
 echo "Importing status dashboard into OpenSearch Dashboards"
-curl -X POST "localhost:5601/api/saved_objects/_import" -H "osd-xsrf: true" --form file=@status.ndjson
+curl -X POST "opensearch-dashboards:5601/api/saved_objects/_import" -H "osd-xsrf: true" --form file=@status.ndjson
 echo ""
 
 echo "Importing metrics dashboard into OpenSearch Dashboards"
-curl -X POST "localhost:5601/api/saved_objects/_import" -H "osd-xsrf: true" --form file=@metrics.ndjson
+curl -X POST "opensearch-dashboards:5601/api/saved_objects/_import" -H "osd-xsrf: true" --form file=@metrics.ndjson
 echo ""
 
 # Storm internal metrics

dashboards/importDashboards.shを実行します。

on runner container
cd dashboards
./importDashboards.sh
Importing status dashboard into OpenSearch Dashboards
{"successCount":0,"success":false,"errors":[{"type":"index-pattern","id":"7445c390-7339-11e9-9289-ffa3ee6775e4","title":"status","meta":{"title":"status","icon":"indexPatternApp"},"error":{"type":"conflict"}},{"type":"visualization","id":"status-count","title":"status count","meta":{"title":"status count","icon":"visualizeApp"},"error":{"type":"conflict"}},{"type":"visualization","id":"Top-Hosts","title":"Top Hosts","meta":{"title":"Top Hosts","icon":"visualizeApp"},"error":{"type":"conflict"}},{"type":"dashboard","id":"Crawl-status","title":"Crawl status","meta":{"title":"Crawl status","icon":"dashboardApp"},"error":{"type":"conflict"}}]}
Importing metrics dashboard into OpenSearch Dashboards
{"successCount":0,"success":false,"errors":[{"type":"index-pattern","id":"b5c3bbd0-7337-11e9-9289-ffa3ee6775e4","title":"metrics","meta":{"title":"metrics","icon":"indexPatternApp"},"error":{"type":"conflict"}},{"type":"visualization","id":"Fetcher-:-#-active-threads","title":"Fetcher : # active threads","meta":{"title":"Fetcher : # active threads","icon":"visualizeApp"},"error":{"type":"conflict"}},{"type":"visualization","id":"Fetcher-:-num-queues","title":"Fetcher : num queues","meta":{"title":"Fetcher : num queues","icon":"visualizeApp"},"error":{"type":"conflict"}},{"type":"visualization","id":"Fetcher-:-pages-fetched","title":"Fetcher : pages fetched","meta":{"title":"Fetcher : pages fetched","icon":"visualizeApp"},"error":{"type":"conflict"}},{"type":"visualization","id":"Fetcher-:-URLs-waiting-in-queues","title":"Fetcher : URLs waiting in queues","meta":{"title":"Fetcher : URLs waiting in queues","icon":"visualizeApp"},"error":{"type":"conflict"}},{"type":"visualization","id":"Fetcher-:-average-bytes-per-second","title":"Fetcher : average bytes per second","meta":{"title":"Fetcher : average bytes per second","icon":"visualizeApp"},"error":{"type":"conflict"}},{"type":"visualization","id":"Fetcher-:-average-pages-per-second","title":"Fetcher : average pages per second","meta":{"title":"Fetcher : average pages per second","icon":"visualizeApp"},"error":{"type":"conflict"}},{"type":"visualization","id":"Total-bytes-fetched","title":"Total bytes fetched","meta":{"title":"Total bytes fetched","icon":"visualizeApp"},"error":{"type":"conflict"}},{"type":"dashboard","id":"Crawl-metrics","title":"Crawl metrics","meta":{"title":"Crawl metrics","icon":"dashboardApp"},"error":{"type":"conflict"}}]}

クロールしてみる

では、クロールさせてみましょう

on runner container
cd ..
pwd
/crawldata/crawler

まずはクロール対象をseeds.txtに記述します。

on runner container
echo "https://aws.amazon.com/jp/about-aws/whats-new/2023/09/amazon-bedrock-generally-available/" > seeds.txt
echo "https://aws.amazon.com/about-aws/whats-new/2023/09/amazon-bedrock-generally-available/" >> seeds.txt

クロールを実行します。

on runner container
storm local target/crawler-1.0.jar org.apache.storm.flux.Flux injection.flux
on runner container
storm local target/crawler-1.0.jar org.apache.storm.flux.Flux crawler.flux

それぞれのコマンドが何をしているのかは、正直わかってません。。

2つのコマンドを実行すると、インデックスにstatusmetricscontentが追加されます。

localhost_5601_app_home (1).png

メトリクスダッシュボード

localhost_5601_app_home (2).png

ステータスダッシュボード

localhost_5601_app_home (3).png

クロール結果はcontentインデックスに登録されるようですので、取得してみます。

Dev Toolsにて、以下のリクエストを送信します。

GET content/_search
{
  "query": {
    "match_all": {}
  }
}

クロールされたHTMLが確認できました。

{
  "took": 8,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 2,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "content",
        "_id": "982c4fa931e5da9b6a77e92681b7f56647332445894e11fbee63e7ca72c75cc6",
        "_score": 1,
        "_source": {
          "content": "メインコンテンツに移動 アマゾン ウェブ サービスのホームページに戻るには、ここをクリック お問い合わせ サポート 日本語 アカウント サインイン AWS アカウントを作成 re:Invent 製品 ソリューション 料金 ドキュメント 学ぶ パートナーネットワーク AWS Marketplace カスタマーサポート イベント さらに詳しく見る 閉じる عربي Bahasa Indonesia Deutsch English Español Français Italiano Português Tiếng Việt Türkçe Ρусский ไทย 日本語 한국어 中文 (简体) 中文 (繁體) 閉じる 自分のプロフィール AWS Builder ID からサインアウト AWS マネジメントコンソール アカウント設定 請求情報とコスト管理 セキュリティ認証情報 AWS Personal Health Dashboard 閉じる サポートセンター エキスパートによるサポート ナレッジセンター AWS サポートの概要 AWS re:Post アマゾン ウェブ サービスのホームページに戻るには、ここをクリック 無料で開始する お問い合わせ re:Invent 製品 ソリューション 料金 AWS 入門 開始方法 ドキュメント トレーニングと認定 開発者センター お客様の導入事例 パートナー AWS Marketplace サポート AWS re:Post コンソールにログイン モバイルアプリをダウンロード Amazon Bedrock の一般提供が開始 投稿日: Sep 28, 2023 Amazon Bedrock の一般提供が開始しました。このサービスを利用すると、基盤モデル (FM) を使用して生成系 AI アプリケーションを非常に簡単に構築およびスケールできます。Amazon Bedrock は、AI21 Labs、Anthropic、Cohere、Meta、Stability AI、Amazon などの大手 AI 企業が提供する高性能な基盤モデルを選択できるフルマネージドサービスです。また、生成系 AI アプリケーションの構築に必要な幅広い機能も備えているため、プライバシーとセキュリティを維持しながら開発を簡素化できます。 Amazon Bedrock は、Meta の大規模言語モデル (LLM) である Llama 2 の微調整済み 13B および 70B のパラメータバージョンをフルマネージド API として業界で初めて提供開始します。Llama モデルは対話型のユースケースに最適です。詳細については、Llama 2 on Amazon Bedrock を参照してください。 Amazon Bedrock では、生成系 AI の本稼働環境へのデプロイの所要時間を短縮するため、プロビジョニングされたスループットを利用できます。これにより、スループット (1 分あたりの入出力トークン) を予約し、トラフィックのピーク時でも一貫したユーザーエクスペリエンスを維持できる柔軟性と制御性が得られます。Amazon Bedrock は、規制の厳しい業界のお客様向けに、HIPAA と GDPR に準拠しています。さらに、Amazon Bedrock は Amazon CloudWatch と統合されているため、使用状況メトリクスを追跡し、監査の用途向けにカスタムダッシュボードを構築できます。また、AWS CloudTrail とも統合されているため、他のシステムを生成系 AI アプリケーションと統合した場合に、API アクティビティをモニタリングおよびトラブルシューティングできます。 Amazon Bedrock は、米国東部 (バージニア北部) および米国西部 (オレゴン) の各 AWS リージョンで使用可能です。 生成系 AI を使用した構築について詳しくは、Amazon Bedrock、Amazon Bedrock pricing、発表に関するブログ記事を参照してください。 » コンソールにサインイン AWS について学ぶ AWS とは クラウドコンピューティングとは AWS のインクルージョン、ダイバーシティ、および公平性 DevOps とは コンテナとは データレイクとは AWS クラウドセキュリティ 最新情報 ブログ Press Releases AWS のリソース 開始方法 トレーニングと認定 AWS ソリューションライブラリ アーキテクチャセンター 製品と技術上のよくある質問 アナリストレポート AWS パートナー AWS を利用するデベロッパー デベロッパーセンター SDK とツール AWS での .NET AWS での Python AWS での Java AWS での PHP AWS での JavaScript builders.flash (AWS 公式ウェブマガジン) ヘルプ お問い合わせ 専門家によるサポートを受ける サポートチケットを申請する AWS re:Post ナレッジセンター AWS サポートの概要 法務関連 AWS の採用情報 AWS アカウントを無料で作成 Amazon は男女雇用機会均等法を順守しています。 人種、出身国、性別、性的指向、障がい、年齢、その他の属性によって差別することなく、平等に採用選考の機会を提供しています。 言語 عربي Bahasa Indonesia Deutsch English Español Français Italiano Português Tiếng Việt Türkçe Ρусский ไทย 日本語 한국어 中文 (简体) 中文 (繁體) プライバシー | サイト規約 | Cookie の詳細設定 | © 2023, Amazon Web Services, Inc. or its affiliates.All rights reserved. Internet Explorer のサポートの終了 了承しました AWS support for Internet Explorer は 07/31/2022 に終了します。サポートされているブラウザは、Chrome、Firefox、Edge、Safari です。 詳細はこちら » 了承しました",
          "url": "https://aws.amazon.com/jp/about-aws/whats-new/2023/09/amazon-bedrock-generally-available/",
          "domain": "amazon.com",
          "format": "html",
          "title": "Amazon Bedrock の一般提供が開始"
        }
      },
      {
        "_index": "content",
        "_id": "df55dfd7052cf2f65e861ec39a200b1ac539fc97eebb6dfba8a07122d7a83173",
        "_score": 1,
        "_source": {
          "content": "Skip to main content Click here to return to Amazon Web Services homepage About AWS Contact Us Support English My Account Sign In Create an AWS Account Products Solutions Pricing Documentation Learn Partner Network AWS Marketplace Customer Enablement Events Explore More Close عربي Bahasa Indonesia Deutsch English Español Français Italiano Português Tiếng Việt Türkçe Ρусский ไทย 日本語 한êµì–´ ä¸æ–‡ (简体) ä¸æ–‡ (繁體) Close My Profile Sign out of AWS Builder ID AWS Management Console Account Settings Billing & Cost Management Security Credentials AWS Personal Health Dashboard Close Support Center Expert Help Knowledge Center AWS Support Overview AWS re:Post Click here to return to Amazon Web Services homepage Get Started for Free Contact Us Products Solutions Pricing Introduction to AWS Getting Started Documentation Training and Certification Developer Center Customer Success Partner Network AWS Marketplace Support AWS re:Post Log into Console Download the Mobile App Amazon Bedrock is now generally available Posted On: Sep 28, 2023 Amazon Bedrock, the easiest way to build and scale generative AI applications with foundation models (FMs), is now generally available. Amazon Bedrock is a fully managed service that offers a choice of high-performing FMs from leading AI companies including AI21 Labs, Anthropic, Cohere, Meta, Stability AI, and Amazon, along with a broad set of capabilities that you need to build generative AI applications, simplifying development while maintaining privacy and security. Amazon Bedrock is the first to offer Llama 2, Meta’s large language models (LLMs), in fine-tuned 13B and 70B parameter versions as a fully managed API. Llama models are ideal for dialogue use cases. To learn more, see Llama 2 on Amazon Bedrock. To help you accelerate deploying generative AI into production, provisioned throughput is available in Amazon Bedrock, which provides you the flexibility and control to reserve throughput (Input/Output tokens per minute) and maintain a consistent user experience even during peak traffic times. For customers building in highly regulated industries, Amazon Bedrock has achieved HIPAA eligibility and GDPR compliance. Additionally, Amazon Bedrock is integrated with Amazon CloudWatch, to help you track usage metrics and build customized dashboards for audit purposes, and with AWS CloudTrail, to monitor and troubleshoot API activity as you integrate other systems into your generative AI applications. Amazon Bedrock is available in the US East (N. Virginia) and US West (Oregon) AWS Regions. To learn more about building with generative AI, visit Amazon Bedrock, Amazon Bedrock pricing, and the announcement blog post. » Sign In to the Console Learn About AWS What Is AWS? What Is Cloud Computing? AWS Inclusion, Diversity & Equity What Is DevOps? What Is a Container? What Is a Data Lake? What is Generative AI? AWS Cloud Security What's New Blogs Press Releases Resources for AWS Getting Started Training and Certification AWS Solutions Library Architecture Center Product and Technical FAQs Analyst Reports AWS Partners Developers on AWS Developer Center SDKs & Tools .NET on AWS Python on AWS Java on AWS PHP on AWS JavaScript on AWS Help Contact Us Get Expert Help File a Support Ticket AWS re:Post Knowledge Center AWS Support Overview Legal AWS Careers Create an AWS Account Amazon is an Equal Opportunity Employer: Minority / Women / Disability / Veteran / Gender Identity / Sexual Orientation / Age. Language عربي Bahasa Indonesia Deutsch English Español Français Italiano Português Tiếng Việt Türkçe Ρусский ไทย 日本語 한êµì–´ ä¸æ–‡ (简体) ä¸æ–‡ (繁體) Privacy | Site Terms | Cookie Preferences | © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Ending Support for Internet Explorer Got it AWS support for Internet Explorer ends on 07/31/2022. Supported browsers are Chrome, Firefox, Edge, and Safari. Learn more » Got it",
          "url": "https://aws.amazon.com/about-aws/whats-new/2023/09/amazon-bedrock-generally-available/",
          "domain": "amazon.com",
          "format": "html",
          "title": "Amazon Bedrock is now generally available"
        }
      }
    ]
  }
}

設定ファイルを調整すると、色々できそうではありますが、難しそう。。

まとめ

RAGの情報源になるかなと思ったのですが、色々調整しないと難しそうです。

  • チャンク分割
  • ベクトル化

あたりも自動化できると、使い道がありそうに思いました。

6
4
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
6
4