[Amazon Cloud Technology] Own AI Assistant-Amazon Q

Written in front: The blogger is a "little mountain pig" who has devoted himself to training after practical development experience. His nickname is taken from "Peng Peng" in the cartoon "The Lion King". He always treats the surrounding people with an optimistic and positive attitude. thing. My technical route has been from Java full-stack engineer to the field of big data development and data mining. Now I have finally achieved some success. I would like to share with you what I have learned in the past, hoping to be helpful to you on your learning journey. At the same time, the blogger also wants to create a complete technical library through this attempt. Any exceptions, errors, and precautions related to the technical points of the article will be listed at the end. Everyone is welcome to provide materials through various methods.

  • Please criticize and point out any errors in the article and make sure to correct them in time.
  • If you have any questions you want to discuss and learn from, please contact me: [email protected].
  • The style of published articles varies from column to column, and they are all self-contained. Please correct me for any shortcomings.

[Amazon Cloud Technology] Own AI Assistant-Amazon Q

Keywords in this article: Amazon, Amazon, AI, Amazon Q, artificial intelligence

1. Product Overview

1. Amazon Q

image-20231226013639288

Amazon Q is a new generative AI-powered assistant designed to get work done and tailored for your business.

The above is the official description of the product. Speaking of AI assistants, everyone should be familiar with it. So what makes Amazon Q unique? The editor believes that the most important feature is that it can be integrated with the use of various cloud services . The other is that it can build its own knowledge base and directly learn various document resources. The effect is really outstanding!

In addition, other AI Chat products have the same features, such as interactive question and answer, continuous dialogue, professional question answering, etc. The only shortcoming is that it does not support Chinese , and it cannot answer some questions that cannot be answered. Very good to deal with. Of course, after actual experience, the editor feels that the positioning of each product is different. If Amazon Q is used as a daily AI assistant, it is obviously not so appropriate. It can be said that its own advantages have not been fully utilized. In enterprise scenarios, Amazon Q is the first cloud asset- based AI assistant that can help manage cloud services, troubleshoot errors, assist development, and more in a secure environment. In addition, Amazon Q can be independently released and deployed in the form of an application for internal use within the company, integrating internal data repositories, not only enabling independent learning but also helping company personnel quickly understand the business and assist decision-making.

From all aspects, this is an enterprise-level solution. Although it is currently only a preview version, the design of many functions can be said to be very exciting.

2. Introduction to preview version

The current preview version is completely free. If you need it to have richer knowledge, you can create an application yourself, and then synchronize the data for learning. Only at this time do you need to consider the storage unit. You can use one for testing first.

image-20231227022646838
In addition, there are many free products that can be tested together with Amazon Q, such as Amazon EC2, Amazon ElastiCache, etc. mentioned below. As long as you create an account, you can use it for free for one year: https://aws.amazon. com/cn/free/?sc_channel=seo&sc_campaign=blog1227

2. Usage practice

We will not test some simple questions here, but mainly highlight the unique functions of Amazon Q itself.

1. Web version entrance

First of all, if you want to use Amazon Q , you only need to pay attention to the sidebar on the right side of the web page after logging in, and call out with one click. [If you don’t have an Amazon account, you can click Amazon Cloud Technology to register ] For example, you can see on the console homepage:

image-20231227023527518

At this time we can start the conversation, and the assistant can now read various cloud assets under this account, which can help troubleshoot various problems.

2. Service troubleshooting

The editor has previously created an ElasticCache product and wanted to see if it can be connected successfully on EC2 , so I only need to say this:

  • Pls test the connection between Redis Cache and EC2

image-20231227023908059

  • At this point continue to click on the link: preview experience here

In the new pop-up window, the test will automatically start, read the relevant instances under the account, and then perform the connection test:

image-20231227024215039

As you can see, the relevant cloud assets under the account will be read at this time, and the connectivity test will be performed based on the current network settings, so that we can directly know whether the current network can be connected. Because more and more services are not open to public network access, VPC management is very important, and Amazon Q is a good testing tool, and you can quickly jump to related instances or instances in the results page. Configuration, if there is a problem, it will be pointed out directly in red.

3. Product selection suggestions

When creating some products, Amazon Q can also directly give selection suggestions to help us make appropriate choices. For example, when creating a new EC2 , there are various models in it. It is difficult for novices to know the differences and don't know how to choose. They usually depend on the hardware configuration. Now you will find an additional Get advice option:

image-20231227024917290

Then we can get corresponding suggestions based on application scenarios, users, price priorities, and CPU models . After all, under the same hardware configuration, the performance in different uses is different. This can help us quickly understand the relevant models, and finally make a choice based on price and configuration.

image-20231227025024670

3. Customized learning

If the enterprise has its own knowledge base, which contains business-related codes, documents and other materials, including data stored in the database, it can be uniformly imported and synchronized to Amazon Q and extracted in the form of interactive dialogue.

1. Application creation

After entering the Amazon Q product, you can see a process for creating an application:

image-20231227025614041

Add the required data sources and set the synchronization frequency, then you can use it in the preview, and finally deploy it independently for internal use. This article will demonstrate the first three steps.

  • Click the Create application button

Fill in the application name and create a new service rule :

image-20231227025900711

  • Create a retriever

Create a new retriever so that the data source can be configured independently , and the storage unit is temporarily set to 1 .

image-20231227030319123

2. Data source configuration

In the last step, we can add data sources independently, with a limit of 5 per application. It can be Amazon S3, various database storages, existing files, network resources , etc.

image-20231227030521013

  • Create web crawler

Click the plus sign next to Web crawler. We use the official Python documentation as an example: https://docs.python.org/3.12/contents.html . Since only English is currently supported, we also choose the English version of the document. Next, fill in the relevant information into the configuration:

image-20231227031047707

Each Web crawler can add up to 10 links. Next, set the authentication or proxy-related configurations. Since they are public resources on the Internet, there is no need to set them up:

image-20231227031204086

Create a new IAM role :

image-20231227031338073

Next, set up the configuration related to synchronization. You can narrow the scope as much as possible. Since the editor chose a stable version, the document will basically not change. In the synchronization mode, Full sync is selected , and the synchronization cycle is Run on demand [Manual]. .

image-20231227031618721

If necessary, you can configure other parts additionally. Click the Add datasource button to exit. You can see that a data source has been successfully added:

image-20231227032004776

Finally, click Finish in the lower right corner to complete the creation of the application.

3. Use testing

  • data synchronization

The first time you use it, you need to complete data synchronization. You can find the just created application in the application list:

image-20231227032203272

After clicking to enter, view the Data Sources section, select Python , then click Sync now and wait for completion.

image-20231227032232429

Depending on the amount of content and crawling settings, the waiting time will vary. After completion, it will be displayed as follows:

image-20231227032414128

  • Application entrance

After the data synchronization is completed, it can be used normally. You can see the Preview web experience button in the application .

image-20231227032612769

Click to open the interactive interface and complete the initialization settings, which are some display information and can be saved directly:

image-20231227032749367

  • Questions based on data sources

Next, let's ask a question and see how it differs from the normal answer: How to use list in Python :

image-20231227032927620

Although we are using a more general question, the difference is that in the sources section you can see references from the data sources . This is a very scalable function. We can import a lot of data within the company and use it under safe conditions, which will greatly improve efficiency.

4. Plug-in integration

Amazon Q can also be used as a code assistant, taking VS Code as an example:

image-20231227033310215

Search Amazon Q directly in the plug-in , which actually means installing AWS Toolkit and click the install button:

image-20231227033522146

Select Amazon Q + CodeWhispere and follow the prompts to complete the account login and configuration.

image-20231227033852109

In general, Amazon Q itself is still a very unique product that is more suitable for enterprise scenarios. It has really brought some surprises to the editor. You can try it out now!

Guess you like

Origin blog.csdn.net/u012039040/article/details/135376444