category
生成式人工智能正在改变企业在旅游和酒店等行业提供个性化体验的方式。旅行社正在通过提供个性化的度假套餐来加强他们的服务,这些套餐是根据客户的独特偏好精心策划的,包括无障碍需求、饮食限制和活动兴趣。满足这些期望需要一个将全面的旅行知识与实时定价和可用性信息相结合的解决方案。
在这篇文章中,我们将展示如何使用Amazon Bedrock构建一个生成式人工智能解决方案,该解决方案通过将客户资料和偏好与实时定价数据相结合来创建定制的度假套餐。我们演示了如何使用亚马逊基岩知识库获取旅行信息,使用亚马逊基岩代理获取实时航班详细信息,以及使用亚马逊OpenSearch Serverless进行高效的包裹搜索和检索。
解决方案概述
旅行社在实时数据准确性和可扩展性方面面临着日益增长的个性化推荐需求。考虑一家需要提供无障碍度假套餐的旅行社:他们需要将特定的无障碍要求与实时航班和住宿可用性相匹配,但受到传统系统中人工处理时间和过时信息的限制。这种人工智能驱动的解决方案将个性化与实时数据集成相结合,使该机构能够自动将无障碍要求与当前的旅行选择相匹配,在几分钟内而不是几小时内提供准确的建议。该解决方案使用三层架构来帮助旅行社创建个性化的假期推荐:
- 前端层——提供旅行社输入客户要求和偏好的界面
- 编排层——处理请求并用客户数据丰富它们
- 推荐层——结合了两个关键组件:
- 旅行数据存储——维护一个可搜索的旅行套餐存储库
- 实时信息检索–通过API集成获取当前航班详细信息
下图说明了这种架构。
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:
- Amazon API Gateway – Receives requests and routes them to AWS Lambda functions facilitating secure API calls for retrieving recommendations
- AWS Lambda – Processes input data, creates the enriched prompt, and executes the recommendation workflow
- Amazon DynamoDB – Stores customer preferences and travel history
- Amazon Bedrock Knowledge Bases – Helps travel agents build a curated database of destinations, travel packages, and deals, making sure recommendations are based on reliable and up-to-date information
- Amazon OpenSearch Serverless – Enables simple, scalable, and high-performing vector search
- Amazon Simple Storage Service (Amazon S3) – Stores large datasets such as flight schedules and promotional materials
- Amazon Bedrock Agents – Integrates real-time information retrieval, making sure recommended itineraries reflect current availability, pricing, and scheduling through external API integrations
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:
- An AWS account with access to Amazon Bedrock
- Permissions to create and manage the following services:
- Amazon Bedrock
- Amazon OpenSearch Serverless
- Lambda
- DynamoDB
- Amazon S3
- API Gateway
- Access to foundation models in Amazon Bedrock for Amazon Titan Text Embeddings V2 and Anthropic Claude 3 Haiku models
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:
- An S3 bucket and with a sample dataset (
travel_data.json
andpromotions.csv
), prompt template, and the API schema
- DynamoDB tables populated with sample user profiles and travel history
- An OpenSearch Serverless collection with optimized settings for travel package searches
- A vector index with settings compatible with the Amazon Bedrock knowledge base
Amazon Bedrock configuration
For Amazon Bedrock, the CloudFormation template creates the following resources:
- A knowledge base with the travel dataset and data sources ingested from Amazon S3 with automatic synchronization
- An Amazon Bedrock agent, which is automatically prepared
- A new version and alias for the agent
- Agent action groups with mock flight data integration
- An action group invocation, configured with the
FlightPricingLambda
Lambda function and the API schema retrieved from the S3 bucket
API and interface setup
To enable API access and the UI, the template configures the following resources:
- API Gateway endpoints
- Lambda functions with a mock flight API for demonstration purposes
- A web interface for travel agents
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:
- WebsiteURL – Access the travel agent interface
- ApiEndpoint – Use for programmatic access to the recommendation system
Test the endpoints
The web interface provides an intuitive form where travel agents can input customer requirements, including:
- Customer ID (for example,
Joe
orWill
) - Travel budget
- Preferred dates
- Number of travelers
- Travel style
You can call the API directly using the following code:
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:
- Customer ID:
Joe
- Budget: 4,000 GBP
- Duration: 5 days
- Travel dates: July 15, 2025
- Number of travelers: 2
- Travel style: Luxury
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:
The system retrieves Joe’s preferences from the user profile, including:
The system then generates personalized recommendations that consider the following:
- Destinations with proven wheelchair accessibility
- Available luxury accommodations
- Flight details for the recommended destination
Each recommendation includes the following details:
- Detailed accessibility information
- Real-time flight pricing and availability
- Accommodation details with accessibility features
- Available activities and experiences
- Total package cost breakdown
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:
- Explore multi-agent capabilities:
- Create specialized agents for different travel aspects (hotels, activities, local transport)
- Enable agent-to-agent communication for complex itinerary planning
- Implement an orchestrator agent to coordinate responses and resolve conflicts
- Implement multi-language support using multi-language foundation models in Amazon Bedrock
- Integrate with customer relationship management (CRM) systems
结论
在这篇文章中,您学习了如何使用Amazon Bedrock构建一个基于人工智能的假期推荐系统,帮助旅行社提供个性化体验。我们的实施展示了如何将亚马逊基岩知识库与亚马逊基岩代理相结合,有效地将历史旅行信息与实时数据需求联系起来,同时使用无服务器架构和矢量搜索,将客户偏好与旅行套餐有效匹配。该解决方案展示了旅行推荐系统如何平衡全面的旅行知识、实时数据准确性和大规模的个性化。这种方法对于需要集成实时定价数据、处理特定的可访问性要求或扩展其个性化建议的旅行组织来说尤其有价值。该解决方案提供了一个实用的起点,根据特定的业务需求,从现代化旅行计划系统到处理复杂的客户需求,都有明确的增强路径。
Related resources
To learn more, refer to the following resources:
- Documentation:
- Code samples:
- Additional learning:
- 登录 发表评论
- 1次浏览
最新内容
- 2 hours 56 minutes ago
- 3 hours ago
- 3 hours ago
- 3 hours ago
- 3 hours ago
- 3 hours ago
- 3 hours 28 minutes ago
- 4 hours ago
- 4 hours ago
- 4 hours 14 minutes ago