---
title: "AWS Bedrock KnowledgeBase RAG サンプル: 1回 概要"
description: "AWS Bedrock KnowledgeBase RAG サンプル: 1回 概要の記事です"
image: https://www.spin-dd.com/hubfs/innovalabs-software-developer-6521720.jpg
---

[![SPIN D&D](https://www.spin-dd.com/hubfs/raw_assets/public/spindd/images/logo_white.png)](https://www.spin-dd.com/home)

[企業情報](https://www.spin-dd.com/company) [事業紹介](https://www.spin-dd.com/service) [お知らせ](https://www.spin-dd.com/news) [採用情報](https://www.wantedly.com/companies/spin-dd) [無料相談](https://www.spin-dd.com/contact)

⋮ ✕

[トップ](https://www.spin-dd.com/) › [ニュース](https://www.spin-dd.com/news) › 詳細ページ

NEWS

# ニュース

2026.04.06 技術ブログ

## AWS Bedrock KnowledgeBase RAG サンプル: 1回 概要

![](https://www.spin-dd.com/hubfs/innovalabs-software-developer-6521720.jpg)

株式会社 SPIN D&D (https://www.spin-dd.com/) では 課題の背景にある本質を解決する ための技術的手段として以下に示す３つの技術的支柱を礎として活動しています。

1.AWS (アマゾン ウェブ サービス) をコンピューティング基盤としてクラウドシステムで問題を解決する  
2.Python のエコシステムにあるフレームワークをつかって生産性を意識した業務ロジックを実装する  
3.TypeScript/React を活用した使いやすいユーザーインターフェースを構築する

本サンプルでは上記の 1,２に関してこれまで我々の活動で得た経験の一部をご紹介したいと思います。 3 に関しても次回以降で紹介させていただく予定です。

 

サンプルの内容

本サンプルでは生成 AI を用いた FAQ システムの構築例を実装してあります。

以下のような技術要素を紹介しています。

1.IaC: プログラム基盤構築(?)(Infrastructure as Code) として OpenTofu を使っています  
2.RAG: 検索拡張生成(Retrieval-Augmented Generation)の応答基盤として Knowledge bases for Amazon Bedrockを使っています  
3.ベクトル化文書データベース: RAG のバックエンドのデータベースとして Aurora PostgreSQL + pgvector を使っています  
4.AI 関連プログラミングインターフェース: アプリケーションからは LangChain を使って RAG の処理を行なっています  
5.サーバーレス API: インターネットからの問い合わせを API Gateway を通じで AWS Lambda で実装したプログラムで処理しています

 

利用してい処理系は Python で以下のようなライブラリ/フレームワークを使っています。  
1.[boto3](https://aws.amazon.com/jp/sdk-for-python/) (AWS の操作)  
2.[LangChain](https://www.langchain.com/)(AI 関連)  
3.[FastAPI](https://fastapi.tiangolo.com/ja/) (Web API 実装)  
4.[SqlAlchemy](https://www.sqlalchemy.org/)(モデル定義)  
5.[uvicorn(](https://uvicorn.dev/)ASGI による HTTP 処理)  
6.[click](https://click.palletsprojects.com/en/stable/)(コマンド実装)  
7.[scrapy](https://www.scrapy.org/)(スクレーピング)

また、以下のようなツールを使っています。

1.[docker compose](https://docs.docker.jp/desktop/index.html)  
2.[mkdocs](https://www.mkdocs.org/)(文書化)  
3.[ruff](https://docs.astral.sh/ruff/)(ソースコード書式化)  
4.[poetry](https://python-poetry.org/)(パッケージ管理)

成果物について

Github の以下のレポジトリからクローンして利用することができます。  
[https://github.com/spin-dd/aws-rag-kb](https://github.com/spin-dd/aws-rag-kb)  
「その他」で使っているツールは別のレポジトリをクローンして使ってください。  
[https://github.com/spin-dd/aws-tools](https://github.com/spin-dd/aws-tools)

[← 前の記事 AWS Bedrock KnowledgeBase RAG ...](https://www.spin-dd.com/news/202401) [次の記事 → AWS Bedrock KnowledgeBase RAG ...](https://www.spin-dd.com/news/202403)

[一覧へ戻る](https://www.spin-dd.com/news)

[![SPIN D&D](https://www.spin-dd.com/hubfs/raw_assets/public/spindd/images/logo_white.png)](https://www.spin-dd.com/)

東京都文京区本郷1-19-6  
太平ビル本館2階  
[03-5802-6170](tel:0358026170)

- [企業情報](https://www.spin-dd.com/company)
- [お知らせ](https://www.spin-dd.com/news)

- [システム構築支援](https://www.spin-dd.com/service)
- [Webマーケティング](https://www.spin-dd.com/service-2)
- [建物管理SaaS](https://www.spin-dd.com/builsys)

- [採用](https://www.wantedly.com/companies/spin-dd)
- [お問い合わせ](https://www.spin-dd.com/contact)

©  SPIN D&D

[プライバシーポリシー](https://www.spin-dd.com/privacy)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "奈良 英樹",
    "url" : "https://www.spin-dd.com/news/author/奈良-英樹"
  },
  "dateModified" : "2026-04-06T07:04:18.188Z",
  "datePublished" : "2026-04-06T07:04:18.000Z",
  "headline" : "AWS Bedrock KnowledgeBase RAG サンプル: 1回 概要",
  "image" : [ "https://www.spin-dd.com/hubfs/innovalabs-software-developer-6521720.jpg" ],
  "mainEntityOfPage" : {
    "@id" : "https://www.spin-dd.com/news/202402",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject"
    }
  }
}
```