{"id":"cx-language-routing-csv-translate-flag","audience":"operations","category":"support-work","technique":"constraints","track":"support","level":"intermediate","title":"Route six messages by language into a CSV with a translate flag","free":false,"task":"Output one CSV code block with the header \"id,language,queue,translate\" and one row per message. Queues exist only for Spanish (ES), French (FR) and English (EN). Any other language goes to EN with translate set to yes; otherwise translate is no. For a message that mixes languages, use the language of the request itself. Write nothing outside the code block.","materialLabel":"Your material (attached to your prompt automatically)","material":"M1: \"Hola, mi pedido no llegó y necesito una solución.\"\nM2: \"Bonjour, je voudrais changer l'adresse de livraison.\"\nM3: \"Hi, I'm Carlos Ruiz and my order arrived late.\"\nM4: \"Obrigado, mas o pedido ainda não chegou.\"\nM5: \"Hello, ¿pueden ayudarme con mi factura, por favor?\"\nM6: \"Guten Tag, wo ist meine Bestellung?\"\n\nNOTES\nThe language names to use in the CSV are English words: Spanish, French, English, Portuguese, German. Names of people do not show the language of the message.","rules":[{"type":"codeBlocks","count":1},{"type":"maxCodeLines","max":7}],"mistakes":[{"title":"Judging M3 by the name","why":"The AI sees 'Carlos Ruiz' and picks Spanish.","fix":"Say: \"Names don't show language; judge the message.\"","checks":["r1"]},{"title":"Sending Portuguese to ES","why":"The AI routes similar languages to Spanish.","fix":"Say: \"Only ES, FR, EN have queues; others go to EN with translate yes.\"","checks":["r2"]},{"title":"Mixed message mistake","why":"The AI picks English for M5 because it starts with Hello.","fix":"Say: \"Use the language of the request itself.\"","checks":["r1","r2"]},{"title":"Text around the CSV","why":"The AI adds notes.","fix":"Say: \"Nothing outside the code block, 7 lines in total.\"","checks":["r0","codeBlocks","maxCodeLines"]}],"promptHints":[{"label":"Gives the header","patterns":["id,language,queue,translate"]},{"label":"States the queue rule","patterns":["only (spanish|es)","go to en","translate"]},{"label":"Handles mixed messages","patterns":["mix","request itself","language of the request"]},{"label":"Asks for one code block only","patterns":["code block","nothing outside"]}],"hint":"Give the header, say which queues exist, what happens to other languages and how to treat a mixed message.","rubricLabels":["The first row is id,language,queue,translate and there are rows for M1 to M6 in order","The language column shows M1 Spanish, M2 French, M3 English, M4 Portuguese, M5 Spanish, M6 German, and the queue column shows ES, FR, EN, EN, ES, EN","The translate column is yes only for M4 and M6 (no for the others), and nothing is written outside the code block"]}