Esta publicación es una continuación de Creación de conversaciones naturales con Amazon Lex QnAIntent y la base de conocimientos de Amazon Bedrock. En resumen, exploramos nuevas capacidades disponibles a través de Amazon Lex QnAIntent, desarrollado por Roca Amazónicaque le permiten aprovechar la comprensión del lenguaje natural y sus propios depósitos de conocimientos para brindar experiencias conversacionales en tiempo real.
En muchos casos, Amazon Bedrock puede generar respuestas precisas que satisfacen las necesidades de una amplia variedad de preguntas y escenarios, utilizando su contenido de conocimientos. Sin embargo, algunos clientes empresariales tienen requisitos reglamentarios o pautas de marca más rígidas, que exigen que ciertas preguntas se respondan palabra por palabra con respuestas aprobadas previamente. Para estos casos de uso, Amazon Lex QnAIntent proporciona capacidades de coincidencia exacta con ambos amazona kendra y Servicio de búsqueda abierta de Amazon bases de conocimiento.
En esta publicación, explicamos cómo instalar y configurar un clúster de OpenSearch Service como base de conocimientos para su Amazon Lex QnAIntent. Además, la coincidencia exacta funciona con Amazon Kendra y usted puede crear un índice y agregue preguntas frecuentes a su índice. Como se detalla en la Parte 1 de esta serie, luego puede seleccionar Amazon Kendra como su base de conocimientos en Configuraciones de QnA de Amazon Lexproporcione su ID de índice de Amazon Kendra y seleccione la coincidencia exacta para permitir que su bot devuelva la respuesta exacta devuelta por Amazon Kendra.
Descripción general de la solución
En las siguientes secciones, explicamos los pasos para crear un dominio de OpenSearch Service, crear un índice de OpenSearch y completarlo con documentos, y probar el bot de Amazon Lex con QnAIntent.
Requisitos previos
Antes de crear un clúster de OpenSearch Service, debe crear un bot de Amazon Lex V2. Si no tiene un bot Amazon Lex V2 disponible, complete los siguientes pasos:
- En la consola de Amazon Lex, elija robots en el panel de navegación.
- Elegir crear robot.
- Seleccionar Comience con un ejemplo.
- Para Ejemplo robot, elige ReservarViaje.
- Ingrese un nombre y una descripción para su bot.
- Seleccione Crear un rol con permisos básicos de Amazon Lex para su rol de tiempo de ejecución de permisos de AWS Identity and Access Management (IAM).
- Seleccione No para saber si el uso de su bot está sujeto a la Ley de protección de la privacidad infantil en línea (COPPA).
- Elija Siguiente.
- Mantenga todos los valores predeterminados en la sección Agregar idiomas al bot.
- Elija Listo para crear su bot.
Crear un dominio del servicio OpenSearch
Complete los siguientes pasos para crear su dominio del servicio OpenSearch:
- En la consola del servicio OpenSearch, elija Panel bajo Clústeres gestionados en el panel de navegación.
- Elegir Crear dominio.
- Para Nombre de dominioingresa un nombre para tu dominio (para esta publicación, usamos
my-domain). - Para Método de creación de dominioseleccionar fácil crear.
- Bajo Opciones de motorpara Versión, elija la última versión del motor. Al momento de escribir este artículo, el último motor es OpenSearch_2.11.
- Bajo Redpara esta publicación, seleccione Acceso público.
- En un entorno empresarial, normalmente Inicie su clúster de servicio OpenSearch en una VPC.
- Bajo Redseleccionar Modo de doble pila.
- La pila dual le permite compartir recursos de dominio entre tipos de direcciones IPv4 e IPv6 y es la opción recomendada.
- Bajo Control de acceso detalladoseleccionar Crear usuario maestro.
- Ingrese el nombre de usuario y contraseña de su elección.
- Deje todas las demás configuraciones en sus valores predeterminados.
- Elegir Crear.
El inicio del clúster demorará varios minutos. Cuando esté listo, verá un icono verde Activo estado bajo Estado de procesamiento del dominio.
Crear un índice del servicio OpenSearch
Complete los siguientes pasos para crear un índice:
- En la página de detalles del dominio, copie el punto final del dominio en Punto final del dominio (IPv4) para usar más tarde.
- Elegir el URL IPv4 enlace.
El enlace IPv4 abrirá la página de inicio de sesión de OpenSearch Dashboards.
- Ingrese el nombre de usuario y la contraseña que creó anteriormente.
- En la página de bienvenida de OpenSearch Dashboards, elija explorar por mi cuenta.
- Puede descartar o cancelar cualquier modal o ventana emergente adicional.
- Elija el menú de opciones, luego elija Herramientas de desarrollo en el panel de navegación.
- Sobre el Herramientas de desarrollo página, ingrese el siguiente código para crear un índice, luego elija el ícono de ejecución para enviar la solicitud:
PUT my-domain-index
{
"mappings": {
"properties": {
"question": {
"type": "text"
},
"answer": {
"type": "text"
}
}
}
}
Si tiene éxito, verá el siguiente mensaje:
{
"acknowledged": true,
"shards_acknowledged": true,
"index": "my-domain-index"
}
- Ingrese el siguiente código para indexar de forma masiva varios documentos que podrá usar más adelante para realizar pruebas:
POST _bulk
{ "index": { "_index": "my-domain-index", "_id" : "mdi00001" } }
{ "question" : "What are the check-in and check-out times?", "answer": "Check-in time is 3pm and check-out time is 11am at all FictitiousHotels locations. Early check-in and late check-out may be available upon request and availability. Please inquire at the front desk upon arrival." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00002" } }
{ "question" : "Do you offer airport shuttles?", "answer": "Airport shuttles are available at the following FictitiousHotels locations: - FictitiousHotels Dallas: Complimentary airport shuttle available to and from Dallas/Fort Worth International Airport. Shuttle runs every 30 minutes from 5am-11pm. - FictitiousHotels Chicago: Complimentary airport shuttle available to and from O'Hare International Airport and Chicago Midway Airport. Shuttle runs every hour from 5am-11pm. - FictitiousHotels San Francisco: Complimentary airport shuttle available to and from San Francisco International Airport. Shuttle runs every 30 minutes from 5am11pm. - FictitiousHotels New York: Complimentary shuttle available to and from LaGuardia Airport and JFK Airport. Shuttle runs every hour from 5am-11pm. Please contact the front desk at your FictitiousHotels location to schedule airport shuttle service at least 24 hours in advance. Shuttle services and hours may vary by location." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00003" } }
{ "question" : "Is parking available? What is the daily parking fee?", "answer": "Self-parking and valet parking are available at most FictitiousHotels locations. Daily self-parking rates range from $15-$30 per day based on location. Valet parking rates range from $25-$40 per day. Please contact your FictitiousHotels location directly for specific parking information and rates." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00004" } }
{ "question" : "4. What amenities are available at FictitiousHotels?", "answer": "Amenities available at most FictitiousHotels locations include: - Free wireless high-speed internet access - 24-hour fitness center - Outdoor pool and hot tub - 24-hour business center - On-site restaurant and bar - Room service - Laundry facilities - Concierge services - Meeting rooms and event space Specific amenities may vary by location. Contact your FictitiousHotels for details onamenities available during your stay." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00005" } }
{ "question" : "Is there an extra charge for children staying at FictitiousHotels?", "answer": "There is no extra charge for children 18 years and younger staying in the same room as their parents or guardians at FictitiousHotels locations in the United States and Canada. Rollaway beds are available for an additional $15 fee per night, subject to availability. Cribs are available free of charge on request. Please contact the front desk to request cribs or rollaway beds. Additional charges for extra occupants may apply at international FictitiousHotels locations." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00006" } }
{ "question" : "Does FictitiousHotels have a pool? What are the pool hours?", "answer": "Most FictitiousHotels locations have an outdoor pool and hot tub available for guest use. Pool hours vary by location but are generally open from 6am-10pm daily. Specific FictitiousHotels pool hours: - FictitiousHotels Miami: Pool open 24 hours - FictitiousHotels Las Vegas: Pool open 8am-8pm - FictitiousHotels Chicago: Indoor and outdoor pools, open 6am-10pm - FictitiousHotels New York: Rooftop pool, open 9am-7pm Please contact your FictitiousHotels front desk for specific pool hours during your stay. Hours may be subject to change due to weather conditions or seasonal schedules. Proper swimwear is required and no lifeguard is on duty at any time." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00007" } }
{ "question" : "Is the fitness center free for guests? What are the hours?", "answer": "Yes, access to the 24-hour fitness center is included for all FictitiousHotels guests at no extra charge. The fitness center offers a range of cardio and strength training equipment. Some locations also offer fitness classes, saunas, steam rooms, and other amenities for a fee. Please contact your FictitiousHotels for specific fitness center details. Access may be restricted to guests 18 years and older. Proper athletic attire and footwear is required." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00008" } }
{ "question" : "Does FictitiousHotels offer room service? What are the hours?", "answer": "24-hour room service is available at most FictitiousHotels locations. In-room dining menus offer a variety of breakfast, lunch, and dinner options. Hours may vary by on-site restaurants. A $5 delivery fee and 18% service charge applies to all room service orders. For quick service, please dial extension 707 from your guest room phone. Room service hours: - FictitiousHotels San Francisco: 24-hour room service - FictitiousHotels Chicago: Room service 7am-10pm - FictitiousHotels New Orleans: Room service 7am-11pm Please contact the front desk at your FictitiousHotels location for specific room service hours and menu options. Room service availability may be limited based on on-site restaurants." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00009" } }
{ "question" : "Does FictitiousHotels provide toiletries like shampoo, soap, etc?", "answer": "Yes, each FictitiousHotels room is stocked with complimentary toiletries and bath amenities including shampoo, conditioner, soap, lotion, and bath gel. Additional amenities like toothbrushes, razors, and shaving cream are available upon request at the front desk. If any items are missing from your room, please contact housekeeping." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00010" } }
{ "question" : "How can I get extra towels or have my room cleaned?", "answer": "Fresh towels and daily housekeeping service are provided free of charge. To request extra towels or pillows, additional amenities, or to schedule midstay service, please contact the front desk by dialing 0 on your in-room phone. Daily housekeeping includes trash removal, changing sheets and towels, vacuuming, dusting, and bathroom cleaning. Just let us know your preferred service times. A Do Not Disturb sign can be placed on your door to opt out for the day." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00011" } }
{ "question" : "Does FictitiousHotels provide hair dryers in the room?", "answer": "Yes, each guest room at FictitiousHotels locations includes a hair dryer. Hair dryers are typically located in the bathroom drawer or mounted to the bathroom wall. Please contact the front desk immediately if the hair dryer is missing or malfunctioning so we can replace it." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00012" } }
{ "question" : "What type of WiFi or internet access is available at FictitiousHotels?", "answer": "Free high-speed wireless internet access is available throughout all FictitiousHotels locations. To connect, simply choose the FictitiousHotels WiFi network on your device and open a web browser. For questions or issues with connectivity, please contact the front desk for assistance. Wired internet access is also available in FictitiousHotels business centers and meeting rooms. Printers, computers, and IT support may be available for business services and events. Please inquire with your FictitiousHotels for details on business services." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00013" } }
{ "question" : "Does FictitiousHotels have electric car charging stations?", "answer": "Select FictitiousHotels locations offer electric vehicle charging stations on-site, typically located in self-parking areas. Availability varies by location. Please contact your FictitiousHotels to check availability and charging rates. Most stations offer Level 2 charging. Charging station locations include: - FictitiousHotels Portland: 2 stations - FictitiousHotels Los Angeles: 4 stations - FictitiousHotels San Francisco: 6 stations Guests can request an on-site parking spot nearest the charging stations when booking parking accommodations. Charging rates may apply." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00014" } }
{ "question" : "What is the pet policy at FictitiousHotels? Are dogs allowed?", "answer": "Pets are welcome at participating FictitiousHotels locations for an additional fee of $50 per stay. Restrictions may apply based on size, breed, or other factors. Please contact your FictitiousHotels in advance to confirm pet policies. FictitiousHotels locations in Atlanta, Austin, Chicago, Denver, Las Vegas and Seattle allow dogs under 50 lbs. Certain dog breeds may be restricted. Cats may also be permitted. Non-refundable pet fees apply. Pet owners are responsible for cleaning up after pets on hotel grounds. Pets must be attended at all times and may not be a disturbance to other guests. Pets are restricted from restaurants, lounges, fitness areas, and pool decks at all FictitiousHotels locations." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00015" } }
{ "question" : "Does FictitiousHotels have laundry facilities for guest use?", "answer": "Yes, self-service laundry facilities with washers and dryers are available for guests to use at all FictitiousHotels locations. Laundry facilities are typically located on the 2nd floor adjacent to vending machines and ice machines. Detergent is available for purchase via vending machines. The cost is $2.50 to wash and $2.50 to dry per load. Quarters can be obtained at the front desk. For any assistance with laundry services, please dial 0 and speak with the front desk. Valet laundry and dry-cleaning services may be offered for an additional fee." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00016" } }
{ "question" : "Can I request extra pillows or blankets for my FictitiousHotels room?", "answer": "Absolutely. Our housekeeping team is happy to bring additional pillows, blankets, towels and other necessities to make your stay more comfortable. We offer hypoallergenic pillows and have extra blankets available upon request. Please contact the FictitiousHotels front desk to make a special request. Dial 0 on your in-room phone. Extra amenities are subject to availability. Extra bedding must be left in the guest room at checkout to avoid additional fees." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00017" } }
{ "question" : "Does FictitiousHotels provide cribs or rollaway beds?", "answer": "Yes, cribs and rollaway beds are available upon request at all FictitiousHotels locations. Please contact the front desk as far in advance as possible to make arrangements, as these are limited in quantity. Cribs are provided complimentary as a courtesy. Rollaway beds are subject to an additional fee of $15 per night." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00018" } }
{ "question" : "What type of accessible rooms or ADA rooms does FictitiousHotels offer?", "answer": "FictitiousHotels provides accessible guest rooms tailored for those with disabilities and mobility needs. Accessible rooms feature widened doorways, lowered beds and sinks, accessible showers or tubs with grab bars, and other ADA compliant features. Please request an accessible room at the time of booking to ensure availability." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00019" } }
{ "question" : "Does FictitiousHotels provide microwaves and mini-fridges?", "answer": "Microwave and mini-refrigerator combos are available in select room types upon request and subject to availability. When booking your reservation, please inquire about availability of fridges and microwaves at your preferred FictitiousHotels location. A limited number are available. An additional $15 daily fee applies for use." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00020" } }
{ "question" : "Can I rent a conference or meeting room at FictitiousHotels?", "answer": "Yes, FictitiousHotels offers conference and meeting rooms available for rent at competitive rates. Options range from board rooms seating 8 to ballrooms accommodating up to 300 guests. State-of-the-art AV equipment is available for rent. Contact the Events Department to check availability and request a quote." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00021" } }
{ "question" : "Is there an ATM or cash machine at FictitiousHotels?", "answer": "For your convenience, ATMs are located near the front desk and lobby at all FictitiousHotels locations. The ATMs provide 24/7 access to cash in amounts up to $500 per transaction and accept all major credit and debit cards. Foreign transaction fees may apply. Please see the front desk if you need any assistance locating or using the ATM during your stay." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00022" } }
{ "question" : "Does FictitiousHotels have a spa or offer spa services?", "answer": "Select FictitiousHotels locations offer luxurious on-site spas providing massages, facials, body treatments, manicures and pedicures. For availability and booking at your FictitiousHotels, please ask the front desk for details or visit the spa directly. Day passes may be available for non-hotel guests. Additional spa access fees apply." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00023" } }
{ "question" : "Can I get a late checkout from FictitiousHotels?", "answer": "Late checkout may be available at participating FictitiousHotels locations based on availability. The standard checkout time is by 11am. Please inquire about late checkout options at check-in or contact the front desk at least 24 hours prior to your departure date to make arrangements. Late checkouts are subject to a half-day room rate charge." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00024" } }
{ "question" : "Does FictitiousHotels offer room upgrades?", "answer": "Room upgrades may be purchased upon check-in based on availability. Upgrades to suites, executive floors, or rooms with preferred views are subject to additional charges. Rates vary by date, room type, and location. Please inquire about upgrade options and pricing at the front desk during check-in. Advance reservations are recommended to guarantee upgrades." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00025" } }
{ "question" : "Do the FictitiousHotels rooms have air conditioning and heating?", "answer": "Yes, every guest room at all FictitiousHotels locations is equipped with individual climate controls allowing air conditioning or heating as desired. To operate, simply adjust the thermostat in your room. If you have any issues regulating the temperature, please contact the front desk immediately and we will send an engineer." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00026" } }
{ "question" : "Does FictitiousHotels provide wake-up call service?", "answer": "Complimentary wake-up calls are available upon request. Please contact the front desk to schedule a customized wake-up call during your stay. In-room alarm clocks are also provided for your convenience. For international locations, please specify if you need a domestic or international phone call." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00027" } }
{ "question" : "Can I smoke at FictitiousHotels? What is the smoking policy?", "answer": "For the comfort of all guests, FictitiousHotels enforces a non-smoking policy in all guest rooms and indoor public spaces. Designated outdoor smoking areas are available on-site. A minimum $200 cleaning fee will be charged for smoking detected in rooms. Smoking is prohibited by law on all hotel shuttle buses. Thank you for not smoking inside FictitiousHotels." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00028" } }
{ "question" : "Does FictitiousHotels offer child care services?", "answer": "No, we apologize that child care services are not available at FictitiousHotels locations. As an alternative, our front desk can provide recommendations for qualified local babysitting agencies and nanny services to assist families during their stay. Please let us know if you need any recommendations. Additional fees will apply." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00029" } }
{ "question" : "What restaurants are located in FictitiousHotels?", "answer": "Onsite dining options vary by location. Many FictitiousHotelss feature 24-hour cafes, coffee shops, trendy bars, steakhouses, and international cuisine. Please check with your FictitiousHotels front desk for all restaurants available on-site during your stay and operating hours. Room service is also available." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00030" } }
{ "question" : "Does FictitiousHotels provide transportation or town car service?", "answer": "FictitiousHotels can arrange transportation, car service, and limousine transfers for an additional fee. Please contact the concierge desk at least 24 hours in advance to make arrangements. We have relationships with reputable local car services and drivers. Airport shuttles, taxis, and other transportation can also be requested through your FictitiousHotels front desk." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00031" } }
{ "question" : "FictitiousHotels New York City", "answer" : "Ideally situated in Midtown Manhattan on 52nd Street, FictitiousHotels New York City positions you in the heart of the city's top attractions. This modern 25- story glass tower overlooks the bright lights of Broadway and Times Square, just minutes from your guestroom door. Inside, enjoy contemporary styling melded with classic New York flair. 345 well-appointed rooms feature plush bedding, marble bathrooms, room service, and scenic city views. On-site amenities include a state-of-the-art fitness center, business center, cocktail lounge with nightly live music, and farm-to-table restaurant serving sustainably sourced American fare. Venture outside to nearby Rockefeller Center, Radio City Music Hall, Central Park, the Museum of Modern Art and Fifth Avenue’s world-renowned shopping. Catch a Broadway show on the same block or take a short stroll to Restaurant Row’s vast culinary offerings. Grand Central Station sits under 10 minutes away." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00032" } }
{ "question" : "FictitiousHotels Chicago", "answer" : "Conveniently situated just steps from North Michigan Avenue in downtown Chicago, FictitiousHotels Chicago envelopes you in Midwestern hospitality and luxury. This sleek 50-story high rise showcases gorgeous city vistas in each of the 453 elegantly appointed guest rooms and suites. Wake up refreshed in pillowtop beds, slip into plush robes and enjoy gourmet in-room coffee service. The heated indoor pool and expansive fitness center help you stay active and refreshed, while the lobby cocktail lounge serves up local craft beers and signature cocktails. Start your day with breakfast at the Café before venturing out to the city’s top cultural attractions like the Art Institute, Millennium Park, Navy Pier and Museum Campus. Shoppers can walk just next door to Chicago’s best retail at high-end department stores and independent boutiques. Business travelers appreciate our central location and 40,000 square feet of modern event space. Enjoy easy access to Chicago’s finest dining, entertainment and more." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00033" } }
{ "question" : "FictitiousHotels Orlando", "answer" : "FictitiousHotels Orlando welcomes you with sunshine and hospitality just 3 miles from The theme parks. The resort hotel’s sprawling campus features 3 outdoor pools, 6 restaurants and lounges, full-service spa, waterpark and 27-hole championship golf course. 1,500 guestrooms cater to families and couples alike with amenities like mini-fridges, marble bathrooms, themed kids’ suites with bunk beds and separate family suites. Onsite activities range from Camp FictitiousHotels kids’ programs to poolside movies under the stars. Complimentary theme park shuttles take you directly to the theme parks and more. Area attractions like theme parks and water parks are just a short drive away. Golf fans are minutes from various golf courses. With endless recreation under the warm Florida sun, FictitiousHotels Orlando keeps the entire family entertained and happy." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00034" } }
{ "question" : "FictitiousHotels San Francisco", "answer" : "Rising over the San Francisco Bay, FictitiousHotels San Francisco treats you to panoramic waterfront views. Perched on the Embarcadero in the lively Financial District, this sleek downtown hotel blends innovative technology with California charm across 32 floors. Contemporary rooms feature voice activated controls, intuitive lighting, rainfall showers with built-in Bluetooth speakers and floor-to-ceiling windows perfect for gazing at the Bay Bridge. Sample bites from top NorCal chefs at our signature farm- to-table restaurant or sip craft cocktails beside the outdoor heated pool. Stay connected at the lobby work bar or get moving in the 24/7 fitness center. Union Square shopping sits just up the street, while iconic landmarks like the Golden Gate Bridge, Alcatraz and Fisherman's Wharf are only minutes away. Venture to Chinatown and North Beach's Italian flavors or catch a cable car straight up to Ghirardelli Square. Immerse yourself in the best of the City by the Bay." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00035" } }
{ "question" : "FictitiousHotels Honolulu", "answer" : "A true island escape awaits at FictitiousHotels Honolulu, nestled on the pristine shores of Waikiki Beach. Swaying palms frame our family-friendly resort featuring three outdoor pools, cultural activities like lei making and ukulele lessons and the island's largest lagoon waterpark. You’ll feel the spirit of ‘ohana – family – in our welcoming staff and signature Hawaiian hospitality. 1,200 newly renovated rooms open to lanais overlooking swaying palms and the sparkling blue Pacific. Five dining options include Polynesian cuisine, island-inspired plates and indulgent character breakfasts. Complimentary beach chairs and towels invite you to sunbathe on soft white sand just steps out the lobby. Take our shuttle to Pearl Harbor, historic ‘Iolani Palace or the famous North Shore. From snorkeling at Hanauma Bay to whale watching in winter, FictitiousHotels Honolulu lets you experience O’ahu's gorgeous island paradise." }
{ "index": { "_index": "my-domain-index", "_id" : "mdi00036" } }
{ "question" : "FictitiousHotels London", "answer" : "Situated in fashionable South Kensington overlooking Cromwell Road, FictitiousHotels London places you in the heart of Victorian grandeur and modern city buzz. This 19th century row house turned design hotel blends contemporary style with classic British sophistication across 210 rooms. Original touches like working fireplaces and ornate crown molding offset sleek decor and high-tech in-room tablets controlling lights, TV and 24-hour room service. Fuel up on full English breakfast and locally roasted coffee at our indoor café or unwind with afternoon tea in the English Garden. Work out in the fitness studio before indulging in an evening massage. Our concierge arranges VIP access at nearby museums and priority bookings for West End theatre. Top shopping at Harrod's and the King's Road are a quick Tube ride away. Whether here for business or pleasure, FictitiousHotels London provides five-star luxury in an unmatched location." }
Si tiene éxito, verá otro mensaje similar al de la siguiente captura de pantalla.
Si desea actualizar, eliminar o agregar sus propios documentos de prueba, consulte la API de documentos de OpenSearch.
Antes de configurar QnAIntent, asegúrese de haber agregado acceso al modelo de Amazon Bedrock que desea utilizar.
Ahora que los datos de prueba se completan en el dominio del servicio OpenSearch, puede probarlos con el bot de Amazon Lex.
Pruebe su robot Amazon Lex
Para probar el bot, complete los siguientes pasos:
- En la consola de Amazon Lex, navegue hasta la función QnAIntent del bot que creó como requisito previo.
- Elija el idioma, que para esta publicación es Inglés (Estados Unidos).
- Bajo Configuraciones de IA generativaelegir Configurar.
- Bajo Configuración de QnAelegir Crear intención de QnA.
- Para Nombre de la intencióningresa un nombre (para esta publicación,
FicticiousHotelsFAQ). - Elegir Agregar.
- Elija la intención que acaba de agregar.
- Bajo Configuración de QnAelija OpenSearch como almacén de conocimientos.
- Para Punto final del dominioingrese el punto final que copió anteriormente.
- Para Nombre del índiceintroduzca un nombre (por ejemplo,
my-domain-index). - Para Respuesta exactaseleccionar Sí.
- Para Campo de preguntaingresar
question. - Para Campo de respuestaingresar
answer. - Elegir Guardar intención.
Porque usaste el fácil crear opción para iniciar su dominio del servicio OpenSearch, el acceso detallado estaba habilitado de forma predeterminada. Debe ubicar la función IAM de Amazon Lex y agregar permisos al dominio de OpenSearch Service para permitir que Amazon Lex interactúe con OpenSearch Service.
- Navegue hasta la versión borrador de su bot en el panel de navegación.
- Elija el enlace para Rol de tiempo de ejecución de permisos de IAM.
- Copie el ARN del rol para usarlo más adelante.
- Vuelva a los paneles de OpenSearch.
- Si cerró la pestaña de su navegador o salió de esta página, puede encontrarla nuevamente ubicando la URL IPv4 en la consola del servicio OpenSearch de un paso anterior.
- En el menú de opciones, elija Seguridad.
- Elegir Roles en el panel de navegación.
- Selecciona el rol
all_access.
- Elegir Usuarios mapeadosentonces escoge Administrar mapeo.
- Para Roles de backendingrese el ARN del rol de tiempo de ejecución de IAM que copió anteriormente.
- Elegir Mapa.
- En la consola de Amazon Lex, regrese a su bot y al Inglés (Estados Unidos) idioma.
- Elegir Construir para construir tu bot.
- Elegir Prueba para probar tu bot.
Asegúrate de que tu bot tiene los siguientes permisos para utilizar QnAIntent. Estos permisos deben agregarse automáticamente de forma predeterminada.
- Cuando se abra la ventana del chat de prueba de Amazon Lex, ingrese una pregunta de sus documentos de muestra de OpenSearch Service, como “¿Cuáles son los horarios de entrada y salida?”
Limpiar
Para no incurrir en costos continuos, elimine los recursos que creó como parte de esta publicación:
- Robot Amazon Lex V2
- Dominio del servicio OpenSearch
Conclusión
Amazon Lex QnAIntent proporciona la flexibilidad y la opción de utilizar una variedad de bases de conocimiento diferentes para generar respuestas precisas a preguntas basadas en sus propios documentos y fuentes de conocimiento autorizadas. Puede optar por permitir que Amazon Bedrock genere una respuesta a las preguntas en función de los resultados de su base de conocimientos, o puede generar respuestas exactas utilizando las bases de conocimiento de Amazon Kendra o OpenSearch Service.
En esta publicación, demostramos cómo iniciar y configurar un dominio de OpenSearch Service, completar un índice de OpenSearch Service con documentos de muestra y configurar la opción de respuesta exacta utilizando el índice con Amazon Lex QnAIntent.
Puede comenzar a aprovechar Amazon Lex QnAIntent hoy y transformar la experiencia de sus clientes.
Sobre los autores
jose rodgers es un arquitecto de soluciones senior para AWS que trabaja con clientes empresariales en el sector de viajes y hotelería. A Josh le gusta trabajar con clientes para resolver problemas complejos centrándose en tecnologías sin servidor, DevOps y seguridad. Fuera del trabajo, a Josh le gusta hacer senderismo, tocar música, hacer paracaidismo, pintar y pasar tiempo con la familia.
Thomas Rindfuss es arquitecto sénior de soluciones en el equipo de Amazon Lex. Inventa, desarrolla, crea prototipos y evangeliza nuevas características y soluciones técnicas para servicios de inteligencia artificial lingüística que mejoran la experiencia del cliente y facilitan la adopción.