Skip to main content

llama-index retrievers bedrock integration

Project description

LlamaIndex Retrievers Integration: Bedrock

Knowledge Bases

Knowledge bases for Amazon Bedrock is an Amazon Web Services (AWS) offering which lets you quickly build RAG applications by using your private data to customize FM response.

Implementing RAG requires organizations to perform several cumbersome steps to convert data into embeddings (vectors), store the embeddings in a specialized vector database, and build custom integrations into the database to search and retrieve text relevant to the user’s query. This can be time-consuming and inefficient.

With Knowledge Bases for Amazon Bedrock, simply point to the location of your data in Amazon S3, and Knowledge Bases for Amazon Bedrock takes care of the entire ingestion workflow into your vector database. If you do not have an existing vector database, Amazon Bedrock creates an Amazon OpenSearch Serverless vector store for you.

Knowledge base can be configured through AWS Console or by using AWS SDKs.

Installation

pip install llama-index-retrievers-bedrock

Usage

from llama_index.retrievers.bedrock import AmazonKnowledgeBasesRetriever

retriever = AmazonKnowledgeBasesRetriever(
    knowledge_base_id="<knowledge-base-id>",
    retrieval_config={
        "vectorSearchConfiguration": {
            "numberOfResults": 4,
            "overrideSearchType": "HYBRID",
            "filter": {"equals": {"key": "tag", "value": "space"}},
        }
    },
)

query = "How big is Milky Way as compared to the entire universe?"
retrieved_results = retriever.retrieve(query)

# Prints the first retrieved result
print(retrieved_results[0].get_content())

Notebook

Explore the retriever using Notebook present at: https://docs.llamaindex.ai/en/latest/examples/retrievers/bedrock_retriever/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_retrievers_bedrock-0.6.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file llama_index_retrievers_bedrock-0.6.0.tar.gz.

File metadata

  • Download URL: llama_index_retrievers_bedrock-0.6.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_retrievers_bedrock-0.6.0.tar.gz
Algorithm Hash digest
SHA256 2f1c5f3278ece13f5c440fa563df8ed148a594788af685dcd95b379bfa7e1634
MD5 4e250ec00b703e905eb9b7040bdcd72d
BLAKE2b-256 176ae99e642d83009ef3c7469f8a000c4ea082ee71d29b60df4ca7f365a98a44

See more details on using hashes here.

File details

Details for the file llama_index_retrievers_bedrock-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_retrievers_bedrock-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llama_index_retrievers_bedrock-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a955af28ea6bb4969a574b0acc9d23437f6c6ffec24717c2e95444fdf816518
MD5 78a4b08a45ceebb2844fec2ca25f6d43
BLAKE2b-256 2ce326ce69c9704c875b23a089e35f7e329fcf2f4bc0566ebad1cc50737f7b1a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page