Answer refund questions only from cited policy clauses
A prompt that requires AI to cite exact refund policy clauses for customer inquiries. Inspect answers against policy text with a verification script.
Customer service representatives using AI to draft refund responses risk generating non-existent commitments such as unconditional 30-day refunds. While language models excel at matching customer situations to policy language, hallucinating unwritten terms creates immediate dispute liabilities. Require the model to cite the exact policy clause code and verbatim clause text for every claim, and route unaddressed questions to manager review instead of guessing. This verification approach follows the same principle as the quote verification prompt.
[1] Prepare a policy file with 12 clauses and 8 boundary inquiries. Assign unique identifiers from POL-01 to POL-12.
[POL-01] Returns and exchanges for change of mind are accepted only within 7 days from the delivery completion date, and the customer is responsible for the round-trip shipping fee of $6.[POL-02] In the case of defective, incorrectly delivered, or damaged items, free exchange or refund is available within 30 days from the delivery completion date, with all return shipping costs covered by the store.[POL-03] Items with removed, damaged, or lost tags or barcode labels cannot be exchanged or refunded, regardless of whether they have been worn.[POL-04] Items with traces of outdoor wear, cosmetic/perfume/tobacco odors, food stains, or traces of washing cannot be exchanged or refunded, excluding simple indoor try-ons.[POL-05] Sealed hygiene items (underwear, innerwear, stockings, socks, earrings) cannot be exchanged or refunded once the packaging is opened or damaged.[POL-06] Custom-made items (custom engraving, alteration, custom sizing) cannot be canceled, exchanged, or refunded for change of mind once production has begun.[POL-07] Final sale items with 50% or more discount are not eligible for refunds due to change of mind; a one-time size exchange for the same item and color is permitted only if stock is available.[POL-08] Partial refunds for individual items in bundled sets (1+1, top and bottom sets) are not permitted; only full returns are accepted. However, if a component is defective, only that component will be replaced.[POL-09] Return pickup is handled automatically by the designated courier; if a customer ships via another courier with cash on delivery, extra shipping fees will be deducted from the refund.[POL-10] Refunds are processed back to the original payment method within 3 business days from the completion of inspection after the returned item arrives.[POL-11] When returning an entire order with promotional gifts included, the gifts must also be returned unopened; if gifts are missing or used, the retail price of the gift will be deducted from the refund.[POL-12] Special circumstances not specified in this policy (international shipping loss, damage due to natural disasters) will be processed after individual review by a customer support manager.The 8 boundary inquiries cover edge cases such as one day past deadline, perfume scent after try-on, final sale size swaps, bundled set partial returns, and international transit losses.
[Q1] Today is exactly the 8th day since delivery was completed. Can I exchange it for a different color simply because I changed my mind?[Q2] I only tried it on indoors, but a slight perfume scent remains. The tag is still attached. Can I get a refund?[Q3] I purchased an item on final sale at 60% off, but it is too small. Can I exchange it for a Large size?[Q4] I bought a coat on 55% final sale, but I do not like it. I would like a full refund.[Q5] A sleeve button on the delivered shirt is broken. It has been 14 days since delivery. Can I get a free exchange?[Q6] I bought a pack of individually sealed socks and opened one pack, but I do not like them. Can I return and get a refund?[Q7] I received the item through a freight forwarder abroad, but it was lost during local transit. Will you compensate with a refund?[Q8] I bought a 1+1 pants set, but I only like the black pair. Please give me a partial refund for the beige pair.[2] Structure the prompt with strict output columns and bounded determinations: Approved, Rejected, or Manager Review. Mandate character-for-character quotation.
You are a customer service AI for an online fashion store.Based solely on the exchange and refund policy provided in <policy>, generate answers in order for the 8 customer inquiries in <inquiries>. [Rules]1. Policy Compliance: Judge strictly based on the clauses explicitly stated in <policy>. Do not make up or assume any rules or conditions not in the policy (e.g., unconditional 30-day refunds).2. Determination Criteria: The determination must strictly be one of: [Approved, Rejected, Manager Review].3. Policy Clause: Specify the exact clause code (POL-01 to POL-12) that serves as the basis for the determination.4. Policy Quote: Copy the sentence that serves as the basis from <policy> character for character without altering a single letter.5. Customer Response: Write a polite, clear customer service response within the scope established by the quoted policy clause.6. Output Format: Output only a single Markdown table in the format below. Do not include any greetings, explanations, code fences, or additional text before or after the table. Table Header:| Inquiry ID | Determination | Policy Clause | Policy Quote | Customer Response | <policy>{the 12 clauses of run/policy.en.txt}</policy> <inquiries>{the 8 inquiries of run/inquiries.en.txt}</inquiries>[3] Execute the prompt in an isolated workspace with --setting-sources "" to disable external system instructions.
$ claude -p --model claude-sonnet-5-5 --max-turns 1 --tools "" --setting-sources "" --strict-mcp-config < run/en.1.prompt.txt > run/en.1.out.txtRaw table output from run/en.1.out.txt (truncated with … for length):
| Inquiry ID | Determination | Policy Clause | Policy Quote | Customer Response ||---|---|---|---|---|| Q1 | Rejected | POL-01 | Returns and exchanges for change of mind are… | Thank you for contacting us. Exchanges for c… || Q2 | Manager Review | POL-12 | Special circumstances not specified in this… | Thank you for the details. Our policy does n… || Q3 | Approved | POL-07 | Final sale items with 50% or more discount a… | Thank you for your inquiry. A one-time size… || Q4 | Rejected | POL-07 | Final sale items with 50% or more discount a… | We are sorry, but final sale items discounte… || Q5 | Approved | POL-02 | In the case of defective, incorrectly delive… | We are sorry for the broken button. As it ha… || Q6 | Rejected | POL-05 | Sealed hygiene items (underwear, innerwear,… | We are sorry, but socks are sealed hygiene i… || Q7 | Manager Review | POL-12 | Special circumstances not specified in this… | We are sorry to hear your item was lost in t… || Q8 | Rejected | POL-08 | Partial refunds for individual items in bund… | We are sorry, but partial refunds for indivi… |Comparing a second run in run/en.2.out.txt, 7 of 8 inquiries had the same verdict and clause. The difference was Q2. Run 1 classified it as Manager Review under POL-12, because the policy does not say how an item tried on indoors with a lingering perfume scent should be handled. Run 2 classified it as Rejected under POL-04, applying the odor exclusion. The Q8 quote also differed in length between the two runs.
[4] Build a verification script. It checks that every row has 5 columns and that the inquiry IDs Q1 to Q8 appear once each in order, that the verdict is one of the three allowed labels, that the cited clause exists, that the quote sits inside that clause's text word for word (under 20 characters counts as an error; that length is a choice made for this article), and that the verdict equals the baseline file. A verdict that differs from the baseline counts as an error. The script cannot tell whether the customer response agrees with the quoted clause.
import re, sys VALID = {"Approved", "Rejected", "Manager Review"}policy = {m[1]: " ".join(m[2].split()) for l in open(sys.argv[1], encoding="utf-8") if (m := re.match(r"\[(POL-\d{2})\]\s*(.*)", l.strip()))}expected = dict(l.strip().split(",", 1) for l in open(sys.argv[3], encoding="utf-8") if "," in l)rows = [[c.strip() for c in l.strip().strip("|").split("|")] for l in open(sys.argv[2], encoding="utf-8") if l.startswith("|")]rows = [r for r in rows if not all(set(c) <= set("-: ") for c in r)][1:] errors, seen = [], []for r in rows: if len(r) != 5: errors.append(f"{r[:1]}: {len(r)} columns"); continue qid, verdict, code, quote, reply = r quote = " ".join(quote.split()) if qid in seen: errors.append(f"{qid}: duplicate") seen.append(qid) if verdict not in VALID: errors.append(f"{qid}: verdict {verdict!r} is not allowed") if code not in policy: errors.append(f"{qid}: clause {code} does not exist") elif len(quote) < 20 or quote not in policy[code]: errors.append(f"{qid}: quote is not in {code} or is under 20 characters") if expected.get(qid) != verdict: errors.append(f"{qid}: verdict {verdict}, expected {expected.get(qid)}")if seen != list(expected): errors.append(f"inquiry IDs {seen} (expected {list(expected)})")print(f"{len(rows)} rows checked, {len(errors)} errors")for e in errors: print(" " + e)sys.exit(1 if errors else 0)[5] Run it. Run 1 exits with 1 because the verdict for Q2 differs from the baseline (Rejected); all 8 quotes were inside their clauses. Run 2 has no errors.
$ python run/verify_policy_en.py run/policy.en.txt run/en.1.out.txt run/expected.en.txt8 rows checked, 1 errors Q2: verdict Manager Review, expected Rejected$ python run/verify_policy_en.py run/policy.en.txt run/en.2.out.txt run/expected.en.txt8 rows checked, 0 errorsA pass therefore does not mean the verdict is right. The script only compares with the baseline file, and if the baseline is wrong or ambiguous it cannot say which side is correct. A failing row such as Q2 is a signal for a person to read the clause and decide: the policy never mentions indoor try-on with a scent, which is exactly the kind of gap Manager Review exists for.
To test defect detection, run/bad.en.out.txt was built from run 1 with an altered quote in Q1, a sentence from another clause cited under POL-01 in Q3, and a non-existent code POL-99 in Q7 (not model output). It exits with 1; the Q2 line is the baseline mismatch that run 1 already had.
$ python run/verify_policy_en.py run/policy.en.txt run/bad.en.out.txt run/expected.en.txt8 rows checked, 4 errors Q1: quote is not in POL-01 or is under 20 characters Q2: verdict Manager Review, expected Rejected Q3: quote is not in POL-01 or is under 20 characters Q7: clause POL-99 does not exist[6] Observations and operational boundaries. In these two English runs the verdict varied on Q2, where the policy is silent, and not on Q3, the conditional size exchange (both runs approved it). The Korean runs varied on Q3 instead. Writing the clause so that its conditions are unambiguous matters more than any prompt wording. No run added a rule such as "treat conditional permissions as approval pending stock check", so its effect was not tested.
Do not use this automated prompt for statutory cancellation disputes, consumer agency arbitrations, or fraud claims where legal liability is at stake. Escalate those cases immediately to legal counsel or human supervisors.