Category: AI Corner

  • This is the prompt I use to pretty-print OFAC designation-related information – feel free to suggest improvements or point out issues (yes, I know telling it to output a carriage return is pretty dumb because Gemini uses Markdown format – I will clean that up eventually, but right now, it still “works:):

    Throughout this procedure, make field names and the colon bold, but leave the field value normally formatted.

    Do not infer information about a listing from an associated listing that references it – only output information from the actual listing.

    Provide no citation markers. However, if any sources other than the update site or the press release are referenced, provide a source list at the end.

    First, output a heading, with H1 heading formatting, with the title  of the update, followed by a carriage return – and make it a hyperlink to the update URL.

    If there was a press release, output the name of the issuing body (e.g. “State” or “Treasury), followed by“ Press Release: “, followed by the title of the press release, for each press release.. Ensure the press release title is made into a hyperlink to the corresponding press release URL, and format the whole line as an H3 header.

    If there are sections of additions:

    Output “Additions:” with H2 heading, and bold.

    Output a carriage return.

    For each listing in each section of additions:

    Reformat each listing:

    Output the name, bolded. If a vessel with a call sign, output a space, then the call sign in parentheses

    Then produce the rest of the data as a bulleted list:

    1. If there are AKAs, list those prefaced by “AKA: “ and make that label bold. If there are multiple AKAs, put the label on the bullet, and make each AKA a separate sub-bullet, If there is only 1 AKA, put the AKA on the same line as the label
    2. For vessels, if vessel type found, output the vessel type, prefaced by “Vessel Type: ”
    3. For vessels, if vessel flag country found, output the vessel flag country, prefaced by “Vessel Flag: ”
    4. List remaining fields in order of their presence. However, do not list the program tags. Bold the field name.
    5. If there is a listed party type, list it, prefaced by “Party Type: “. Bold the label
    6. If there are associated “Linked to:” parties in parentheses, output “Linked to: “ and that information. If there are multiple Linked To parties, make the label the main bullet, and make the parties separate sub-bullets. Make the label  bold.

    Next, add supplemental information from the  press release linked to in the update, if any, as well as any  publicly-available information that can be reliably linked to each listed party. Preface this with “Supplemental Information: “, bolded – but not bulleted to offset it from the bulleted items

    Then output two carriage returns.

    Preface each section divided by type of party (e.g. individuals, entities, \ vessels, aircraft) and by the list updated (e.g. SDN, SSI, FSE) with the section header from the OFAC designation update – for example, “The following entities have been added to OFAC’s SDN List:”. Make the section header ,  italicized and bolded.

    Group listings within each section by the combination of program tags.

    Preface each grouping with a list of the associated program tags, followed by the description from OFAC’s program tag web page.  If there is a single program tag, output :OFAC Program:  “, followed by the program tag, 2 spaces, a and its description. If there are multiple program tags, make a bulleted list, with “OFAC Programs:” on the first bullet, and each program tag, 2 spaces, and its description, on a new sub-bullet. Make this italicized.

    Output two carriage returns between listings within each section

    End of additions section logic

    If there are sections of deletions, removals or delistings:

    Output “Delistings:” with H2 heading formatting, bolded.

    Output a carriage return.

    Preface each section divided by type of party (e.g. individuals, entities, \ vessels, aircraft) and by the list updated (e.g. SDN, SSI, FSE) with the section header from the OFAC designation update – for example, “The following deletions have been made to OFAC’s SDN List:”. Make the section header ,  italicized and bolded.

    Display each listing, removing the program tags from the end of the listing. Bold each field name. To clarify, this is a different format than that of the additions section – since these are removals, we do not need to highlight each field by putting them on separate lines.

    Group listings  by the combination of program tags.

    Preface each grouping with a list of the associated program tags, followed by the description from OFAC’s program tag web page.  If there is a single program tag, output :OFAC Program:  “, followed by the program tag, 2 spaces, a and its description. If there are multiple program tags, make a bulleted list, with “OFAC Programs:” on the first bullet, and each program tag, 2 spaces, and its description, on a new sub-bullet. Make this italicized.

    Output two carriage returns between listings 

    End of deletions, removals or delistings section logic

    If there are sections of changes: 

    Do not process the “unrelated administrative list changes” section if the next line of text says “None”

    Output “Amendments:” with H2 heading formatting, bolded.

    Output a carriage return.

    Preface each section with the section header from the OFAC designation update.

    Make the section header , italicized and bolded.

    Reformat each listing:

    For the new version of the listing:

    a) Output the name, bolded

    b) Then produce the rest of the data as a bulleted list:

    1. If there are AKAs, list those prefaced by “AKA: “ and make that label bold. If there are multiple AKAs, put the label on the bullet, and make each AKA a separate sub-bullet, If there is only 1 AKA, put the AKA on the same line as the label
    2. List remaining fields in order of their presence. However, do not list the program tags. Bold the field name.
    3. If there is a listed party type, list it, prefaced by “Party Type: “. Bold the label
    4. If there are associated “Linked to:” parties in parentheses, output “Linked to: “ and that information. If there are multiple Linked To parties, make the label the main bullet, and make the parties separate sub-bullets. Make the label  bold.

    c) Next, add supplemental information from the  press release linked to in the update, if any, as well as any  publicly-available information that can be reliably linked to each listed party. Preface this with “Supplemental Information: “, bolded – but not bulleted to offset it from the bulleted items

    d) Then output two carriage returns.

    e) Then, Output “List of Changes:” followed by a carriage return. Make this italicized and bolded.

    Make a bulleted list of every field in the listing that has changed:

    1. Output “Field Name: “, List the field name
    2. If there is a new value and no old value, output “Added: “ and the new value as a sub-bullet
    3. If there is an old value and no new value, output “Deleted: “ and the old value as a sub-bullet
    4. If there are new and old values, output “Changed: “, the old value, “ to: “ and the new value as a sub-bullet

    End of listing reformatting. 

    Group listings  by the combination of program tags.

    Preface each grouping with a list of the associated program tags, followed by the description from OFAC’s program tag web page.  If there is a single program tag, output :OFAC Program:  “, followed by the program tag, 2 spaces, a and its description. If there are multiple program tags, make a bulleted list, with “OFAC Programs:” on the first bullet, and each program tag, 2 spaces, and its description, on a new sub-bullet. Make this italicized.

    Insert two carriage returns between listings 

    End of changes section logic

    Finally, if there is a press chart, output “Press Chart: “, followed by the press chart .  Make the chart image a hyperlink to the press chart URL. Make the whole press chart section an H3 heading.

    , ,
  • I’ve been working on this for a while – as a learning tool, correcting and refining is more instructive to me than getting a good result and asking for the master prompt.

    A few things to point out:

    • I haven’t run this against aircraft designations “live” yet, so this part might not be precise
    • OFAC doesn’t use any delimiters except for things that can have multiple values, so you don’t know, at a glance, when a field’s label ends and its value begins. I’ve generally steered Gemini by listing all the labels I’ve seen
    • Sometimes OFAC doesn’t break down the data at all – cargo vessel types are immediately followed by the flag state with delimiter (although I guess you could treat the whole thing as a compound data element)
    • OFAC clearly has a bias towards sanctioning entities – why else would there be party types of “aircraft”, “vessel” and “individual”, but nothing for entities?

    Anyhow, here’s the prompt – if you see some logic that will break, let me know:

    OFAC addition or deletion listings are in the following format:

    All OFAC listings finish with the following:

    1. The type of party (Individual, Vessel, Aircraft) in parentheses may be present- if not present, the listing refers to an entity. Entities can also be identified more easily if the section of the OFAC identifies the listings which follow as entities.
    2. After that. a series of OFAC program tags (defined at Information on OFAC sanctions lists program tags and their definitions.),appears, in square brackets – there will always be at least one.
    3. Next, optionally, in parentheses, the text “Linked To:” and other parties with which the listed party is associated, with multiple instances separated by semi-colons
    4. And the listing terminates with a period.

    And the first element in all listings is the primary name.

    The information between the primary name and the party type depends on the party type:

    For entities:

    1. After the primary name, in parentheses, is  an optional series of aliases, prefixed by “a.k.a.” and separated by semicolons
    2. Next, after a comma, are associated addresses, each followed by a semicolon
    3. Next are a series of fields consisting of labels (e.g. Identification Number, Registration number), possibly terminated with a colon (e.g. “Secondary sanctions risk:”), a value, and terminated by a semicolon, except for the last field
    4. The Registration Number field may have subfields such as issuing country (in parentheses) and issue date.
    5. As a reminder, the final field is not terminated by a semi-colon but is followed by the list of program tags, the optional Linked To information and the final period.

    Here is an example: 

    ARIES GLOBAL INVESTMENT LTD (a.k.a. ARIES GLOBAL INVESTMENT LIMITED), Room 2611, 26th Floor, Southeast Technology R&D Center, 438, Jincheng Lu, Xiaoshan Qu, Hangzhou, Zhejiang, China; Rm A 20/F ZJ 300, 300 LOCKHART RD, Wan Chai, Hong Kong, China; Identification Number IMO 0052971; Registration Number 76957722 (Hong Kong) issued 19 Aug 2024 [VENEZUELA-EO13850]. 

    For individuals:

    1. After the primary name, in parentheses, is either a series of aliases, prefixed by “a.k.a.” and separated by semicolons, or a vessel call sign
    2. After a comma, are associated addresses (full address, city and country or country), each followed by a semicolon
    3. Next are a series of fields consisting of labels (e.g. DOB, nationality, Gender, Secondary Sanctions Risk, Cedula, possibly terminated with a colon (e.g. Secondary sanctions risk:), a value, and terminated by a semicolon, except for the last field
    4. As a reminder, the final field is not terminated by a semi-colon but is followed by the party type in parentheses, the list of program tags, the optional Linked To information and the final period.

    Here is an example: 

    ARAYA NAVARRO, Jimena Romina (a.k.a. “ARAYA, Jimena”; a.k.a. “Rosita”), Venezuela; Colombia; DOB 05 Sep 1983; nationality Venezuela; Gender Female; Secondary sanctions risk: section 1(b) of Executive Order 13224, as amended by Executive Order 13886; Cedula No. 16011070 (Venezuela) (individual) [SDGT] [TCO] (Linked To: TREN DE ARAGUA). 

    For cargo vessels:

    1. After the primary name, optionally, in parentheses, a vessel call sign appears
    2. Next appears a description of the vessel, and the flagging country, with multiple instances separated by semi-colons (and subsequent ones may be preceded by “Other Vessel Flag”
    3. Next are a series of fields consisting of labels (e.g. Year of Build, Identification Number, Registration number, MMSI), possibly terminated with a colon (e.g. Secondary sanctions risk:), a value, and terminated by a semicolon, except for the last field
    4. As a reminder, the final field is not terminated by a semi-colon but is followed by the party type in parentheses, the list of program tags, the optional Linked To information and the final period.

    Here is an example: 

    VALIANT (VRXH3) Crude Oil Tanker Hong Kong flag; Other Vessel Flag China; Vessel Year of Build 2009; Vessel Registration Identification IMO 9409247; MMSI 477206500 (vessel) [VENEZUELA-EO13850] (Linked To: ARIES GLOBAL INVESTMENT LTD).

    For aircraft:

    1. After the primary name, there is a semi-colon
    2. Next are a series of fields consisting of labels (e.g. Manufacture Date, Model, Operator, Manufacturer’s Serial Number (MSN), Tail Number), possibly terminated with a colon (e.g. Secondary sanctions risk:), a value, and terminated by a semicolon, except for the last field
    3. As a reminder, the final field is not terminated by a semi-colon but is followed by the party type in parentheses, the list of program tags, the optional Linked To information and the final period.

    Here is an example: 

    EP-MJG; Aircraft Manufacture Date 2002; Aircraft Model Airbus A340-300; Aircraft Operator Mahan Air; Aircraft Manufacturer’s Serial Number (MSN) 474; Aircraft Tail Number EP-MJG; Secondary sanctions risk: section 1(b) of Executive Order 13224, as amended by Executive Order 13886 (aircraft) [SDGT] [IFSR] (Linked To: MAHAN AIR). 

    OFAC change listings consist of the old listing, followed by “-to-“, followed by the new listing.

    Take no action on this information until prompted further.

  • Here’s Wednesday’s designations, with some fixes to my understanding of the format (unlike other formats, the field name/label in OFAC listings are not really differentiated by formatting or separator character), as well as some reformatting so it’s easier on the eyes to tease apart the various sections, listings and fields:

    Venezuela-related Designations

    Treasury Press Release: Treasury Targets Oil Traders Engaged in Sanctions Evasion for Maduro Regime

    Additions:

    The following entities have been added to OFAC’s SDN List:

    [VENEZUELA-EO13850] – Executive Order 13850 – Blocking Property of Additional Persons Contributing to the Situation in Venezuela

    ARIES GLOBAL INVESTMENT LTD

    AKAs: ARIES GLOBAL INVESTMENT LIMITED

    • Address: Room 2611, 26th Floor, Southeast Technology R&D Center, 438, Jincheng Lu, Xiaoshan Qu, Hangzhou, Zhejiang, China
    • Address: Rm A 20/F ZJ 300, 300 LOCKHART RD, Wan Chai, Hong Kong, China
    • Identification Number: IMO 0052971
    • Registration Number: 76957722 (Hong Kong) issued 19 Aug 2024

    Based on the Treasury press release, this entity was designated for operating in the oil sector of the Venezuelan economy. It is the registered owner of the vessel DELLA, which has transported Venezuelan oil.

    CORNIOLA LIMITED

    AKAs: CORNIOLA LTD

    • Address: 149, Donggang Jiedao, Putuo Qu, Zhoushan, Zhejiang 316100, China
    • Address: Rm 909 G 9/F Hunghom Coml Ctr Twr A, 39 Ma Tau Wai Rd, Hunghom, Kowloon, Hong Kong, China
    • Identification Number: IMO 6434228
    • Registration Number: 75612503 (Hong Kong) issued 14 Aug 2023

    According to the Treasury press release, this entity was designated for operating in the oil sector of the Venezuelan economy. It is the registered owner of the vessel NORD STAR, which has transported Venezuelan oil.

    KRAPE MYRTLE CO LTD

    • Address: 149 Donggang Jiedao, Putuo Qu, Zhoushan, Zhejiang 316100, China
    • Address: Rm D5 5/F King Yip Fty Bldg, 59 King Yip St, Kwun Tong, Kowloon, Hong Kong, China
    • Identification Number: IMO 6342210
    • Registration Number: 74094750 (Hong Kong) issued 31 May 2022

    The Treasury press release states this entity acts as the ship manager and operator of the NORD STAR and was designated for operating in the oil sector of the Venezuelan economy.

    WINKY INTERNATIONAL LIMITED

    • Address: 14th Floor, Guangdong Investment Tower, 148 Connaught Road Central, Hong Kong, China
    • Address: Majuro, Ajeltake Island 96960, Marshall Islands
    • Organization Established Date: 01 Nov 2024
    • Registration Number: 128617 (Marshall Islands)

    Based on the Treasury press release, this entity was designated for operating in the oil sector of the Venezuelan economy. It is the registered owner of the vessel ROSALIND, which has transported Venezuelan oil.

    The following vessels have been added to OFAC’s SDN List:

    [VENEZUELA-EO13850] – Executive Order 13850 – Blocking Property of Additional Persons Contributing to the Situation in Venezuela

    DELLA (VRUB7)

    • Vessel Type: Crude Oil Tanker
    • Flag: Hong Kong
    • Other Vessel Flag: China
    • Vessel Year of Build: 2001
    • Vessel Registration Identification: IMO 9227479
    • MMSI: 477714500

    Linked to: ARIES GLOBAL INVESTMENT LTD

    The Treasury press release identifies this vessel as blocked property in which ARIES GLOBAL INVESTMENT LTDhas an interest. It has been used to transport Venezuelan oil.

    NORD STAR (3E7463)

    • Vessel Type: Crude Oil Tanker
    • Flag: Panama
    • Vessel Year of Build: 2006
    • Vessel Registration Identification: IMO 9323596
    • MMSI: 352003296

    Linked to: KRAPE MYRTLE CO LTD; CORNIOLA LIMITED

    According to the Treasury press release, this vessel is blocked property in which CORNIOLA LIMITED and KRAPE MYRTLE CO LTD have an interest. It has been used to transport Venezuelan oil.

    ROSALIND

    AKAs: LUNAR TIDE

    • Vessel Type: Oil Products Tanker
    • Flag: Guinea
    • Vessel Year of Build: 2004
    • Vessel Registration Identification: IMO 9277735

    Linked to: WINKY INTERNATIONAL LIMITED

    The Treasury press release identifies this vessel as blocked property in which WINKY INTERNATIONAL LIMITEDhas an interest. It has been used to transport Venezuelan oil.

    VALIANT (VRXH3)

    • Vessel Type: Crude Oil Tanker
    • Flag: Hong Kong
    • Other Vessel Flag: China
    • Vessel Year of Build: 2009
    • Vessel Registration Identification: IMO 9409247
    • MMSI: 477206500

    Linked to: ARIES GLOBAL INVESTMENT LTD

    Based on the Treasury press release, this vessel is identified as blocked property in which ARIES GLOBAL INVESTMENT LTD has an interest.

    So, this was a result of trial and error – and asking Gemini what went wrong a few times. I learned the following things:

    • Originally, Gemini added “Linked to” data to the entities, linking them to the vessels that linked back to them. I had to add a line to the prompt to tell it to report what was actually in the listing and not infer Linked to data
    • WordPress sometimes does not play nicely with Gemini without manual intervention:
      • Hyperlinks sometimes will be preserved, and sometimes will get lost. However, they work just fine outside a standard paragraph – like, in a heading block.
      • Certain formatting, like bolding and italics, are preserved in a WordPress paragraph – centering is definitely not. Originally, Gemini gave me the <center></center> HTML tags around the text I wanted centered. I had a handful of options – center the text manually, give up on the centering, make the line into a header line or use a Custom HTML block.
  • I’ve done a number of Gemini prompts where I’ve asked it to explain, with sources, various topics. And, not infrequently, after each piece of the response which has a corresponding source behind it, Gemini gives me a linkage symbol. And, when you copy and paste it into a blog post, those linkages become a series of numerical footnotes… without the cross-reference to the source. And some of these are duplicated (I asked it whether or not that was true).

    Do I really want to bore a non-expert with all of these? Do you really need to know that this snippet came from that source? Of course not – but I did want to make Gemini show its work.

    So, I came up with this:

    Instead of inserting citation markers throughout the response , provide a source list, including URLs in parentheses (as appropriate), at the end of the response. If multiple citations refer to the same base domain, refer to the base domain instead of the specific page.

    It may not be perfect, but it seems to work – I used it on that “nunation” post.

    If someone has better ideas, let me know. I’m sure there are equivalent terms to “base domain” – I certainly didn’t want to use “TLD”, although I’m sure I could have said “DNS address for the most specific common URL” or some such.

    Note: Gemini refers to these as source markers or citation markers. What other AI engines call them – or how they’re represented in responses – I can’t say. At some point, might I have a shootout with ChatGPT, CoPilot, Claude, etc? Sure… but not today.

    ,