Build public-facing generative AI applications using Amazon Q Business for anonymous users


Amazon Q Business is a generative AI-powered assistant that solutions query, supplies summaries, generates content material, and securely completes duties in response to venture knowledge and data. It connects to corporate knowledge resources, packages, and inside programs to supply related, contextual solutions whilst keeping up organizational safety and compliance requirements.

Nowadays, we’re excited to announce that Amazon Q Industry now helps anonymous user access. With this new characteristic, you’ll now create Amazon Q Industry packages with nameless consumer mode, the place consumer authentication isn’t required and content material is publicly available. Those nameless consumer packages can be utilized in use circumstances comparable to public site Q&A, documentation portals, and buyer self-service stories.

This capacity lets in visitor customers to make use of Amazon Q Industry generative AI functions to briefly to find product data, get technical solutions, navigate documentation, and troubleshoot problems. Your public-facing web pages, documentation, and reinforce portals can now ship the similar robust AI-driven help that authenticated customers obtain, developing an trip that enriches the visitor consumer adventure throughout your virtual environments.

With this release, you’ll seamlessly combine an nameless Amazon Q Industry software into your web pages and cyber web packages thru two pathways: both by way of embedding the ready-to-use cyber web trip into your web pages the use of an iframe for fast deployment, or by way of the use of our Chat, ChatSync, and PutFeedback APIs to construct utterly custom designed interfaces inside of your individual packages. For nameless Amazon Q Industry packages, we’ve applied a easy consumption-based pricing style the place you’re charged in response to the collection of Chat or ChatSync API operations your nameless Amazon Q Industry packages make.

On this publish, we reveal how one can construct a public-facing generative AI software the use of Amazon Q Industry for nameless customers.

Answer review

On this answer, we stroll you thru developing an nameless Amazon Q Industry software the use of each the AWS Management Console and AWS Command Line Interface (AWS CLI). Our instance demonstrates a realistic state of affairs: serving to site guests to find data on public-facing documentation web pages.

We reveal how one can check the implementation with pattern queries in the course of the integrated cyber web trip URL. The ensuing software will also be custom designed and embedded immediately into your web pages (the use of the API or the iframe manner), offering instant price to your customers.

Necessities

To practice together with this publish, you are going to want the next:

  • An AWS account.
  • A minimum of one Amazon Q Industry Professional consumer that has admin permissions to arrange and configure Amazon Q Industry. For pricing data, see Amazon Q Business pricing.
  • AWS Identity and Access Management (IAM) permissions to create and set up IAM roles and insurance policies.
  • Public content material to index (paperwork, FAQs, wisdom base articles) that may be shared with unauthenticated customers.
  • A supported knowledge supply to glue, comparable to an Amazon Simple Storage Service (Amazon S3) bucket containing your public paperwork.
  • The AWS CLI configured with suitable permissions (if following the AWS CLI manner).

Create an nameless Amazon Q Industry software the use of the console

On this phase, we stroll in the course of the steps to put into effect the answer the use of the console.

Create an IAM position for the cyber web trip

Prior to developing your Amazon Q Industry software, it is important to arrange an IAM position with the fitting permissions:

  1. At the IAM console, make a choice Roles within the navigation pane and make a choice Create position.
  2. Make a selection AWS carrier because the depended on entity
  3. Make a choice Amazon Q Industry from the carrier record.
  4. Make a selection Subsequent: Permissions.
  5. Create a customized coverage or connect the vital read-only insurance policies, and upload permissions for nameless entry.

We strongly suggest that you simply use a limited coverage for the position, like the only proven within the following screenshot, which will probably be used to create the cyber web trip for nameless entry software environments.

An instance of a limited position coverage for calling the Chat API for nameless entry software environments can be arn:aws:qbusiness:::software/.

  1. Create an IAM position with a have confidence coverage that permits the Amazon Q Industry carrier most important to suppose the position the use of AWS Security Token Service (AWS STS), particularly scoped for your software’s Amazon Useful resource Identify (ARN) within the designated AWS Area.

Create an Amazon Q Industry software

Now you’re waiting to create your Amazon Q Industry software:

  1. At the Amazon Q Industry console, make a choice Create software.
  2. For Utility call, input a reputation (as an example, SupportDocs-Assistant).
  3. For Consumer entry, choose Nameless entry for this software atmosphere.
  4. Make a choice Internet trip to create a controlled cyber web trip to entry the Amazon Q Industry software.

You’re going to see a understand about consumption-based billing for nameless Amazon Q Industry packages. For extra main points on pricing, confer with Amazon Q Business pricing.

  1. Depart the default carrier position possibility until you may have particular necessities.
  2. For Encryption, use the default AWS controlled key until you want customized encryption.
  3. For Internet trip settings, you’ll use an current IAM position out of your account or authorize Amazon Q Industry to generate a brand new position with suitable permissions. For this publish, we choose Use an current carrier position and make a choice the IAM position created previous (QBusinessAnonymousWebRole).
  4. Optionally, customise the cyber web trip identify and welcome message.
  5. Evaluation all of your configuration choices and make a choice Create to create the appliance.

You must see a affirmation that your nameless entry software has been created effectively.

You’re going to to find the vital parameters and main points of your Amazon Q Industry software at the touchdown web page displayed after a success introduction like the next screenshot, which supplies complete details about your newly created Amazon Q Industry software.

Upload knowledge resources

After you create your software, you want so as to add an index and information resources. To be informed extra, confer with Index. You’re going to see a pop-up like the next indicating that nameless entry is enabled.

Whole the next steps:

  1. Out of your software dashboard, make a choice Upload index.
  2. Identify your index (as an example, Supportdocs-Exterior) and stay the default settings.
  3. Make a selection Upload an index.
  4. After you create the index, you’ll upload knowledge resources to it.

For our instance, we use the Amazon Q Industry public documentation as our knowledge supply by way of including the URL https://doctors.aws.amazon.com/amazonq/newest/qbusiness-ug/what-is.html. The Internet Crawler will routinely index the content material from this documentation web page, making it searchable thru your nameless Amazon Q Industry software.

For more info about Web Crawler configuration options and best possible practices, confer with Connecting Web Crawler to Amazon Q Business.

  1. Out of your index dashboard, make a choice Upload knowledge supply.
  2. Input a reputation to your knowledge supply and not obligatory description.
  3. For Supply, choose Supply URLs and input the URLs of the general public web pages you wish to have to index.
  4. For Authentication, choose No authentication.
  5. Configure the sync run agenda and box mappings.
  6. Make a selection Upload knowledge supply.

On the other hand, you’ll add Amazon S3 as the data source:

  1. Out of your index dashboard, make a choice Upload knowledge supply.
  2. Make a choice Amazon S3 because the supply.
  3. Configure your S3 bucket settings (be sure the bucket has public entry).
  4. Whole the knowledge supply introduction procedure.

You should solely ingest publicly to be had knowledge resources with out entry regulate lists (ACLs).

Generate an nameless cyber web trip URL

After your knowledge resources are arrange, whole the next steps:

  1. Out of your software dashboard, make a choice your software.
  2. Within the Internet trip settings phase, make a choice Percentage one-time URL.

The nameless cyber web trip URL will also be shared as a single-use hyperlink that should be redeemed and accessed inside of 5 mins. After it’s activated, the Amazon Q Industry consultation stays lively with a configurable timeout starting from 15–60 mins. This allows you to trip the cyber web interface and check its capability prior to deploying or providing the nameless software to visitor customers.

Take a look at your nameless Amazon Q Industry software

To check the appliance, make a choice Preview cyber web trip.

The next screenshot displays the welcome web page to your nameless Amazon Q Industry software’s cyber web interface. Let’s start asking Amazon Q Industry some questions in regards to the Amazon Q index.

Within the first question, we ask “What’s Q index? How is it helpful for ISV’s?” The next screenshot displays the reaction.

Within the following question, we ask “How can Q index enrich generative AI stories for ISVs?”

In our subsequent question, we ask “How is Q index priced?”

Having effectively examined our nameless Amazon Q Industry software in the course of the console, we will be able to now discover how one can create an identical software the use of the AWS CLI.

Create your nameless software the use of the AWS CLI

Be sure that your AWS CLI is configured with permissions to create Amazon Q Industry sources and IAM roles.

Create an IAM position for Amazon Q Industry

First, create an IAM position that Amazon Q Industry can suppose to entry vital sources:

# Create have confidence coverage doc
cat > trust-policy.json << 'EOF'
{
  "Model": "2012-10-17",
  "Remark": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "qbusiness.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
EOF

# Create IAM position
aws iam create-role 
  --role-name QBusinessAnonymousAppRole 
  --assume-role-policy-document record://trust-policy.json

# Connect vital permissions
aws iam attach-role-policy 
  --role-name QBusinessAnonymousAppRole

Create an nameless Amazon Q Industry software

Use the next code to create your software:

#bash
aws qbusiness create-application 
--display-name "PublicKnowledgeBase" 
--identity-type ANONYMOUS 
--role-arn "arn:aws:iam:: :position/QBusinessAnonymousAppRole" 
--description "That is the QBiz software for nameless use-case"

Save the applicationId from the reaction:

#json

{
  "applicationId": "your-application-id",
  "applicationArn": "arn:aws:qbusiness:area:account-id:software/your-application-id"
}

Create a restrictive coverage for nameless entry

We strongly suggest the use of the next limited coverage for the position that will probably be used to name the chat APIs for nameless entry software environments. This coverage limits movements to just the vital APIs and restricts entry to just your particular software.

Create the IAM position with the next coverage:

# Create restrictive coverage doc
cat > anonymous-access-policy.json << 'EOF'
{
  "Model": "2012-10-17",
  "Remark": [
    {
      "Sid": "QBusinessConversationPermission",
      "Effect": "Allow",
      "Action": [
        "qbusiness:Chat",
        "qbusiness:ChatSync",
        "qbusiness:PutFeedback"
      ],
      "Useful resource": "arn:aws:qbusiness:::software/"
    }
  ]
}
EOF

# Connect the coverage to the position
aws iam put-role-policy 
  --role-name QBusinessAnonymousAppRole 
  --policy-name QBusinessAnonymousAccessPolicy 
  --policy-document record://anonymous-access-policy.json

Create an index

Create an index to your content material, then add paperwork the use of the BatchPutDocument API. For step by step steering, see Select Retriever.

Take a look at your nameless Amazon Q Industry software

To reveal the chat capability the use of the AWS CLI, we uploaded Amazon Q Industry documentation in PDF layout to our index and examined the appliance the use of the next pattern queries.

The next is an instance chat interplay the use of the IAM position credentials. We first ask “What’s Amazon Q index?”

#1)
#bash
aws qbusiness chat-sync 
  --application-id  
  --user-message "What's Amazon Q index?"

The next screenshot displays a part of the output from the chat-sync API when carried out with our nameless Amazon Q Industry software ID, as proven within the earlier command.

Subsequent, we ask “How can Q index enrich generative AI stories for ISV’s?”

2)
#bash
aws qbusiness chat-sync 
  --application-id  
  --user-message "How can Q index enrich generative AI stories for ISV's?"

The next screenshot displays a part of the output from the chat-sync API when carried out with our nameless Amazon Q Industry software ID.

Create a cyber web trip for the nameless cyber web software

Use the next code to create the cyber web trip:

#bash
aws qbusiness create-web-experience 
  --application-id  
  --display-name "PublicKnowledgeBaseExperience" 
  --role-arn "arn:aws:iam:::position/QBusinessAnonymousAppRole" 
  --description "Internet interface for my nameless Q Industry software"

To generate an nameless URL, use the next code:

#bash
aws qbusiness create-anonymous-web-experience-url 
  --application-id  
  --web-experience-id 

You’ll use the cyber web trip URL generated by way of the previous command and embed it into your web applications using an iframe.

Issues

Believe the next when the use of nameless entry in Amazon Q Industry:

  • The next are the one chat APIs that reinforce nameless entry software environments:
    • Chat
    • ChatSync
    • PutFeedback
  • You must solely ingest publicly to be had knowledge resources with out ACLs. Examples of public knowledge resources come with:
    • Information from the Amazon Q Industry Internet Crawler
    • Amazon S3 knowledge with out ACLs
  • Amazon Q Industry packages with nameless entry are billed on a consumption-based pricing style.
  • Chat historical past isn’t to be had for nameless software environments.
  • Nameless customers and authenticated customers don’t seem to be supported at the similar software environments.
  • Plugins don’t seem to be supported for nameless software environments.
  • Amazon QuickSight integration isn’t supported for nameless software

Environments.

  • Amazon Q Apps don’t seem to be supported for nameless software environments.
  • Attachments don’t seem to be supported for nameless software environments.
  • Admin controls and guardrails are read-only for nameless software environments, apart from for blocked words.
  • Matter regulations the use of customers and teams don’t seem to be supported for nameless software

The rest Amazon Q Industry capability and contours stay unchanged.

Blank up

When you’re executed with the answer, blank up the sources you created.

Conclusion

On this publish, we presented Amazon Q Industry nameless consumer entry mode and demonstrated how one can create, configure, and check an nameless Amazon Q Industry software the use of each the console and AWS CLI. This thrilling characteristic extends enterprise-grade Amazon Q Industry generative AI functions for your nameless audiences with out requiring authentication, opening up new chances for reinforcing buyer stories on public web pages, documentation portals, and self-service wisdom bases. This selection is to be had thru a consumption pricing model that fees in response to precise Chat and Chatsync API utilization and index garage prices nonetheless appropriate.

Via following the implementation steps defined on this publish, you’ll briefly arrange an Amazon Q Industry software adapted to your exterior customers, secured with suitable IAM insurance policies, and waiting to embed on your end-user-facing packages.

To be informed extra about this nameless entry characteristic, see the Amazon Q Business User Guide. For detailed steering on embedding Amazon Q Industry on your cyber web packages, see Add a generative AI experience to your website or web application with Amazon Q embedded. In case you’re fascinated by construction utterly customized UI stories with the Amazon Q Industry API, take a look at Customizing an Amazon Q Business web experience.


In regards to the authors

Vishnu Elangovan is a International Generative AI Answer Architect with over seven years of trip in Carried out AI/ML. He holds a grasp’s level in Information Science and focuses on construction scalable synthetic intelligence answers. He loves construction and tinkering with scalable AI/ML answers and considers himself a lifelong learner. Out of doors his skilled interests, he enjoys touring, taking part in sports activities, and exploring new issues to resolve.

jpdJean-Pierre Dodel is a Fundamental Product Supervisor for Amazon Q Industry, accountable for handing over key strategic product functions together with structured knowledge reinforce in Q Industry, RAG. and total product accuracy optimizations. He brings intensive AI/ML and Endeavor seek trip to the workforce with over 7 years of product management at AWS.



Source link

Leave a Comment