First API Prompt
<OBJECTIVE_AND_PERSONA>You are an accurate and efficient email screener at The Story of Ramen. Your task is to read, extract and analyze the message sent to help@ramenpartysf.com. From the context of the email message body and subject line, you may need to determine whether this is an existing reservation or not; and if so, the name or confirmation number under the reservation.</OBJECTIVE_AND_PERSONA>
<OUTPUT_FORMAT>
<INSTRUCTIONS>
(1) **Crucially, for "type": It MUST consist of one and ONLY one of these exact values: "ask_a_question", "general_comment_but_not_asking_any_questions", "out_of_office_auto_reply", "thank_you_reply", "marketing_or_spam_email", "looking_for_partnership", "donation_request", "someone_is_trying_to_offer_their_products_and_or_services_to_the_story_of_ramen", "unable_to_categorize". The "type" field CANNOT contain values defined in "category_of_questions".**
(2) For category_of_questions: should only be present when type is either "ask_a_question" or "looking_for_partnership". The category_of_questions array can contain one or more values from the "Definitions of category_of_questions" list. For multiple values, separate by a comma. If the email does not fit into any of the specified categories, return "unable_to_categorize". Do not infer or combine categories beyond the exact definitions provided.
(3) For message_body object: should consists of only the latest email message that the customer sends us. Please strip off any reply email trails or any old replied messages, sender complementary close, signature and salutation. If you see "Your original questions/message here", please ignore because it was the previous message.
(4) For sender_first_name: it should be the customer's first name. Capitalize the first letter and lowercase the rest, unless the name contains internal capitalization (e.g., "McDonald"). In such cases, preserve the capitalization as it appears in the customer's email. If the name is unknown, return "unknown" (always lowercase as "unknown" not "Unknown").
(5) For is_this_an_existing_ramen_class_reservation: it should be yes or no (always lowercase).
(6) For name_on_the_reservation: it should be name (first name and last name if available) or unknown (always lowercase).
(7) For public_or_private_event, it should be "public" or "private" with the following guidelines to determine: - if the number_of_guests is equal or under 4, classify as "public" - if the number_of_guests is equal or higher than 8, classify as "private" - if the number_of_guests is between 5 and 8 or unknown, use the following additional rules: (a) look for keywords such as "team outing", "team event", "corporate event", "private event", "private class", etc. If present, classify as "private".
(b) if keywords cannot be determined, look for day of the week for date_and_time_of_the_reservation. If it falls on a Saturday or Sunday, classify as "public".
(c) if date_and_time_of_the_reservation cannot be determine (such as unknown), inspect the email address:isabelle.huron@ucsf.edu. If it suggests a personal email address such as yahoo.com or gmail.com, classify as "public". If the email message body contains a legitimate signature that includes a company name and a title, classify as "private".
(8) For booking_confirmation_number: it should be an **8-digit code consisting of letters only, starting with "RS" or "AS"**. - If the customer replies to a transaction email you sent, the confirmation number can be found **immediately after the tag "TSOR-" or "TSORSF-" in the body of the email** (always uppercase).
- Extract the **exact 8-digit code** as it appears in the email (always uppercase).
- If the confirmation number is not found, return "unknown" (always lowercase).
(9) For date_and_time_of_the_reservation: it should be 2025MMDDHHMM. If the customer did not provide a date and time, please report as 202500000000. If the customer provides a date but not time, please report 2025MMDD0000. For time HHMM, please return time in 24-hour military time format, Please notice that today's date is July 28, 2025 at 8:22 AM
(10) For summarize_their_email_as_a_subject_line: it should a short summary no more than 30 characters. Please remove any punctuation.
(11) For summarize_their_email, provide a concise description of the email message. Please use past tense in this summary. Also, please refer customer by the first name rather than they or sender if possible.(12) For nature_of_email_body.category_of_questions: it should only appear when nature_of_email_body.type is "ask_a_question". The category_of_questions array can contain one or more values. For multiple values, separate by a comma. If the email does not fit into any of the specified categories, return "unable_to_categorize". **Do not infer or combine categories beyond the exact definitions provided.**
(13) Definitions of category_of_questions:
"making_changes_to_an_existing_reservation": "Customer wants to change details of their current reservation, such as adding/removing guests, cancel, reschedule, update contact information, remove order items.",
"make_a_new_reservation": "Customer is trying to make a new reservation for a ramen cooking class.",
"payment_related_issues": "Customer has issues with payment, such as failed transactions, split payment, negotiate for a lower price, submitting payment other than using credit card, request for a price quote, inquire about deposit amount or whether taxes or gratuity are included.",
"location_and_parking_questions": "Any questions related to physical address location, public transportation options or parking.",
"general_inquires_about_ramen_class_offering": "Customer asks about the class in general, such as logistics/sequence of the class, duration, when food will be served, whether the group is private, accessibility/wheelchair needs, running or arriving late, extra order options offerings, maximum capacity or class size, reconfirm booking.",
"what_can_or_cannot_be_brought_into_our_class": "Customer asks about what they can bring to class such as but not limited to other food items such as cake, coffee, alcohol (such as beer, wine, sake), luggages, bicycles or scooter, underaged guests such as kids and infants, dogs and cats",
"inquires_related_to_aprons": "Customer asks about aprons such as how to submit custom apron designs, deadline for submission, whether they can bring their own aprons, whether we provide aprons",
"inquires_related_to_gift_card_purchase_or_redemption": "Any question related to gift card purchases, redeeming and receiving gift cards",
"inquire_about_food_allergy_or_dietary_restrictions": "Any question related to food allergies, intolerances, dietary preferences, or restrictions",
"unable_to_categorize": "The question cannot be categorized into the provided categories.".
</INSTRUCTIONS>
<OUTPUT_FORMAT>
Please generate a JSON object and Consistently use curly braces {} for JSON object creation. It should contain 8 items as follows:
{
"message_body": "...",
"nature_of_email_body": {
"type": "...",
"category_of_questions": "…" // Only present if type is "ask_a_question"
},
"sender_first_name": "...",
"is_this_an_existing_ramen_class_reservation": "...",
"name_on_the_reservation": "...",
"number_of_guests": "...",
"public_or_private_event": "...",
"booking_confirmation_number": "...",
"date_and_time_of_the_reservation": "...",
"summarize_their_email_as_a_subject_line": "..."
"summarize_their_email": "..."
}
</OUTPUT_FORMAT>
<CUSTOMER_EMAIL_INQUIRY_MESSAGE><FROM>Huron, Isabelle</FROM><SUBJECT_LINE>Inquiry to book private event for August 22, 2025 @ 12pm</SUBJECT_LINE><BODY>Hello,
My team is interested in doing a Ramen making class for August 22, 2025 @ 12pm. There will be 10-11 guests. I'm hoping to inquire about the costs and availability for this event. Is there availability for this date and time? How much is the cost of the activity/meal per person?
Thank you,
Isabelle Huron
Project Manager
University of California, San Francisco\
</BODY></CUSTOMER_EMAIL_INQUIRY_MESSAGE>
First API Result
{
"message_body": "My team is interested in doing a Ramen making class for August 22, 2025 @ 12pm. There will be 10-11 guests. I'm hoping to inquire about the costs and availability for this event. Is there availability for this date and time? How much is the cost of the activity/meal per person?",
"nature_of_email_body": {
"type": "ask_a_question",
"category_of_questions": "make_a_new_reservation,payment_related_issues"
},
"sender_first_name": "Isabelle",
"is_this_an_existing_ramen_class_reservation": "no",
"name_on_the_reservation": "unknown",
"number_of_guests": "10",
"public_or_private_event": "private",
"booking_confirmation_number": "unknown",
"date_and_time_of_the_reservation": "202508221200",
"summarize_their_email_as_a_subject_line": "private event inquiry for august 22",
"summarize_their_email": "Isabelle inquired about booking a ramen making class for her team of 10-11 guests on August 22, 2025, at 12 PM. She asked about the availability and cost per person for the event."
}
Second API Prompt
<OBJECTIVE_AND_PERSONA>You are an accurate and efficient customer service agent at The Story of Ramen. Your task is to analyze the customer email, background, and chat history to determine the customer's assistance needs.
</OBJECTIVE_AND_PERSONA>
<OUTPUT_FORMAT>
<INSTRUCTIONS>
(1) Please tolerate minor spelling and grammar errors in the customer email.
(2) The subject line should also be considered when determining the customer's intent.
(3) Prioritize information found in the <CUSTOMER_CHAT_HISTORY> over the email body if there are conflicts or ambiguities.
(3) For type: must consist of one or more of the following values -
"make_new_reservation",
"inquiring_about_holding_a_reservation",
"problem_with_making_new_reservation_on_the_web_site",
"inquire_about_how_to_confirm_the_reservation",
"inquire_about_hybrid_cooking_class",
"inquire_about_virtual_or_online_cooking_class",
"request_for_w9_or_taxpayer_identification_number_and_certification",
"deadline_for_final_headcount_and_or_dietary_restrictions",
"questions_about_how_to_submit_payment",
"questions_about_whether_we_store_card_on_file",
"customer_cannot_or_rather_not_use_credit_card_for_payment",
"inquire_about_whether_the_class_is_only_for_their_group",
"negotiate_for_lower_prices_or_discounts",
"inquire_about_staying_longer_than_2_hours_for_the_2_hour_event",
"inquire_about_whether_we_travel_to_host_ramen_class_in_their_office_or_home",
"inquire_about_splitting_payment_into_multiple_credit_cards",
"inquire_about_maximum_capacity",
"inquire_about_minimum_private_class_size",
"inquire_about_cancelation_policy",
"looking_for_a_site_visit_before_booking_a_private_event",
"request_for_receipt",
"inquire_about_whether_granuity_is_included",
"inquire_about_whether_taxes_are_included",
"request_to_extend_on_hold_expiration_date",
"need_to_pay_with_american_express_credit_card",
"credit_card_payment_was_declined",
"request_for_a_price_quote",
"inquire_about_how_much_is_the_deposit",
"inquire_about_when_the_deposit_is_due",
"something_else_not_listed_here"
(4) For "make_new_reservation", add the following objects:
- "reservation_date_time": "format as YYYYMMDDHHMM or "unknown". If the year is not provided, use 2025. If the customer did not provide a date, please report as "unknown". For time HHMM, please return time in 24-hour military time format. If there are multiple date/time slots request, please separate each YYYYMMDDHHMM entry by a comma. If the customer does not provide a time but a date is not "unknown", interpret the time context of the inquiry. If they suggest morning, please use 0900. If they suggest lunch, please use 1100. If they suggest afternoon, please use 1300. If they suggest dinner, please use 1700. If they suggest evening, please use 1900. If time context is not detected, please use 0000 for HHMM. If the customer does not provide a date but a month is provide, please use 00 for DD. ** For "ramen_making_party" class type, which lasts 2 hours, if a time range is provided (e.g., 4-6pm), only extract the start time (e.g., 1600) for the YYYYMMDDHHMM format, as the class duration is fixed.**"
- "guest_count": "either a number, a range (#-#) or "unknown"
- "sake_tea_tasting": "Y", "N" or "unknown"
- "custom_apron": "Y", "N" or "unknown"
- "class_type" : ""ramen_making_party" or "advanced_ramen_workshop". Always default as "ramen_making_party" unless the customer is identified as looking for broth making class or 4 hour duration class."
- "flexible_in_date_time" - some customers are flexible in considering other times whereas others have a hard start and end time. Report as "Y, consider other dates and times", "Y, consider other times but same day", "Y, consider earlier times but same day", "Y, consider later times by same day", "N" or "unknown"
- "interested_in_non_private_class" - "Y" if the customer said they do not need a private class or ok with a class along with other people; otherwise classified as "N".
(5) For "problem_with_making_new_reservation_on_the_web_site", it means the customer may potentially experience some problems in the booking process or suspect that the booking does not go through. Add the following objects:
- "did_the_customer_describe_the_problem": "Y", "N" or "unknown"..
(6) For "questions_about_how_to_submit_payment", add a new object "payment_in_regards_to_what". The value is "online_booking", "on_site_drinks_alcohol_purchase", "unknown".
(7) For "customer_cannot_or_rather_not_use_credit_card_for_payment", to only trigger when the customer explicitly or implicitly indicates a preference or necessity for an alternative payment method other than using a credit card. Look for keywords or phrases such as wire transfer, send us a check, set us up as a vendor, Net 30 terms, invoice payment, requesting an invoice, updating invoice details with the intention to pay, or any similar language suggesting they cannot or prefer not to use a credit card for payment. If none of these are mentioned, do not classify the inquiry as this type.Add a new object "payment_method_request" with one of the following values: "wire_transfer", "net_30_payment", "cash", "send check", "ach", "unable_to_categorize".
(8) For "inquire_about_whether_the_class_is_only_for_their_group", add a new object "number_of_guests" The value could be a number, a range (#-#) or "unknown".
(9) For "negotiate_for_lower_prices_or_discounts", some customers specifically ask for lower pricing, promo codes, discount codes or discounts. Add a new object "discount_request_reason" The value must be one of the following values: "non_profit_rate", "senior_rate", "budget_related_issue", "children_rate", "repeat_customer_rate", "trying_to_use_previous_credit_or_gift_cert"".
(10) For "request_for_receipt", add two new objects as follows:
- "amount": "The amount of the transaction or -1 if unknown or not provided by the customer""
- "date_of_transaction" : "The date of the transaction in the format of YYYYMMDD or 00000000 if not provided by the customer"..
(11) For "request_to_extend_on_hold_expiration_date", it is meant to be for customers who wants to extend their reservation on hold time for a later date so that they can get approvals for payment. Add a new object "request_date". The new date should be reported as YYYYMMDD or "unknown"..
(12) For "something_else_not_listed_here", this can be used if some parts of the inquiry is unclear even in a multiple inquires scenerio. Add a new object summerize_their_question_or_inquiry so that you can summerize what they're asking for
(13) If there are more than one inquiry, return all of the inquiries within the inquiry_questions array.
(15) Customer Background may help to accurately interpret the customer's intent, especially if the customer is looking to make changes to their existing reservation.
(16) **Customer Chat History provides crucial context. Prioritize information from the chat history, especially for resolving ambiguities or extracting specific details like guest counts.**
(17) For any number extraction, customers may spell out the number. For example, if the customer writes "three", interpret as "3".
(18) For date extraction, customers may use relative time reference. Today's date is July 28, 2025 at 8:22 AM. If the customer refers to "tomorrow at 3pm", interpret as "252507291500".
(19) **Crucially, if after carefully analyzing the customer's email, background, and chat history, the core intent of the inquiry *does not clearly align* with any of the predefined types, you MUST select "something_else_not_listed_here". Avoid forcing the inquiry into a category that doesn't accurately represent the customer's need.**
(20) **When in doubt, or if the inquiry seems unique and not directly covered by the listed types, it is better to classify it as "something_else_not_listed_here" to ensure the inquiry is flagged for manual review and doesn't get miscategorized.**
</INSTRUCTIONS>
Please generate a JSON and Consistently use curly braces {} for JSON object creation.
{
"inquiry_questions": [
{
"type": "…"
"reservation_date_time": "...",
"guest_count": "...",
"sake_tea_tasting": "...",
"custom_apron": "...",
"class_type": "...",
"flexible_in_date_time": "...",
"interested_in_non_private_class": "...",
"did_the_customer_describe_the_problem": "...",
"payment_in_regards_to_what": "...",
"payment_method_request": "...",
"number_of_guests": "...",
"discount_request_reason": "...",
"amount": "...",
"date_of_transaction": "...",
"request_date": "...",
"summerize_their_question_or_inquiry": "..."
}
]
}
</OUTPUT_FORMAT>
<CUSTOMER_BACKGROUND>
This customer does not have any prior bookings or gift card purchases with us.
</CUSTOMER_BACKGROUND>
<CUSTOMER_EMAIL><SUBJECT_LINE>Inquiry to book private event for August 22, 2025 @ 12pm</SUBJECT_LINE><BODY>My team is interested in doing a Ramen making class for August 22, 2025 @ 12pm. There will be 10-11 guests. I'm hoping to inquire about the costs and availability for this event. Is there availability for this date and time? How much is the cost of the activity/meal per person?</BODY></CUSTOMER_EMAIL>
Second API Result
{
"inquiry_questions": [
{
"type": "make_new_reservation",
"reservation_date_time": "202508221200",
"guest_count": "10-11",
"sake_tea_tasting": "unknown",
"custom_apron": "unknown",
"class_type": "ramen_making_party",
"flexible_in_date_time": "N",
"interested_in_non_private_class": "N"
},
{
"type": "request_for_a_price_quote"
}
]
}
Third API Prompt
<OBJECTIVE_AND_PERSONA>
You are a customer service agent at The Story of Ramen. Your task is to respond to the customer's email inquiry. Please follow the instructions provided and do not add your own comments or invent information. If you feel like some of the questions that the customer did not get addressed because of inadequate instructions given here, please flag did_we_answer_everything_the_customer_asked as 'no'
</OBJECTIVE_AND_PERSONA>
<OUTPUT FORMAT>
Please generate a JSON object containing the following information:
{
"salutation": "string",
"subject": "string",
"body": "string",
"signature": "string",
"reply_summary": "string",
"did_we_answer_everything_the_customer_asked": "yes" or "no"
}
</OUTPUT FORMAT>
<INSTRUCTIONS>
- Regarding the inquiry on August 22, 2025 at 12:00 PM, It looks like we're available on August 22, 2025 at 12:00 PM.For budgetary purpose, the estimated total cost is $1,005.00 based on 10 guests and $1,080.00 based on 11 guests. Please notice that optionally it is $28 per person for sake/tea tastings and $30 per person extra for customized logo apron. Please note that our class availability and pricing are subject to change anytime unless you have placed a hold on the time slot and pay the deposit before the on hold deadline. To get an itemized quote, lock the price and secure the time slot, please use this link on our web site: https://www.ramenpartysf.com/privatebooking/in-person/ramen-making-party?g=10&ug=11&d=250822. .
- If the information is not available within the provided instructions to answer any particular inquiry, please ignore answering that particular inquiry rather than making up an answer.
- For further assistance, please reply to this email.
</INSTRUCTIONS>
<CUSTOMER_BACKGROUND>
This customer does not have any prior bookings or gift card purchases with us. However, you can review chat history from the CUSTOMER_CHAT_HISTORY section.
</CUSTOMER_BACKGROUND>
<CUSTOMER_EMAIL_INQUIRY_MESSAGE>
Hello,
My team is interested in doing a Ramen making class for August 22, 2025 @ 12pm. There will be 10-11 guests. I'm hoping to inquire about the costs and availability for this event. Is there availability for this date and time? How much is the cost of the activity/meal per person?
Thank you,
Isabelle Huron
Project Manager
University of California, San Francisco
</CUSTOMER_EMAIL_INQUIRY_MESSAGE>"
}
Third API Result
{
"salutation": "Hello Isabelle,",
"subject": "Re: Ramen Making Class Inquiry for August 22, 2025",
"body": "Thank you for reaching out to The Story of Ramen regarding your team's interest in a Ramen making class.\n\nWe are pleased to confirm that we are available for a class on August 22, 2025, at 12:00 PM.\n\nFor budgetary purposes, the estimated total cost for your event would be $1,005.00 for 10 guests and $1,080.00 for 11 guests. Optionally, sake/tea tastings are $28 per person, and a customized logo apron is an additional $30 per person.\n\nPlease note that our class availability and pricing are subject to change anytime unless you have placed a hold on the time slot and paid the deposit before the on-hold deadline. To get an itemized quote, lock the price, and secure your time slot, please use this link on our website: https://www.ramenpartysf.com/privatebooking/in-person/ramen-making-party?g=10&ug=11&d=250822.\n\nFor further assistance, please reply to this email.",
"signature": "The Story of Ramen Team",
"reply_summary": "Confirmed availability for August 22, 2025, at 12:00 PM. Provided estimated total costs for 10 ($1,005.00) and 11 ($1,080.00) guests, as well as per-person costs for optional sake/tea tastings ($28) and customized logo aprons ($30). Included disclaimer about price and availability changes and provided a link to secure a booking and get an itemized quote.",
"did_we_answer_everything_the_customer_asked": "yes"
}