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
RAGrequires 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 inAmazon S3, andKnowledge Bases for Amazon Bedrocktakes 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/
Metadata
Release files for llama-index-retrievers-bedrock 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llama_index_retrievers_bedrock-0.7.0.tar.gz | 5.0 kB | Without provenance | Details for llama_index_retrievers_bedrock-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llama_index_retrievers_bedrock-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for llama_index_retrievers_bedrock-0.7.0-py3-none-any.whl |
Total release size: 9.8 kB
Release files / llama_index_retrievers_bedrock-0.7.0.tar.gz
| Download URL | llama_index_retrievers_bedrock-0.7.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c17c155df2a01a4449bf720ee368429b56755782ac242c33e928a022591f68ec
|
|
BLAKE2b-256 checksum How to use checksums |
6bb47207de860ae3f9ec885ce6680bbce36b31d8066ebbcc5f69ffd772a37c3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}
|
Release files / llama_index_retrievers_bedrock-0.7.0-py3-none-any.whl
| Download URL | llama_index_retrievers_bedrock-0.7.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eff9154564cc5b8cfc5f0c436843227adda7829222ca7f87b348ef41b42d1945
|
|
BLAKE2b-256 checksum How to use checksums |
89224af4ff64d8d65740c22e7c18bbf69c79d848ffb77b31ce2e54396aaa0593
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","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}
|
Security for llama-index-retrievers-bedrock 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.