Amazon Bedrock Introduces APIs to Improve RAG Applications

NewsAmazon Bedrock Introduces APIs to Improve RAG Applications

Introducing New Enhancements in Amazon Bedrock Knowledge Bases

Amazon continues to innovate in the realm of artificial intelligence with its Amazon Bedrock service. This fully managed service offers a range of high-performing foundation models (FMs) from leading AI companies such as AI21 Labs, Anthropic, Cohere, Meta, Mistral AI, Stability AI, and Amazon itself. These models are accessible through a single API, providing a comprehensive toolset for building generative AI applications with a focus on security, privacy, and responsible AI.

Among its suite of tools, Amazon Bedrock Knowledge Bases stands out as a fully managed service designed to empower developers. It enables the creation of highly accurate, low latency, secure, and customizable generative AI applications in a cost-effective manner. The service connects foundation models to a company’s internal data using a technique called Retrieval Augmented Generation (RAG), which enhances the delivery of more relevant, accurate, and customized responses.

New Announcements for Amazon Bedrock Knowledge Bases

In a recent update, Amazon announced two significant enhancements to its Bedrock Knowledge Bases:

  • Support for custom connectors and ingestion of streaming data.
  • Support for reranking models.

    Support for Custom Connectors and Ingestion of Streaming Data

    Amazon Bedrock Knowledge Bases now supports custom connectors and the ingestion of streaming data. This update allows developers to efficiently and cost-effectively manage data ingestion, updates, and deletions directly through a single API call. Previously, maintaining up-to-date data in knowledge bases required a full synchronization with the data source after every change, which was time-consuming and inefficient.

    This new feature addresses several challenges faced by developers and organizations. For instance, integrating data from unsupported sources like Google Drive or Quip into their knowledge bases required moving the data to a supported source such as Amazon S3 before starting the ingestion process. This extra step not only added overhead but also introduced delays in making the data accessible for querying.

    Moreover, developers working with streaming data, such as news feeds or IoT sensor data, faced difficulties in ensuring real-time data availability. The need to store data in a supported source before ingestion resulted in delays, which could become significant operational bottlenecks as data scales up, increasing costs.

    By supporting custom connectors and streaming data ingestion, Amazon Bedrock Knowledge Bases now offers a more streamlined approach. Developers can directly add, check the status of, and delete data without the need for a complete dataset synchronization, optimizing both efficiency and cost.

    How It Works

    The new functionality is accessible via the Amazon Bedrock console or the AWS SDK. Here’s a quick overview of how the process works:

    1. Add Document: The Add Document API enables users to add new files to the knowledge base without requiring a full sync. This can include specifying an Amazon S3 path, adding text content, or using a Base64-encoded string.
    2. Delete Document: The Delete Document API allows users to remove data from the knowledge base without necessitating a full sync.
    3. List Documents: This API provides a list of records matching specified request parameters.
    4. Get Document: This API retrieves information about documents that match specified criteria.

      These new capabilities are now available in all AWS Regions where Amazon Bedrock Knowledge Bases is offered. For more details, including region availability and pricing, visit the Amazon Bedrock product and pricing pages on the AWS website.

      Support for Reranking Models

      The second major announcement is the introduction of a new Rerank API in Amazon Bedrock. This tool provides developers with the ability to enhance the performance of their RAG-based applications by improving the relevance and accuracy of responses. It addresses a common challenge in semantic search, which involves embedding documents and queries into a high-dimensional vector space for semantic similarity.

      Semantic search is crucial in RAG applications, as the relevance of retrieved documents to a user’s query significantly impacts the accuracy of responses. However, it has limitations in prioritizing documents based on user preferences or query context, especially when queries are complex, ambiguous, or contextually nuanced. This can result in documents that are only partially relevant being retrieved, leading to trust and transparency issues due to improper source attribution.

      To overcome these challenges, advanced reranking models focus on prioritizing the most pertinent content from a knowledge base for a given query. This ensures that foundation models receive the most relevant information, leading to more accurate and contextually appropriate responses. Additionally, reranking models can reduce response generation costs by prioritizing the information sent to the generation model.

      How It Works

      The launch supports Amazon Rerank 1.0 and Cohere Rerank 3.5 models. Developers can start by requesting access to these models. The process involves creating a knowledge base using the existing Amazon Bedrock Knowledge Bases Console experience or an API process. The knowledge base can include various data sources, such as a music playlist or a list of films.

      Once the knowledge base is set up, the Service Role can be edited to include the policy containing the bedrock:Rerank action. The API then takes the user query as input, along with the list of documents to be reranked, and outputs a prioritized list of documents based on their relevance to the query.

      The final step involves syncing the data sources to index their contents for searching, which can take from minutes to hours. Once synced, the RetrieveAndGenerate API reranks the results retrieved from the vector datastore based on their relevance to the query.

      This new feature is available in select AWS Regions, including US West (Oregon), Canada (Central), Europe (Frankfurt), and Asia Pacific (Tokyo). It can be used independently to rerank documents, even if Amazon Bedrock Knowledge Bases are not being utilized.

      For more information on Amazon Bedrock Knowledge Bases and the Rerank API, including pricing details, visit the respective product and pricing pages on the AWS website.

      Conclusion

      With these recent updates, Amazon Bedrock Knowledge Bases continues to evolve, providing developers with enhanced tools for building efficient, accurate, and cost-effective generative AI applications. By supporting custom connectors and streaming data ingestion, as well as offering advanced reranking capabilities, Amazon is addressing critical challenges in data management and query relevance, paving the way for more robust AI solutions.

      For feedback or to engage with the generative AI builder community, visit AWS re:Post or the AWS community page. To explore more about these updates and their applications, you can access the detailed documentation available on the AWS website.

For more Information, Refer to this article.

Neil S
Neil S
Neil is a highly qualified Technical Writer with an M.Sc(IT) degree and an impressive range of IT and Support certifications including MCSE, CCNA, ACA(Adobe Certified Associates), and PG Dip (IT). With over 10 years of hands-on experience as an IT support engineer across Windows, Mac, iOS, and Linux Server platforms, Neil possesses the expertise to create comprehensive and user-friendly documentation that simplifies complex technical concepts for a wide audience.
Watch & Subscribe Our YouTube Channel
YouTube Subscribe Button

Latest From Hawkdive

You May like these Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.