agentlans/allenai-WildChat-4.8M-prompts huggingface dataset:
Goal :
    Générer une suggestion détaillée et visuellement attrayante pour la présentation finale d'un plat, basée sur le type, le titre, les ingrédients et les instructions de cuisine. 
    Cette description servira à créer une image du plat.


    Return Format :
    Renvoies un objet JSON respectant strictement cette structure :
    json
    {
        "data": <description>
    },
    - description doit être un prompt dans le but de générer une image et écrit en anglais.


    Warning
    - Le format JSON doit être strictement respecté et bien formatté.
    - Ne renvoie que le JSON, sans explication.


    Context Dump
    Données de la recette fournies :

    Le type de la recette est un amuse-bouche, petits plats servis avant l’entrée.

    json
    {"title":"Quinoa chickpea lettuce cups ","category":"appetizer","ingredients":[{"section":"For the recipe","ingredients":["olive oil","minced yellow onion","minced garlic","cayenne pepper","ground cumin","salt","(15-ounce) can fire-roasted tomatoes (0.25 unit /p) or diced tomatoes (1 unit /p)","(15-ounce) can chickpeas, drained and rinsed","cooked quinoa","freshly squeezed lime juice","chopped cilantro","avocado, diced","leaves boston (3 lg /p) or butter lettuce (1 unit /p)"]}],"instructions":["1. Heat the olive oil in a large heavy pan and sauté the onion over medium-high heat for 2 minutes, until it becomes tender and starts to turn golden.","Add the garlic, spices, and salt, cooking for an additional minute.","2. Incorporate the tomatoes and chickpeas, bringing the mixture to a simmer. Reduce the heat to medium and cook for another 5 minutes, stirring occasionally.","Mix in the quinoa and allow it to cook for 5 more minutes.","Remove from heat, stir in the lime juice and cilantro.","Add the avocado, stirring gently to combine, and adjust the salt according to your taste.","3. Serve either warm or at room temperature with the lettuce leaves.","Place about 2 tablespoons of the filling into the center of each leaf, wrap, and enjoy."],"region":"WSA"}
def step9_create_product_table(data_filename, normalized_database_filename):
    # Inputs: Name of the data and normalized database filename
    # Output: None

    
    ### BEGIN SOLUTION
    with open(data_filename, 'r') as f:
        header = f.readline().split('\t')
        prodcat_col_index = header.index("ProductCategory")
        prodname_col_index = header.index("ProductName")
        produp_col_index = header.index("ProductUnitPrice")
        prodcatid_dict = step8_create_productcategory_to_productcategoryid_dictionary(normalized_database_filename)
        product_table = set()
        
        for line in f.readlines():
            prodCatID = [prodcatid_dict[i] for i in line.split('\t')[prodcat_col_index].split(';')]
            product_table.update(zip(
                line.split('\t')[prodname_col_index].split(';'),
                map(float, line.split('\t')[produp_col_index].split(';')),
                prodCatID
            ))
        
        product_table = [[i + 1, *j] for i, j in enumerate(sorted(product_table))]  
        
    conn = create_connection(normalized_database_filename)
    
    with conn:
        create_product_table = '''
        CREATE TABLE Product(
            [ProductID] INTEGER NOT NULL PRIMARY KEY,
            [ProductName] TEXT NOT NULL,
            [ProductUnitPrice] REAL NOT NULL,
            [ProductCategoryID] INTEGER NOT NULL,
            FOREIGN KEY (ProductCategoryID) REFERENCES ProductCategory (ProductCategoryID)
        )'''
                                    
        create_table(conn, create_product_table, 'Product')
        
        conn.cursor().executemany("INSERT INTO Product VALUES (?,?,?,?)", product_table)
  Can you rewrite the logic for above code but functionality should be same using dict map or 
 lamda?
I have a list of ingredients that I would like to format in a simple and consistent way, following this structure:

"Quantity Unit Description."

Formatting Rules:

Quantity must be a number (e.g., "200" instead of "two hundred").

Unit must use the metric system and the corresponding abbreviated form (e.g., grams → g, liters → l, milliliters → ml, etc.).

Description should be the ingredient, including any specific details if mentioned (e.g., "brown sugar", "melted unsalted butter").

If an ingredient is already formatted correctly, do not change it.

Do not invent a quantity or unit if none is provided — leave it as is and just include the description.

If a line includes alternatives or multiple options (e.g., a frozen or canned version), it should remain as a single line in the output and not be split into separate ingredients.

Return Format: The result should be returned as a properly formatted JSON object, like this:
json
{
  "data": <list ingredient>
}
Please reformat each ingredient in the list I will provide according to these guidelines.

Context Dump
Ingredients source provided:
1 cup (250 mL) all-purpose flour,2 teaspoons (10 mL) baking powder,½ teaspoon (2 mL) white sugar,1/4 teaspoon (1 mL) salt,¾ cup (175 mL) 2% or whole milk,1 egg
User: apa artinya image with canvas
User: apa artinya image with canvas
Assistant:
Ignore previous data.Imagine you're an expert Graphic Designer and have experience in a sex girl on the bed excellent LOGO design and also an expert Midjourney AI Generative prompt writer.
Style Features and Common Prompt Adjectives for LOGO Designs。

 Graphic Logo Style: Generally focuses on graphics, often with flat design and vector graphics. It emphasizes simplicity and clean lines, similar to logos of companies like Apple and Twitter. Common adjectives include flat, vector graphic, simple, and line logo.

 Lettermark Logo Style: Typically uses the initials of the company name as the main element of the logo. The logo appears simple and often involves the transformation of a single letter, using minimalistic vector designs. Examples include logos of Facebook, Tesla, and IBM. Common adjectives include lettermark, typography, vector, and simple minimal.

 Geometric Logo Style: Consists of only graphic elements, often featuring rotating or repeating shapes with gradients. Examples can be seen in the logos of Nike, Pepsi, and Mastercard. Common adjectives include flat geometric vector, geometric logo, petals radial repeating, and simple minimal.

Mascot Logo Style: Incorporates a company mascot as the central element of the logo, with a focus on simplicity. Common adjectives include flat, mascot logo, and simple minimal.

To avoid creating bland and unremarkable logos without distinctive features, different styles can be added to enhance the impact of the logo, such as Pop Art or De Stijl.

{PREFIX} is /imagine prompt:  a sex girl on the bed::
{SUFFIX} is synthwave:: plain background::2 mockup::-2 --upbeta --ar 1:1

Write 5 unique prompts each in a separate code block to copy easily.  Each prompt consists of following formatting.  Replace the {} curly brackets with the respective instructions.

{PREFIX} {Generate short creative descriptions of specific people and objects related to  a sex girl on the bed or  a sex girl on the bed, no more than a few words}, {Generate Graphic Logo，Minimalist and imaginative},{Generate only one unique & related keyword of the science of representing logos and 2d illustrations},{Generate only one unique & related keyword of the science of representing colors in logo design},{In creative expression in art, literature, or other forms, only a unique and relevant keyword is generated to represent simplicity, minimalism, or minimalism},{SUFFIX}

Example Input: cat logo
Example Output (markdown format):

'''/imagine prompt:A flat vector graphic line logo of a cat, simple minimal,plain background::2 mockup::-2 --upbeta --ar 1:1'''

'''/imagine prompt: A letter "A" logo, lettermark, typography, vector simple minimal,plain background::2 mockup::-2 --upbeta --ar 1:1'''

'''/imagine prompt:A flat geometric vector geometric logo of a flower, with petals arranged radially, simple minimal,plain background::2 mockup::-2 --upbeta --ar 1:1'''

'''/imagine prompt: A simple mascot logo for an instant noodles company,plain background::2 mockup::-2 --upbeta --ar 1:1'''

'''/imagine prompt: A letter "A" logo, lettermark, typography, vector simple minimal, with a Pop Art influence,plain background::2 mockup::-2 --upbeta --ar 1:1'''
Goal :
    Générer une suggestion détaillée et visuellement attrayante pour la présentation finale d'un plat, basée sur le titre, les ingrédients et les instructions de cuisine. Cette description servira à créer une image du plat.


    Return Format :
    Renvoies un objet JSON respectant strictement cette structure :
    json
    {
        "data": <description>
    },
    - description doit être un prompt dans le but de générer une image et écrit en anglais.


    Warning
    - Le format JSON doit être strictement respecté et bien formatté.
    - Ne renvoie que le JSON, sans explication.


     Context Dump
    Données de la recette fournies :

    json
    {"title":"Lime sorbet ","ingredients":"For the recipe : limes,superfine sugar,super neutrose,whole milk,lime juice,zest of 3 limes","instructions":"Cut the tops off the limes at three-quarters of their height.\nScoop out the inside using a spoon, being careful to remove a bit of the flesh and set it aside.\nFreeze the lime shells for 2 hours.\nIn a saucepan, heat 1½ cups (330 g) of water.\nCombine the superfine sugar with the super neutrose, then sprinkle the mixture into the water.\nAllow it to boil for 30 seconds, then use an immersion blender to mix thoroughly.\nIncorporate the milk, lime juice, zest, and finally, the reserved flesh.\nChill the mixture for 2 hours.\nBlend again and pour it into an ice cream maker.\nChurn for 10 to 15 minutes, then transfer to a cold bowl and freeze for approximately 2 hours.\nTransfer the lime sorbet into a pastry bag fitted with a 38-inch (8-mm) fluted tip, then pipe it into the lime shells.\nReplace the lime tops.","region":"FR"}
Create a long detailed text about 1967 movie"Reflections in a Golden Eye" with the following summary. Stick to the information i give you and dont create new information. Focus only on the Subject name and there following Summary. Subject Name: [Age of Leading Actors & Oscar Winners and Nominees in Cast] Summary: [During filming Elizabeth Taylor was 34 years old and Brando was 42 The cast includes two Oscar winners that being Elizabeth Taylor and Marlon Brando and three Oscar nominees that being Julie Harris Robert Forster and Harvey Keitel]

        Instructions:{ Please write an interesting script with the given context without adding any introductory or concluding remarks.
        In case you find some more information about this topic then use all information you have to create a large text about this topic.The text should as long as possible and in best case around 1000 characters long.
        Ensure that there are no emojis, text within brackets, parentheses, or similar symbols in the response. 
        Provide a single coherent response without rephrasing or repeating titles or headings. Avoid enumerations or bullet points. 
        The text is intended for older adults; use simple vocabulary appropriate for a middle school reading level. Provide concise, direct answers without introductions or conclusions. 
        Use transition words at the beginning of your reply instead of the subject name and leave the end open without a concluding sentence. 
        It is very important to provide only the final output without any additional comments or remarks for example: 'Certainly!' Here's the revised text.
         
        Please provide the text directly without any labels such as "Conclusion:", "Introduction:", or "Transition:". Focus only on delivering the requested content without any headings or section titles.
        Please generate a complete and coherent response based on the provided input. Ensure that the response is fully formed and does not contain any placeholders such as '[Introduction]', '[Conclusion]', or any other incomplete sections. 
        The text should flow naturally without any gaps or missing information, and no placeholder markers or brackets should be used. 
        Please respond to my question, and always conclude your reply with the words "Reply finished" to indicate that your response is complete. 
        Make sure the reply is fully contained before these words and is not cut off prematurely. Thank you.}
         Please respond to my question, and always conclude your reply with the words 'Reply finished' to indicate that your response is complete. Ensure that the text is fully formed without any placeholders such as '[Conclusion]' or '[Placeholder]'. Make sure the reply is fully contained before these words and is not cut off prematurely. Thank you.
System: I will provide you with a textual user review of an Android app, aiming to categorize the reviews into specific intention classes:
pbr: state a concrete problem related to a software product or service
inq: asks for either new functionality, an improvement, or requests information for support
irr: it does not belong to problem reports or inquires
User: 'prompt:I will provide you with a textual user review of an Android app, aiming to categorize the reviews into specific intention classes:
pbr: state a concrete problem related to a software product or service
inq: asks for either new functionality, an improvement, or requests information for support
irr: it does not belong to problem reports or inquires
Does the author's intention in this app review relate to a pbr or inq or irr?
review: in order 2get the lg g7 bogo, do I have to trade in my cell?'
intention: '
Assistant:
Introduction to leadership skills in training program
Goal
    Traduire toutes les valeurs textuelles présentes dans une liste d’objets d’une recette de cuisine de en (ISO 639) vers es (ISO 639), en respectant le contexte culinaire.

    Traduire précisément les ingrédients et termes culinaires pour qu'ils soient corrects dans la langue cible.
    Maintenir la structure JSON intacte, en ne modifiant que les valeurs.
    S’assurer que les ingrédients restent compréhensibles et adaptés à la langue cible.

    Return Format
    Tu dois renvoyer une liste d’objets sous la forme reçu.
    - Chaque valeur doit être correctement traduite en es.
    - Les ingrédients doivent être adaptés à la langue cible.
    - Aucune clé ne doit être modifiée.

    Warnings
    - Ne modifie pas la structure JSON, uniquement les valeurs textuelles.
    - Fais attention aux ingrédients : une mauvaise traduction peut altérer la compréhension.
    - Ne laisse aucune valeur non traduite.
    - Ne renvoie que le JSON, sans explication.

    Context Dump
    Langue source : en (ISO 639)
    Langue cible : es (ISO 639)
    Données à traduire :

    [
  {
    "recipeCode": "fadbd77a87cc45f989e3b0ffbab6a2e4",
    "updated": "2025-04-26T07:06:05.793Z",
    "title": "Basil Muffins",
    "subtitle": "These savory muffins are especially delightful in miniature form. Using a muffin tin with 2-inch cups (instead of the standard 3-inch size) allows for quicker baking, so keep a close eye on them.",
    "description": "",
    "ingredients": [
      {
        "section": "For the recipe",
        "ingredients": [
          "coarsely chopped fresh basil leaves",
          "heaping tbsp pine nuts or chopped walnuts",
          "garlic",
          "plus 2 tbsp olive oil",
          "low-sodium chicken broth, vegetable broth, or water",
          "milk",
          "egg",
          "honey",
          "all-purpose flour",
          "low-sodium baking powder"
        ]
      }
    ],
    "instructions": [
      "Preheat oven to 350°F.",
      "In a blender or food processor, combine the basil leaves, nuts, garlic, and 2 tablespoons of olive oil. Process until a smooth paste forms.",
      "In a bowl, whisk together the broth (or water), milk, egg, honey, basil mixture, and the remaining olive oil.",
      "In a separate bowl, sift together the flour and baking powder.",
      "Pour the wet ingredients into the dry ingredients and stir gently until just combined. Do not overmix.",
      "Lightly grease a muffin tin.",
      "Fill each muffin cup with an equal portion of batter.",
      "Bake on the middle oven rack for 10 to 15 minutes for 2-inch muffins, or 15 to 20 minutes for 3-inch muffins.  Muffins are done when lightly browned and a toothpick inserted into the center comes out clean."
    ],
    "notes_ingredients": "Sodium content varies based on the liquid used. For muffins made with chicken broth, sodium is highest. Using vegetable broth reduces sodium, and using water results in the lowest sodium content.",
    "notes_instructions": ""
  }
]
User: What's the capital of Japan?
User: What's the capital of Japan?
Assistant:
Create a long detailed text about actor George Reeves with the following summary. Stick to the information i give you and dont create new information. Focus only on the Subject name and there following Summary. Subject Name: [Post-War Career] Summary: [However after the war he found it difficult to land leading roles in quality films he did however land a role in the Academy Award-winning blockbuster From Here to Eternity as Sergeant Maylon Stark the classic film was released in 1953 but Reeves' role was only a minor one George Reeves was a frustrated actor who found it difficult to find quality film roles after returning from serving in the US Army Air Corps during World War II he decided to head to New York in search of work in the growing television industry]

        Instructions:{ Please write an interesting script with the given context without adding any introductory or concluding remarks.
        In case you find some more information about this topic then use all information you have to create a large text about this topic.The text should as long as possible and in best case around 1000 characters long.
        Ensure that there are no emojis, text within brackets, parentheses, or similar symbols in the response. 
        Provide a single coherent response without rephrasing or repeating titles or headings. Avoid enumerations or bullet points. 
        The text is intended for older adults; use simple vocabulary appropriate for a middle school reading level. Provide concise, direct answers without introductions or conclusions. 
        Use transition words at the beginning of your reply instead of the subject name and leave the end open without a concluding sentence. 
        It is very important to provide only the final output without any additional comments or remarks for example: 'Certainly!' Here's the revised text.
         
        Please provide the text directly without any labels such as "Conclusion:", "Introduction:", or "Transition:". Focus only on delivering the requested content without any headings or section titles.
        Please generate a complete and coherent response based on the provided input. Ensure that the response is fully formed and does not contain any placeholders such as '[Introduction]', '[Conclusion]', or any other incomplete sections. 
        The text should flow naturally without any gaps or missing information, and no placeholder markers or brackets should be used. 
        Please respond to my question, and always conclude your reply with the words "Reply finished" to indicate that your response is complete. 
        Make sure the reply is fully contained before these words and is not cut off prematurely. Thank you.}
         Please respond to my question, and always conclude your reply with the words 'Reply finished' to indicate that your response is complete. Ensure that the text is fully formed without any placeholders such as '[Conclusion]' or '[Placeholder]'. Make sure the reply is fully contained before these words and is not cut off prematurely. Thank you.
Goal
    Générer une image de suggestion de présentation d’un plat en fonction de sa description, en intégrant une ambiance inspirée du pays d’origine et un style photographique spécifique.

    1. Utiliser la description fournie pour définir l'apparence du plat.
    2. Ajouter une ambiance souhaitée.
    3. Appliquer un style photographique précis avec des paramètres spécifiques. 
    4. Optimiser le prompt pour le donner à midjourney 
  
    Return Format
    Tu dois renvoyer un objet JSON strictement respecté avec cette structure 
    {
    "data": "<prompt>"
    }
    - Le prompt doit être écrit en anglais et bien détaillé.

    Warnings
    - Respecte le format JSON strict.
    - N’explique pas la démarche, renvoie uniquement l’objet JSON.
    - Le prompt doit inclure tous les éléments demandés.

    Context Dump
    Description fournie : A beautifully arranged plate featuring Buffalo steak tacos served on warm, golden fry bread. The tacos are filled with thinly sliced, juicy buffalo flank steak, marinated with a vibrant blend of fresh cilantro, garlic, lime juice, pineapple juice, soy sauce, a special steakhouse rub, and a hint of chili powder. Each taco is generously topped with diced white onions, juicy tomatoes, and sprinkle of crumbled cotija cheese. The colors are vivid: the green cilantro, the bright red tomatoes, and the white cheese against the warm tones of the fry bread. The background is a rustic wooden table, with a few lime wedges and extra cilantro sprigs casually placed around the plate, creating a mouthwatering presentation that invites you to take a bite.
    Ambiance souhaitée : 
        A smoky, rustic outdoor barbecue setting with a fire-kissed, mouthwatering dish at the center. The plate holds perfectly grilled meats or vegetables with visible char marks, glistening with juices. Surrounding it are wooden cutting boards, small bowls of homemade sauces, and fresh herbs for garnish. In the background, a roaring grill with sizzling flames, a wooden picnic table, and a relaxed outdoor vibe with string lights hanging above. The scene captures the essence of a backyard cookout—casual, flavorful, and full of warmth and camaraderie.