AWS Machine Learning Blog 07月19日 00:20
Build real-time travel recommendations using AI agents on Amazon Bedrock
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文介绍了如何利用Amazon Bedrock构建一个强大的AI驱动的旅游推荐系统。该系统通过整合客户偏好、历史数据以及实时价格和可用性信息,为旅行社提供高度个性化的假期套餐。文章详细阐述了该解决方案的三层架构,包括前端接口、编排层和推荐层,并重点介绍了如何使用Amazon Bedrock Knowledge Bases、Amazon Bedrock Agents以及Amazon OpenSearch Serverless等AWS服务来实现这一目标。通过部署CloudFormation模板,可以自动化配置所有必要的AWS资源,从而帮助旅行社更高效地满足客户的特定需求,如无障碍旅行和饮食限制,并实现规模化的个性化服务。

🌟 **AI驱动的个性化旅游推荐**:该解决方案利用生成式AI技术,使旅行社能够根据客户的独特偏好(包括可访问性需求、饮食限制和活动兴趣)创建定制化的假期套餐。通过整合全面的旅行知识和实时定价信息,系统能满足客户日益增长的个性化需求。

🏗️ **三层架构实现高效运作**:解决方案采用三层架构:前端层用于收集客户需求,编排层处理请求并丰富客户数据,推荐层则包含旅行数据存储和实时信息检索,确保推荐的准确性和时效性。

☁️ **AWS服务赋能**:文章详细说明了如何利用Amazon API Gateway、AWS Lambda、Amazon DynamoDB、Amazon Bedrock Knowledge Bases、Amazon OpenSearch Serverless、Amazon S3以及Amazon Bedrock Agents等AWS服务来构建和部署此系统,提供了一个端到端的解决方案。

💡 **关键技术亮点**:Amazon Bedrock Knowledge Bases用于构建可靠的旅行信息数据库,Amazon Bedrock Agents则通过API集成实现实时航班信息的检索,确保推荐的行程反映当前的可用性、价格和时间表。Amazon OpenSearch Serverless则为高效的套餐搜索和检索提供了支持。

🚀 **实际应用与部署**:文章通过一个用户案例展示了系统如何为需要轮椅便利的客户提供豪华假期推荐,并提供了详细的部署步骤和验证方法,包括使用AWS CloudFormation模板自动化配置资源,以及通过Web界面或API测试推荐系统。

Generative AI is transforming how businesses deliver personalized experiences across industries, including travel and hospitality. Travel agents are enhancing their services by offering personalized holiday packages, carefully curated for customer’s unique preferences, including accessibility needs, dietary restrictions, and activity interests. Meeting these expectations requires a solution that combines comprehensive travel knowledge with real-time pricing and availability information.

In this post, we show how to build a generative AI solution using Amazon Bedrock that creates bespoke holiday packages by combining customer profiles and preferences with real-time pricing data. We demonstrate how to use Amazon Bedrock Knowledge Bases for travel information, Amazon Bedrock Agents for real-time flight details, and Amazon OpenSearch Serverless for efficient package search and retrieval.

Solution overview

Travel agencies face increasing demands for personalized recommendations while struggling with real-time data accuracy and scalability. Consider a travel agency that needs to offer accessible holiday packages: they need to match specific accessibility requirements with real-time flight and accommodation availability but are constrained by manual processing times and outdated information in traditional systems. This AI-powered solution combines personalization with real-time data integration, enabling the agency to automatically match accessibility requirements with current travel options, delivering accurate recommendations in minutes rather than hours.The solution uses a three-layer architecture to help travel agents create personalized holiday recommendations:

The following diagram illustrates this architecture.

With this layered approach, travel agents can capture customer requirements, enrich them with stored preferences, integrate real-time data, and deliver personalized recommendations that match customer needs. The following diagram illustrates how these components are implemented using AWS services.

The AWS implementation includes:

This solution uses a AWS CloudFormation template that automatically provisions and configures the required resources. The template handles the complete setup process, including service configurations and necessary permissions.

For the latest information about service quotas that might affect your deployment, refer to AWS service quotas.

Prerequisites

To deploy and use this solution, you must have the following:

Deploy the CloudFormation stack

You can deploy this solution in your AWS account using AWS CloudFormation. Complete the following steps:

    Choose Launch Stack:

You will be redirected to the Create stack wizard on the AWS CloudFormation console with the stack name and the template URL already filled in.

    Leave the default settings and complete the stack creation. Choose View stack events to go to the AWS CloudFormation console to see the deployment details.

The stack takes around 10 minutes to create the resources. Wait until the stack status is CREATE_COMPLETE before continuing to the next steps.

The CloudFormation template automatically creates and configures components for data storage and management, Amazon Bedrock, and the API and interface.

Data storage and management

The template sets up the following data storage and management resources:

Amazon Bedrock configuration

For Amazon Bedrock, the CloudFormation template creates the following resources:

API and interface setup

To enable API access and the UI, the template configures the following resources:

Verify the setup

After stack creation is complete, you can verify the setup on the Outputs tab of the AWS CloudFormation console, which provides the following information:

Test the endpoints

The web interface provides an intuitive form where travel agents can input customer requirements, including:

You can call the API directly using the following code:

curl -X POST \  <ApiEndpoint> \  -H 'Content-Type: application/json' \  -d '{    "userId": "Joe",    "budget": "3000 GBP",    "duration": "7 days",    "travelDate": "2025-07-15",    "numberOfTravelers": 2  }'

Test the solution

For demonstration purposes, we create sample user profiles in the UserPreferences and TravelHistory tables in DynamoDB.

The UserPreferences table stores user-specific travel preferences. For instance, Joe represents a luxury traveler with wheelchair accessibility requirements.

Will represents a budget traveler with elderly-friendly needs. These profiles help showcase how the system handles different customer requirements and preferences.

The TravelHistory table stores past trips taken by users. The following tables show the past trips taken by the user Joe, showing destinations, trip durations, ratings, and travel dates.

Let’s walk through a typical use case to demonstrate how a travel agent can use this solution to create personalized holiday recommendations.Consider a scenario where a travel agent is helping Joe, a customer who requires wheelchair accessibility, plan a luxury vacation. The travel agent enters the following information:

When a travel agent submits a request, the system orchestrates a series of actions through the PersonalisedHolidayFunction Lambda function, which will query the knowledge base, check real-time flight information using the mock API, and return personalized recommendations that match the customer’s specific needs and preferences. The recommendation layer uses the following prompt template:

Based on the profile and requirements:User Preferences:- Travel Preferences: {travelStyle}- Interests: {interests}- Dietary Restrictions: {dietaryRestrictions}- Accessibility Needs: {accessibility}Current Request:- Budget: {budget}- Duration: {duration}- Travel Date: {travelDate}- Number of Travelers: {numberOfTravelers}Previous Destinations: {previousDestinations}Instructions:1. Match the user's budget, travel style and interests2. Consider dietary restrictions and accessibility needs3. Avoid previously visited destinations4. Include:   - Recommended destinations   - Suitable accommodations   - Relevant activities and experiences   - Transportation options   - Estimated cost breakdown   - Travel tipsPlease follow the <Instructions> and provide a personalized holiday recommendation in the below format:Destination: [Primary recommended destination][Detailed recommendation]

The system retrieves Joe’s preferences from the user profile, including:

{    "userPreferences": {        "preferences": "Prefer warm climate and cultural experiences",        "budget": 3000,        "duration": "5 days",        "travelDate": "2025-03-04",        "interests": [            "photography",            "food",            "beach"        ],        "travelStyle": "Luxury",        "numberOfTravelers": 2,        "dietaryRestrictions": [            "plant based",            "vegetarian"        ],        "accessibility": [            "wheelchair-accessible"        ],        "previousDestinations": [            "Maldives",            "Bali"        ]    }}

The system then generates personalized recommendations that consider the following:

Each recommendation includes the following details:

Clean up

To avoid incurring future charges, delete the CloudFormation stack. For more information, see Delete a stack from the CloudFormation console.

The template includes proper deletion policies, making sure the resources you created, including S3 buckets, DynamoDB tables, and OpenSearch collections, are properly removed.

Next steps

To further enhance this solution, consider the following:

Conclusion

In this post, you learned how to build an AI-powered holiday recommendation system using Amazon Bedrock that helps travel agents deliver personalized experiences. Our implementation demonstrated how combining Amazon Bedrock Knowledge Bases with Amazon Bedrock Agents effectively bridges historical travel information with real-time data needs, while using serverless architecture and vector search for efficient matching of customer preferences with travel packages.The solution shows how travel recommendation systems can balance comprehensive travel knowledge, real-time data accuracy, and personalization at scale. This approach is particularly valuable for travel organizations needing to integrate real-time pricing data, handle specific accessibility requirements, or scale their personalized recommendations. This solution provides a practical starting point with clear paths for enhancement based on specific business needs, from modernizing your travel planning systems or handling complex customer requirements.

Related resources

To learn more, refer to the following resources:


About the Author

Vishnu Vardhini

Vishnu Vardhini is a Solutions Architect at AWS based in Scotland, focusing on SMB customers across industries. With expertise in Security, Cloud Engineering and DevOps, she architects scalable and secure AWS solutions. She is passionate about helping customers leverage Machine Learning and Generative AI to drive business value.

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

Amazon Bedrock 生成式AI 旅游推荐 个性化体验 AWS
相关文章