Create an HCLS document summarization application with Falcon using Amazon SageMaker JumpStart

Generative AI is being adopted by healthcare and life sciences customers to help extract valuable insights from data. Use cases include document summarization and converting unstructured text into standardized formats. Customers are looking for performant and cost-effective models, as well as the ability to customize them. This article explains how to deploy a Falcon large language model (LLM) using Amazon SageMaker JumpStart for document summarization.

 Create an HCLS document summarization application with Falcon using Amazon SageMaker JumpStart

Healthcare and life sciences customers are using generative AI to make better use of their data. They are using AI for document summarization to highlight key points and transforming unstructured text into standardized formats. These customers need performant and cost-effective models that can be customized to fit their specific needs.

Amazon SageMaker is a managed service that allows data scientists, ML engineers, and business analysts to innovate with ML. With SageMaker JumpStart, users can deploy pre-trained models like the Falcon large language model (LLM) and use them to summarize long documents. SageMaker also provides security measures to ensure that data doesn’t leave the VPC.

The Falcon LLM is a large language model trained on over 1 trillion tokens. It performs well on tasks like text summarization, sentiment analysis, and question answering. SageMaker JumpStart provides sample notebooks to deploy and query different versions of the Falcon LLM.

To deploy the Falcon 7B Instruct model, users can follow the steps in the tutorial. They’ll need an AWS account with a SageMaker domain. The model can be deployed to an endpoint for inference and users can query the model to get generated text.

Users can also use LangChain, an open-source software library, to summarize longer documents. LangChain supports SageMaker endpoints and provides tools for prompt templating and prompt chaining. This allows users to summarize long documents by breaking them down into manageable chunks.

To run a summarization chain with LangChain, users need to install the library and define the necessary classes and prompts. They can then load the summarization chain and run a summary on the input documents.

After using the inference endpoint, it’s important to delete it to avoid unnecessary costs. Users can use the provided code to delete the endpoint.

SageMaker JumpStart offers other foundation models for document summarization. Depending on the model, users may need to modify the JSON structure of the payload and the handling of the response variable.

In conclusion, the Falcon 7B Instruct model, along with SageMaker JumpStart and LangChain, provides an effective solution for summarizing long-form healthcare and life sciences documents at scale. Users can rapidly prototype their models and transition to a production environment.

Action Items:
1. Assign someone to deploy the Falcon 7B Instruct model using SageMaker JumpStart:

Assignee: [insert name]

2. Assign someone to run the first query using the deployed endpoint:

Assignee: [insert name]

3. Assign someone to summarize the text document using the Falcon LLM:

Assignee: [insert name]

4. Assign someone to import and run the summarization chain using LangChain:

Assignee: [insert name]

5. Assign someone to clean up and delete the inference endpoint after use:

Assignee: [insert name]

List of Useful Links:

AI Products for Business or Try Custom Development

AI Sales Bot

Welcome AI Sales Bot, your 24/7 teammate! Engaging customers in natural language across all channels and learning from your materials, it’s a step towards efficient, enriched customer interactions and sales

AI Document Assistant

Unlock insights and drive decisions with our AI Insights Suite. Indexing your documents and data, it provides smart, AI-driven decision support, enhancing your productivity and decision-making.

AI Customer Support

Upgrade your support with our AI Assistant, reducing response times and personalizing interactions by analyzing documents and past engagements. Boost your team and customer satisfaction

AI Scrum Bot

Enhance agile management with our AI Scrum Bot, it helps to organize retrospectives. It answers queries and boosts collaboration and efficiency in your scrum processes.