diff --git a/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_CUSTOM_METRIC_HERE/custom-llm-metric.json b/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_CUSTOM_METRIC_HERE/custom-llm-metric.json new file mode 100644 index 0000000000..fbce301d64 --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_CUSTOM_METRIC_HERE/custom-llm-metric.json @@ -0,0 +1,34 @@ +{ + "createdAt": "2025-08-18 09:38:01.990700", + "name": "groundedness", + "scenario": "genai-evaluations", + "version": "0.0.1", + "evaluationMethod": "llm-as-a-judge", + "metricType": "evaluation", + "managedBy": "imperative", + "systemPredefined": false, + "spec": { + "promptType": "free-form", + "configuration": { + "modelConfiguration": { + "name": "gpt-4o", + "version": "2024-08-06", + "parameters": [ + { + "key": "temperature", + "value": "0.1" + }, + { + "key": "max_tokens", + "value": "110" + } + ] + }, + "promptConfiguration": { + "systemPrompt": "You should strictly follow the instruction given to you. Please act as an impartial judge and evaluate the quality of the responses based on the prompt and following criteria:", + "userPrompt": "You are an expert evaluator. Your task is to evaluate the quality of the responses generated by AI models. We will provide you with a reference and an AI-generated response. You should first read the user input carefully for analyzing the task, and then evaluate the quality of the responses based on the criteria provided in the Evaluation section below. You will assign the response a rating following the Rating Rubric and Evaluation Steps. Give step-by-step explanations for your rating, and only choose ratings from the Rating Rubric.\n\n## Metric Definition\nYou are an INFORMATION OVERLAP classifier providing the overlap of information between a response and reference.\n\n## Criteria\nGroundedness: The of information between a response generated by AI models and provided reference.\n\n## Rating Rubric\n5: (Fully grounded). The response and the reference are fully overlapped.\n4: (Mostly grounded). The response and the reference are mostly overlapped.\n3: (Somewhat grounded). The response and the reference are somewhat overlapped.\n2: (Poorly grounded). The response and the reference are slightly overlapped.\n1: (Not grounded). There is no overlap between the response and the reference.\n\n## Evaluation Steps\nSTEP 1: Assess the response in aspects of Groundedness. Identify any information in the response and provide assessment according to the Criteria.\nSTEP 2: Score based on the rating rubric. Give a brief rationale to explain your evaluation considering Groundedness.\n\nReference: {{?reference}}\nResponse: {{?aicore_llm_completion}}\n\nBegin your evaluation by providing a short explanation. Be as unbiased as possible. After providing your explanation, please rate the response according to the rubric and outputs STRICTLY following this JSON format:\n\n{ \"explanation\": string, \"rating\": integer }\n\nOutput:\n", + "dataType": "numeric" + } + } + } +} \ No newline at end of file diff --git a/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_CUSTOM_METRIC_HERE/custom-llm-metric.jsonl b/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_CUSTOM_METRIC_HERE/custom-llm-metric.jsonl new file mode 100644 index 0000000000..c73e47a55e --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_CUSTOM_METRIC_HERE/custom-llm-metric.jsonl @@ -0,0 +1 @@ +{"createdAt":"2025-08-18 09:38:01.990700","name":"groundedness","scenario":"genai-evaluations","version":"0.1.6","evaluationMethod":"llm-as-a-judge", "metricType":"evaluation", "managedBy":"imperative","systemPredefined":false,"spec":{"promptType":"free-form","configuration":{"modelConfiguration":{"name":"gpt-4o","version":"2024-08-06","parameters":[{"key":"temperature","value":"0.1"},{"key":"max_tokens","value":"110"}]},"promptConfiguration":{"systemPrompt":"You should strictly follow the instruction given to you. Please act as an impartial judge and evaluate the quality of the responses based on the prompt and following criteria:","userPrompt":"You are an expert evaluator. Your task is to evaluate the quality of the responses generated by AI models. We will provide you with a reference and an AI-generated response. You should first read the user input carefully for analyzing the task, and then evaluate the quality of the responses based on the criteria provided in the Evaluation section below. You will assign the response a rating following the Rating Rubric and Evaluation Steps. Give step-by-step explanations for your rating, and only choose ratings from the Rating Rubric.\n\n## Metric Definition\nYou are an INFORMATION OVERLAP classifier providing the overlap of information between a response and reference.\n\n## Criteria\nGroundedness: The of information between a response generated by AI models and provided reference.\n\n## Rating Rubric\n5: (Fully grounded). The response and the reference are fully overlapped.\n4: (Mostly grounded). The response and the reference are mostly overlapped.\n3: (Somewhat grounded). The response and the reference are somewhat overlapped.\n2: (Poorly grounded). The response and the reference are slightly overlapped.\n1: (Not grounded). There is no overlap between the response and the reference.\n\n## Evaluation Steps\nSTEP 1: Assess the response in aspects of Groundedness. Identify any information in the response and provide assessment according to the Criteria.\nSTEP 2: Score based on the rating rubric. Give a brief rationale to explain your evaluation considering Groundedness.\n\nReference: {{?reference}}\nResponse: {{?aicore_llm_completion}}\n\nBegin your evaluation by providing a short explanation. Be as unbiased as possible. After providing your explanation, please rate the response according to the rubric and outputs STRICTLY following this JSON format:\n\n{ \"explanation\": string, \"rating\": integer }\n\nOutput:\n","dataType":"numeric"}}}} \ No newline at end of file diff --git a/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_DATASET_HERE/medicalqna_dataset.csv b/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_DATASET_HERE/medicalqna_dataset.csv new file mode 100644 index 0000000000..21ad421d1b --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_DATASET_HERE/medicalqna_dataset.csv @@ -0,0 +1,70 @@ +question,sentiment,reference +how does rivatigmine and otc sleep medicine interact,Interaction,"tell your doctor and pharmacist what prescription and nonprescription medications, vitamins, nutritional supplements, and herbal products you are taking or plan to take. Be sure to mention any of the following: antihistamines; aspirin and other nonsteroidal anti-inflammatory medications (NSAIDs) such as ibuprofen (Advil, Motrin) and naproxen (Aleve, Naprosyn); bethanechol (Duvoid, Urecholine); ipratropium (Atrovent, in Combivent, DuoNeb); and medications for Alzheimer's disease, glaucoma, irritable bowel disease, motion sickness, ulcers, or urinary problems. Your doctor may need to change the doses of your medications or monitor you carefully for side effects." +how does valium affect the brain,Action,"Diazepam is a benzodiazepine that exerts anxiolytic, sedative, muscle-relaxant, anticonvulsant and amnestic effects. Most of these effects are thought to result from a facilitation of the action of gamma aminobutyric acid (GABA), an inhibitory neurotransmitter in the central nervous system." +what is morphine,Information,Morphine is a pain medication of the opiate family which is found naturally in a number of plants and animals.[5][7] It acts directly on the central nervous system (CNS) to decrease the feeling of pain. +what are the milligrams for oxycodone e,Dose,� 10 mg � 20 mg � 40 mg � 80 mg ... +81% aspirin contain resin and shellac in it. ?,Ingredient,Inactive Ingredients Ingredient Name +what is desonide ointment used for,Indication,"Desonide is used to treat the redness, swelling, itching, and discomfort of various skin conditions, including psoriasis (a skin disease in which red, scaly patches form on some areas of the body and eczema (a skin disease that causes the skin to be dry and itchy and to sometimes develop red, scaly rashes)." +how soon can tylenol be taken after a cocktail?,Interaction,"According to the National Health Service (NHS) in the UK, it is usually safe to drink a small amount of alcohol while taking this pain reliever. ... However, when people take acetaminophen at high doses or together with alcohol, it can cause side effects ranging from minor to severe, with the possibility of fatal liver damage. This risk may be higher for people with alcohol use disorder (AUD), which was previously known as alcoholism.... According to the U.S. National Library of Medicine, taking acetaminophen can be dangerous for people who regularly drink alcohol. Manufacturers currently recommend that people who have more than 3 alcoholic drinks per day should ask their doctor before taking acetaminophen." +breo inhaler how it works,Action,"The combination of fluticasone and vilanterol is used to control wheezing, shortness of breath, coughing, and chest tightness caused by asthma and chronic obstructive pulmonary (COPD; a group of diseases that affect the lungs and airways, that includes chronic bronchitis and emphysema). Fluticasone is in a class of medications called steroids. It works by reducing swelling in the airways. Vilanterol is in a class of medications called long-acting beta-agonists (LABAs). It works by relaxing and opening air passages in the lungs, making it easier to breathe." +breo inhaler how it works,Usage,"To use the inhaler, follow these steps: + 1 If you will be using a new inhaler for the first time, remove it from the box and the foil wrapper. Fill in the ""Tray opened"" and ""Discard"" blanks on the inhaler label with the date that you opened the pouch and the date 6 weeks later when you must replace the inhaler. + 2 When you are ready to inhale your dose, slide the cover down to expose the mouthpiece until it clicks. If you open and close the inhaler without using your dose, you will waste the medication. + 3 The counter will count down by 1 each time you open the cover. If the counter does not count down, your inhaler will not provide the medicine. If your inhaler does not count down, call your pharmacist or doctor. + 4 Hold the inhaler away from your mouth and breathe out as far as you comfortably can. Do not breathe out into the mouthpiece. + 5 Put the mouthpiece between your lips, and close your lips firmly around it. Take a long, steady, deep breath in through your mouth. Do not breathe in through your nose. Be careful not block the air vent with your fingers. + 6 Remove the inhaler from your mouth, and hold your breath for about 3 to 4 seconds or as long as you comfortably can. Breathe out slowly. + 7 You may or may not taste or feel the medicine released by the inhaler. Even if you do not, do not inhale another dose. If you are not sure you are getting your dose of fluticasone and vilanterol, call your doctor or pharmacist. + 8 You may clean the mouthpiece with a dry tissue, if needed. Slide the cover up over the mouthpiece as far as it will go to close the inhaler. + 9 Rinse your mouth with water, but do not swallow. +Ask your pharmacist or doctor for a copy of the manufacturer's information for the patient." +qvar 40mg what is it for,Indication,"QVAR is indicated in the maintenance treatment of asthma as prophylactic therapy in patients 5 years of age and older. QVAR is also indicated for asthma patients who require systemic corticosteroid administration, where adding QVAR may reduce or eliminate the need for the systemic corticosteroids." +does cyclosporine ophthalmic helps for iritis?,Indication,This study showed improvement of recurrent anterior uveitis [iritis] in patients while on conventional treatment with cyclosporine A 0.05% compared with conventional treatment alone. +what ingredient in walnut interferes with synthroid drug absorption,Interaction,"Dietary fiber: Certain dietary fiber sources can impede absorption of the thyroid hormone replacement medication. Mayo Clinic staff say it is best to avoid dietary fiber in foods like walnuts, soy products, iron supplements and multivitamins containing iron." +what is the color of the fluvaastatin pill,Appearance,Product Characteristics Color RED (rust) +"is penicillin in the pill ""montelukast?""",Ingredient,"What are the ingredients in montelukast sodium tablets? + +Active ingredient: montelukast sodium, USP + +Inactive ingredients: + +10 mg tablet: croscarmellose sodium, hydroxypropyl cellulose, lactose monohydrate, magnesium stearate, and microcrystalline cellulose. The film coating contains: black iron oxide, hydroxypropyl cellulose, hypromellose, red iron oxide, titanium dioxide, and yellow iron oxide." +"can i take metamucil with ""ciprofloxacin?""",Interaction,"diarrhea is a common problem caused by antibiotics which usually ends when the antibiotic is discontinued. Sometimes after starting treatment with antibiotics, patients can develop watery and bloody stools (with or without stomach cramps and fever) even as late as two or more months after having taken the last dose of the antibiotic. If this occurs, patients should contact their physician as soon as possible.�" +how long before a meal should lansoprazole be taken,Usage,Swallow 1 capsule with a glass of water before eating in the morning. +what does using fluorouracil make your face look like,Side effects,"The most frequent adverse reactions to Fluorouracil 5% Topical Cream occur locally and are often related to an extension of the pharmacological activity of the drug. These include burning, crusting, allergic contact dermatitis, erosions, erythema, hyperpigmentation, irritation, pain, photosensitivity, pruritus, scarring, rash, soreness and ulceration." +why did my doctor give me level iracetam,Indication,Levetiracetam is used in combination with other medications to treat certain types of seizures in adults and children with epilepsy. Levetiracetam is in a class of medications called anticonvulsants. It works by decreasing abnormal excitement in the brain. +results of stopping terazosin?,Usage,"The effect of withdrawal of terazosin therapy in patients with mild to moderate hypertension was assessed in two double-blind, placebo-controlled studies. All patients had demonstrated a stable blood pressure response to terazosin prior to withdrawal of the drug. Patients were randomly assigned either to continue treatment with terazosin at a previously established dose that had brought blood pressure under control (dose range: 1 to 40 mg daily) or to receive a matching placebo. At the end of a six- or eight-week withdrawal period, placebo-treated patients experienced mean increases of 7.3 and 12.4 mm Hg in supine diastolic blood pressure (studies M81-020 and M81-028 site 1, respectively). These increases were significantly greater than those observed for patients who continued to receive terazosin. Similar results were observed in other blood pressure variables. Withdrawal of terazosin was accompanied by a significant weight loss (2.8 and 3.6 pounds in studies M81-020 and M81-028, respectively). There were no clinically significant changes in pulse rates, physical examinations, laboratory test results, or electrocardiograms. Headache was the most common adverse experience reported by those who received placebo during the drug withdrawal period. These studies demonstrate that withdrawal of terazosin therapy is associated with an increase in supine diastolic blood pressure, often to hypertensive levels, without signs of a withdrawal syndrome." +what meloxicam look like,Appearance,Product Characteristics Color YELLOW (light yellow) Score no score Shape OVAL Size 3mm Imprint Code S160 +nitroglycerin how often,Usage,"One tablet should be dissolved under the tongue or in the buccal pouch at the first sign of an acute anginal attack. The dose may be repeated approximately every 5 minutes until relief is obtained. If the pain persists after a total of 3 tablets in a 15-minute period, or if the pain is different than is typically experienced, prompt medical attention is recommended. Nitroglycerin may be used prophylactically 5 to 10 minutes prior to engaging in activities that might precipitate an acute attack." +whate is vitamin c chemicl symple ?,Information,Active Ingredient/Active Moiety ... ASCORBIC ACID ... +what is the maximum dose of pregabalin,Dose,"In view of the dose-dependent adverse reactions, treatment with doses above 300 mg/day is not recommended" +how long does marijuana it stay in system,Action/time,"The effects of marijuana usually last from 1 to 3 hours, but marijuana can stay in the body for days or even weeks after use. Organs in the body have fatty tissues that absorb the THC in marijuana. In general, standard urine tests can detect THC several days after use. In people who use heavily, however, urine tests can sometimes detect THC for several weeks." +neupro and ropinirole when is it safe to take,Interaction,"Anxiolytics; Sedatives; and Hypnotics: (Moderate) A reduction in the dose of anxiolytics, sedatives, hypnotics and concomitantly administered dopamine agonists with sedative properties (e.g., ropinirole, pramipexole, rotigotine, apomorphine) should be considered to minimize additive sedative effects. In addition, the risk of next-day psychomotor impairment is increased during co-administration, which may decrease the ability to perform tasks requiring full mental alertness such as driving." +neupro and ropinirole when is it safe to take,Comparison,"Switching from oral dopamine agonists to rotigotine: An open-label study of 99 subjects with Parkinson�s disease was conducted in which the subjects, previously treated with 3 to 12mg/day ropinirole with or without levodopa, were converted to treatment with transdermal rotigotine. The following dosage conversion was utilized; 3mg/day ropinirole to 2mg/24 hours rotigotine, 6mg/day ropinirole to 4mg/24 hours rotigotine, 8-9mg/day ropinirole to 6mg/24 hours rotigotine, 12mg/day ropinirole to 8mg/24 hours rotigotine. Patients were instructed to take their last dose of ropinirole in the afternoon or evening, applying a rotigotine patch the next morning upon awakening. Overall this study determined that an overnight switch from ropinirole to rotigotine was generally well tolerated without loss of efficacy." +what is prevnar >65,Information,The pneumococcal conjugate vaccine (PCV13 or Prevnar 13�) protects against 13 types of pneumococcal bacteria. CDC recommends PCV13 for use in infants and young children and adults 65 years or older. +how many mg does it take to overdose on oxycodone,Overdose,"OXYCODONE HCl CONTROLLED-RELEASE 80 mg and 160 mg Tablets, or a single dose greater than 40 mg, ARE FOR USE IN OPIOID-TOLERANT PATIENTS ONLY. A single dose greater than 40 mg, or total daily doses greater than 80 mg, may cause fatal respiratory depression when administered to patients who are not tolerant to the respiratory depressant effects of opioids." +what medication not to take with lithium,Interaction,What special precautions should I follow? +mst drug/?,Information,"MST�Continus� 5 mg, 10 mg, 15 mg, 30 mg, 60 mg, 100 mg and 200 mg prolonged release tablets: Morphine sulfate" +what size doses of metformin are available?,Dose,"Metformin Hydrochloride Tablets, USP ... 500 mg ... 850 mg ... 1000 mg" +"pravastatin s9 orange how many ""grams?�""",Dose,No answers +how long morphine remains in body,Action/time,"Morphine takes longer to work than heroin and the effects tend to last longer. Despite this, blood tests can only detect morphine for the first 12 hours after the last dose, and urine tests only work for up to 3 days. However, saliva tests are more effective, being able to detect traces of morphine for up to 4 days. Again, morphine stays in the hair for 90 days." +"what is the imprint on metoprolol succ., 50 mg",Appearance,"50 mg tablets: White, round, coated tablets debossed with Andrx logo and �831� on one side and scored on the other side." +what can take the place of tramadol,Alternatives,"The American Academy of Pediatrics (AAP) and other pediatric associations and academies have released guidelines on the management of nociceptive pain in children. The top 3 medications� recommendations in children are paracetamol, ibuprofen, and opioids: non-opioids for mild nociceptive pain; non-opioids + weak opioids for moderate nociceptive pain and non-opioids + strong opioids for severe nociceptive pain. Codeine and tramadol are the only two opioids classified as weak opioids. In most countries, they do not require a restricted medical drug prescription and as �weak� opioids, they are often considered to have a lower potential for adverse drug reactions (ADR) than �strong� opioids." +how to administer denosumab,Usage,"Denosumab injection comes as a solution (liquid) to be injected subcutaneously (under the skin) in your upper arm, upper thigh, or stomach area. It is usually injected by a doctor or nurse in a medical office or clinic. Denosumab injection (Prolia) is usually given once every 6 months. When denosumab injection (Xgeva) is used to reduce the risk of fractures from multiple myeloma, or cancer that has spread to the bones, it is usually given once every 4 weeks. When denosumab injection (Xgeva) is used to treat giant cell tumor of bone, or high calcium levels caused by cancer, it is usually given every 7 days for the first three doses (on day 1, day 8, and day 15) and then once every 4 weeks starting 2 weeks after the first three doses. + +Your doctor will tell you to take supplements of calcium and vitamin D while you are being treated with denosumab injection. Take these supplements exactly as directed. + +When denosumab injection (Prolia) is used to treat osteoporosis or bone loss, your doctor or pharmacist will give you the manufacturer's patient information sheet (Medication Guide) when you begin treatment with denosumab injection and each time you refill your prescription. Read the information carefully and ask your doctor or pharmacist if you have any questions. You can also visit the Food and Drug Administration (FDA) website (http://www.fda.gov/Drugs/DrugSafety/ucm085729.htm) or the manufacturer's website to obtain the Medication Guide." +what is barbiturates,Information,"Barbiturates are sedative-hypnotic drugs that were once commonly used as sedatives or antianxiety medications. A physician must prescribe barbiturates; otherwise, their use is considered illicit. Among their limited uses, barbiturates are used to manage some seizure disorders as well as for pre-procedural sedation. In rarer instances, they are prescribed for the treatment of headache, anxiety and insomnia. However, their use in most areas of medicine has largely been supplanted by other safer medications. Barbiturates are controlled substances due to the potential they pose for abuse, physical dependence, and addiction. Some of the more common barbiturates include Luminal (phenobarbital). Brevital (methohexital). Seconal (secobarbital). Butisol (butabarbital). Fiorinal (butalbital)." +what are the inactive ingredients to the pneumonia vaccine,Ingredient,Inactive Ingredients POLYSORBATE 80 � ALUMINUM PHOSPHATE +how to prep and administer insulin,Usage,"Humulin R U-100 may be administered by subcutaneous injection in the abdominal wall, the thigh, the gluteal region or in the upper arm. Subcutaneous injection into the abdominal wall ensures a faster absorption than from other injection sites. Injection into a lifted skin fold minimizes the risk of intramuscular injection. Injection sites should be rotated within the same region. As with all insulin, the duration of action will vary according to the dose, injection site, blood flow, temperature, and level of physical activity. Intravenous administration of Humulin R U-100 is possible under medical supervision with close monitoring of blood glucose and potassium levels to avoid hypoglycemia and hypokalemia. For intravenous use, Humulin R U-100 should be used at concentrations from 0.1 unit/mL to 1 unit/mL in infusion systems with the infusion fluids 0.9% sodium chloride using polyvinyl chloride infusion bags." +what is medical marijuana,Information,"Some states have approved ""medical marijuana"" to ease symptoms of various health problems. The U.S. Food and Drug Administration (FDA) has not approved the marijuana plant as a medicine. However, there have been scientific studies of cannabinoids, the chemicals in marijuana. This has led to two FDA-approved medicines. They contain THC, the active ingredient in marijuana. They treat nausea caused by chemotherapy and increase appetite in patients who have severe weight loss from HIV/AIDS. Scientists are doing more research with marijuana and its ingredients to treat many diseases and conditions." +"clonazepam "".25mg"" lowest dosage?",Dose,"Klonopin Wafers (clonazepam orally disintegrating tablets) are white, round and debossed with the tablet strength � 0.125 mg debossed 1/8 �" +levaquin treat uti?,Indication,... Complicated Urinary Tract Infections: ... Acute Pyelonephritis: ... Uncomplicated Urinary Tract Infections +"vitamin d 25, totalhow much to takea day",Dose,"Currently, there�s scientific debate about how much vitamin D people need each day. The Institute of Medicine, in a long-awaited report released on November 30, 2010 recommends tripling the daily vitamin D intake for children and adults in the U.S. and Canada, to 600 IU per day. (7) The report also recognized the safety of vitamin D by increasing the upper limit from 2,000 to 4,000 IU per day, and acknowledged that even at 4,000 IU per day, there was no good evidence of harm. The new guidelines, however, are overly conservative about the recommended intake, and they do not give enough weight to some of the latest science on vitamin D and health. For bone health and chronic disease prevention, many people are likely to need more vitamin D than even these new government guidelines recommend." +sickness in humans caused formaldehyde on toys from china?,Side effects,"The Uphill Battle to Better Regulate Formaldehyde ... Safety advocates say that tighter restrictions ... are necessary, particularly for products coming from China, where items as varied as toys and Christmas lights have been found to violate American safety standards." +is cyclobenzaprine a benzodiazepine?,Information,"Cyclobenzaprine is in a class of medications called skeletal muscle relaxants. It works by acting in the brain and nervous system to allow the muscles to relax. �............ Benzodiazepines (sometimes called ""benzos"") work to calm or sedate a person, by raising the level of the inhibitory neurotransmitter GABA in the brain. Common benzodiazepines include diazepam (Valium), alprazolam (Xanax), and clonazepam (Klonopin), among others." +what does vitamin d3 do,Action,"Vitamin D helps your body absorb calcium. Calcium is one of the main building blocks of bone. A lack of vitamin D can lead to bone diseases such as osteoporosis or rickets. Vitamin D also has a role in your nerve, muscle, and immune systems." +what drugs contain in estrone injection,Ingredient,"Estrone, sold under the brand names Estragyn, Kestrin, and Theelin among many others, is an estrogen medication and naturally occurring steroid hormone which has been used in menopausal hormone therapy and for other indications.[5][8][9][10][1][2] It has been available as an aqueous suspension or oil solution that is given by injection into muscle and as a vaginal cream that is applied inside of the vagina.[1][2][3][4] It can also be taken by mouth in the form of estrone sulfate, as in estropipate (piperazine estrone sulfate; Ogen) and conjugated estrogens (Premarin).[11][2][5]" +can i eat after taking rapaflo?,Usage,The recommended dose is 8 mg orally once daily with a meal. +how much levothyroxine is needed to treat hashimotos,Dose,"If Hashimoto's disease causes thyroid hormone deficiency, you may need replacement therapy with thyroid hormone. This usually involves daily use of the synthetic thyroid hormone levothyroxine (Levoxyl, Synthroid, others). ... Treatment with levothyroxine is usually lifelong, but because the dosage you need may change, your doctor is likely to check your TSH level about every 12 months." diff --git a/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_PROMPT_TEMPLATE_HERE/prompt_template.json b/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_PROMPT_TEMPLATE_HERE/prompt_template.json new file mode 100644 index 0000000000..c22605a33d --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/PUT_YOUR_PROMPT_TEMPLATE_HERE/prompt_template.json @@ -0,0 +1,8 @@ +{ + "template": [ + { + "role": "user", + "content": "List the benefits and side effects of the drug in the following consumer health question: {{?question}}." + } + ] +} \ No newline at end of file diff --git a/tutorials/ai-core-genaihub-evaluation/ai-core-genaihub-evaluation.md b/tutorials/ai-core-genaihub-evaluation/ai-core-genaihub-evaluation.md new file mode 100644 index 0000000000..546d84d15d --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/ai-core-genaihub-evaluation.md @@ -0,0 +1,2520 @@ +--- +parser: v2 +auto_validation: true +time: 45 +primary_tag: software-product>sap-business-technology-platform +tags: [ tutorial>beginner, topic>artificial-intelligence, topic>machine-learning, software-product>sap-business-technology-platform ] +author_name: Smita Naik +author_profile: https://github.com/I321506 +--- + +# Using Evaluation Service available in SAP AI Core + This tutorial demonstrates how to use SAP AI Core Custom Evaluation to benchmark Large Language Models (LLMs) using two different approaches **Prompt Registry** and **Orchestration Registry**. It guides you through dataset preparation, environment setup, configuration creation, execution, and result analysis in a unified and simplified workflow. + +It extends the Quick Start tutorial and is intended for Application Developers and Data Scientists who already know the basics of GenAI workflows in SAP AI Core. + +## You will learn +- How to prepare and organize datasets for evaluation. +- How to choose between **Prompt Registry** and **Orchestration Registry** approaches. +- How to configure and run evaluations in SAP AI Core. +- How to analyze and interpret aggregated evaluation results. + +## Prerequisites + +- Setup Environment: +Ensure your instance and AI Core credentials are properly configured according to the steps provided in the initial tutorial +- Orchestration Deployment: +Ensure at least one orchestration deployment is ready to be consumed during this process. +Refer to [this tutorial understand the basic consumption of GenAI models using orchestration.](https://developers.sap.com/tutorials/ai-core-orchestration-consumption.html) +- Basic Knowledge: Familiarity with the orchestration workflow is recommended +- Install Dependencies: Install the required Python packages using the requirements.txt file provided. +Download [requirements.txt](img/requirements.txt) +💡 Right-click the link above and choose **"Save link as..."** to download it directly. + +**Below are the Steps to Run a GenAI Evaluation in SAP AI Core** + +## Pre-Read + +The structure of the input data should be as follows: + +``` +Root +├── PUT_YOUR_PROMPT_TEMPLATE_HERE +| ├── prompt_template.json +│ +├── PUT_YOUR_DATASET_HERE +│ ├── medicalqna_dataset.csv +| +└── PUT_YOUR_CUSTOM_METRIC_HERE + ├── custom-llm-metric.json + ├── custom-llm-metric.jsonl +``` + +**Dataset and Configuration**: +To run this evaluation, All required input files must be placed inside the folder structure provided in the repository: + +You can download or clone the complete folder from the link below and place your files inside the respective folders [Download / Open Full Folder Structure](https://github.com/SAP-samples/aicore-genai-samples/blob/main/genai-sample-apps/prompt-evaluation) + + 1. **Prompt Template Configuration (`PUT_YOUR_PROMPT_TEMPLATE_HERE`)** + * Place one or more prompt template configurations as JSON files in this folder. + 2. **Test Dataset (`PUT_YOUR_DATASET_HERE`)** + * The test dataset should be a CSV, JSON, or JSONL file containing prompt variables, ground truth references, and other data required for evaluation. + 3. **Custom Metrics (`PUT_YOUR_CUSTOM_METRIC_HERE`)** + * (Optional) You can provide custom metric definitions in a single JSON or JSONL file. For JSONL, each line should be a JSON object defining one metric. For JSON, it should be an array of metric-definition objects. + +### Environment Variables Setup + +[OPTION BEGIN [SAP AI Launchpad]] + +- Navigate to your SAP AI Core Launchpad. + +- In the Workspaces section, click on "Add" to create a new workspace. + - A workspace in SAP AI Core is a logical container that holds your resources (like models and pipelines) and provides the isolation needed for your projects. + +- When prompted, enter your AI Core credentials (such as Client ID, Client Secret, and Base URL). + - Note: If you're unsure about where to find these credentials, refer to this [guide](https://developers.sap.com/tutorials/ai-core-generative-ai.html#1c4f36d7-f345-4822-be00-c15f133ff7d8). + +- Once the workspace is successfully created, select your desired Resource Group to begin the evaluation process. + +Refer to the screenshot below for guidance: +![img](img/image_34.png) + +[OPTION END] + +[OPTION BEGIN [Python]] + +- Open **Visual Studio Code or Jupyter Notebook**. Create a new file with the .ipynb extension (e.g., custom_evaluation.ipynb). +- Create a **.env** file in the root directory of your project. +- Add your **AI Core** and **AWS credentials** as shown below. + +```env +# AICORE CREDENTIALS +AICORE_CLIENT_ID= +AICORE_CLIENT_SECRET= +AICORE_AUTH_URL= +AICORE_BASE_URL= +AICORE_RESOURCE_GROUP= + +# AWS CREDENTIALS +AWS_ACCESS_KEY= +AWS_BUCKET_ID= +AWS_REGION= +AWS_SECRET_ACCESS_KEY= + +# ORCHESTRATION DEPLOYMENT URL +DEPLOYMENT_URL= +``` + +**Note:** Replace placeholders (e.g., CLIENT_ID, CLIENT_SECRET, etc) with your actual environment credentials. + +Refer to the below screenshot for clarity: +![img](img/image_1.png) + +#### Install Dependencies + +Install the required packages using the [requirements.txt](img/requirements.txt) file you downloaded in the Prerequisites section. +```bash +pip install -r requirements.txt +``` +#### Connect to AI Core Instance + +Once the environment variables are set and dependencies are installed, run the following code to connect to your instance: + +```PYTHON +# Loading the credentials from the env file +from gen_ai_hub.proxy.gen_ai_hub_proxy import GenAIHubProxyClient +from dotenv import load_dotenv +import os + +load_dotenv(override=True) + +# Fetching environment variables +AICORE_BASE_URL = os.getenv("AICORE_BASE_URL") +AICORE_RESOURCE_GROUP = os.getenv("AICORE_RESOURCE_GROUP") +AICORE_AUTH_URL = os.getenv("AICORE_AUTH_URL") +AICORE_CLIENT_ID = os.getenv("AICORE_CLIENT_ID") +AICORE_CLIENT_SECRET = os.getenv("AICORE_CLIENT_SECRET") + +AWS_ACCESS_KEY = os.getenv("AWS_ACCESS_KEY") +AWS_BUCKET_ID = os.getenv("AWS_BUCKET_ID") +AWS_REGION = os.getenv("AWS_REGION") +AWS_SECRET_ACCESS_KEY = os.getenv("AWS_SECRET_ACCESS_KEY") +DEPLOYMENT_URL = os.getenv("DEPLOYMENT_URL") + +# Initializing the GenAIHubProxyClient +client = GenAIHubProxyClient( + base_url=AICORE_BASE_URL, + auth_url=AICORE_AUTH_URL, + client_id=AICORE_CLIENT_ID, + client_secret=AICORE_CLIENT_SECRET, + resource_group=AICORE_RESOURCE_GROUP +) +``` + +**NOTE:** +- Ensure the **requirements.txt** installation completes successfully before running the code. +- If you face any issues, recheck your **.env** values and installed packages. + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +- Download the [Bruno_collections](img/AI_Core.json) file + +- please follow the steps in the [Tutorial](https://developers.sap.com/tutorials/ai-core-orchestration-consumption.html) to set up your environment, refer step - **Set Up Your Environment and Configure Access** and proceed till generating the token + +[OPTION END] + +### Registering an Object Store Secret in AI Core + +[OPTION BEGIN [SAP AI Launchpad]] + +- Open the **SAP AI Core Launchpad** and navigate to the **Administration** tab. +- Select the **Object Store** section from the left-hand menu. +- Click on **“Add”** to register a new object store secret. +- Fill in the required bucket details as shown in the screenshot below. + +![img](img/image_33.png) + +In the **Secret** field, use the following structure to provide your AWS credentials: + +```json +{ + "AWS_ACCESS_KEY_ID": "Enter Your value", + "AWS_SECRET_ACCESS_KEY": "Enter Your value" +} +``` + +[OPTION END] + +[OPTION BEGIN [Python]] + +To make your evaluation files available for AI Core orchestration, you need to: + +- Upload them to an object store (e.g., AWS S3). +- Register the object store secret in AI Core. + +#### **Setup Authentication and Headers** + +First, define the authentication headers for AI Core REST API calls. + +```PYTHON +def _get_headers(): + headers = { + "Authorization": client.get_ai_core_token(), + "AI-Resource-Group": AICORE_RESOURCE_GROUP, + "Content-Type": "application/json", + } + return headers +``` + +#### **Register Object Store Secret in AI Core** + +Register your S3 bucket and credentials as a secret. + +```PYTHON +# Register S3 secret with AI Core which will be used an input source +import requests + +def register_oss_secret(): + headers = _get_headers() + + POST_SECRETS_ENDPOINT = '/v2/admin/objectStoreSecrets' + request_url = f"{AICORE_BASE_URL}{POST_SECRETS_ENDPOINT}" + + request_body = { + "name": "genai-data", + "data": { + "AWS_ACCESS_KEY_ID": AWS_ACCESS_KEY, + "AWS_SECRET_ACCESS_KEY": AWS_SECRET_ACCESS_KEY + }, + "type": "S3", + "bucket": AWS_BUCKET_ID, + "endpoint": "s3-eu-central-1.amazonaws.com", + "region": AWS_REGION, + "pathPrefix": "" + } + try: + response = requests.post( + request_url, headers=headers, data=json.dumps(request_body), timeout=120 + ) + result = response.json() + print(result) + return result + except: + logging.error("Error occurred while attempting to create object store secret") + raise + +register_oss_secret() +``` +[OPTION END] + +[OPTION BEGIN [Bruno]] + +Generic secrets securely store AWS S3 credentials required for document access + +• Expand **objectStoreSecrets** under admin and select create a secret request + +Use the below payload to create a secret for AWS S3 with NoAuthentication as authentication type. + +```CODE +{ + "name": "genai-data", + "data": { + "AWS_ACCESS_KEY_ID": "", + "AWS_SECRET_ACCESS_KEY": "", + }, + "type": "S3", + "bucket": "", + "endpoint": "", + "region": "", + "pathPrefix": "" + } +``` +• Ensure that all values in the data dictionary are Base64-encoded as per AWS S3 credential requirements + +![img](img/image-br01.png) + +[OPTION END] + +> ⚠️ **Important Note (Must Read)** +> +> - You must **create an object store secret** with a user defined name (for eg: default) to store **output artifacts** from orchestration runs. This is **mandatory**. +> - For **input artifacts**, you may create additional object store secrets with different names if needed. +> - If a user defined name (for eg: default) is not configured, orchestration runs will **fail** due to missing output target setup. + + +### Upload and Register Dataset + +[OPTION BEGIN [SAP AI Launchpad]] + +After creating the secret, upload your evaluation files to the S3 bucket and register them as an artifact in AI Core. + +#### **Register Uploaded Files as Artifact in AI Core** + +To register your evaluation dataset with SAP AI Core, you need to upload it as an artifact. Follow the instructions below using the **SAP AI Launchpad UI**. + +--- + +- Open the **SAP AI Core Launchpad**. +- Navigate to the **Generative AI/Optimization/Artifacts** section to create dataset artifact. + +![img](img/image_19.png) + +- On the **Artifacts** section, click **add**. + +--- + +- On the **General Information** screen, enter the following: + + - **Select Scenario:** `genai-evaluations` + - **Name:** `genai-eval-test-data` + - **Description:** `Demo artifacts for evaluation flow.` + - **Select Object Store:** `genai-data` + - **Sub-folder path:** `genaiEvaluation/` + + > 💡 Replace `` with your **SAP BTP user ID** or the folder path in your object store where the evaluation files are uploaded. + +- On the **Labels** screen, click **“Add Label”** and provide the following: + + - **Key:** `prompt-evaluation` + - **Value:** `true` + *(Note: The prefix `ext.ai.sap.com/` is automatically pre-filled in the UI.)* + + ![img](img/image_21.png) + +- Review all entered details carefully. +- Click **“Add”** to complete the artifact registration. + +[OPTION END] + +[OPTION BEGIN [Python]] + +After creating the secret, organize your evaluation files into the eval/ folder testdata. Upload them to S3 and register as artifacts in AI Core. + +#### **Upload Files to S3 Bucket** +```python +# Uploads the testdata folder to Object Store for simplified workflow +def upload_folder_to_s3(root_folder, bucket_name, s3_prefix=None): + """ + Look for 'testdata' folder inside root_folder and upload it to S3 under the same s3_prefix. + If no s3_prefix is provided, a static prefix or a UUID will be used. + + The S3 structure will be: + genaiEvaluation/{s3_prefix}/testdata/... + + Args: + root_folder (str): Path containing the 'testdata' subfolder. + bucket_name (str): Name of the S3 bucket. + s3_prefix (str, optional): S3 prefix path. Defaults to None. + + Returns: + str: The path for newly uploaded input artifacts on S3. + + Raises: + FileNotFoundError: If 'testdata' subfolder is missing. + """ + testdata_folder = os.path.join(root_folder, "testdata") + if not os.path.isdir(testdata_folder): + raise FileNotFoundError(f"Missing required folder: testdata in {root_folder}") + + if s3_prefix is None: + # Generate a unique prefix using UUID or static ID + prefix_guid = "" # replace with UUID if needed + s3_prefix = f"genaiEvaluation/{prefix_guid}" + + s3_client = boto3.client( + 's3', + aws_access_key_id=AWS_ACCESS_KEY, + aws_secret_access_key=AWS_SECRET_ACCESS_KEY, + region_name=AWS_REGION + ) + + # Upload only the testdata folder + full_prefix = f"{s3_prefix}/testdata" + for root, _, files in os.walk(testdata_folder): + for file in files: + local_path = os.path.join(root, file) + relative_path = os.path.relpath(local_path, testdata_folder) + s3_key = f"{full_prefix}/{relative_path}".replace("\\", "/") + print(f"Uploading {local_path} to s3://{bucket_name}/{s3_key}") + s3_client.upload_file(local_path, bucket_name, s3_key) + + return f"ai://genai-data/{s3_prefix}" +``` + ![img](img/image_5.png) + +#### **Register Uploaded Files as Artifact in AI Core** + +```python +# Registering the uploaded files from AWS as artifacts to use inside configuration. +def register_artifact(input_artifact_path): + headers = _get_headers() + + GET_ARTIFACTS_ENDPOINT = '/v2/lm/artifacts' + request_url = f"{AICORE_BASE_URL}{GET_ARTIFACTS_ENDPOINT}" + + request_body = { + "labels": [ + { + "key": "ext.ai.sap.com/prompt-evaluation", + "value": "true" + } + ], + "name": "genai-eval-test-data", + "kind": "other", + "url": input_artifact_path, + "description": "demo artifacts for evaluation flow.", + "scenarioId": "genai-evaluations" + } + try: + response = requests.post( + request_url, headers=headers, data=json.dumps(request_body), timeout=120 + ) + result = response.json() + print(result) + return result['id'] + except: + print("Error occurred while attempting to create an execution") + raise +``` +![img](img/image_6.png) + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +Before registering a dataset artifact in Bruno, you must upload your CSV file to the SAP AI Core object store using the Dataset API. +Bruno cannot upload files directly to S3; therefore, this step is required. + +**Prerequisites** + + - An object store secret must already exist in your resource group.Typically, this is the default secret named **default**. + + - The Dataset API currently supports: + + - S3 object stores only + + - CSV file uploads + +**Upload Your Dataset** + +Use the Dataset API – Upload File request in Bruno: + +```bash +PUT:{{ai_api_url}}/v2/lm/dataset/files/{{secretName}}/{{datasetPath}} +``` + +**Headers** + +```json +Authorization: Bearer {{token}} +AI-Resource-Group: {{resourceGroup}} +Content-Type: text/csv +``` + +**Body** + +Upload your .csv file directly as binary in Bruno’s Body + +Example Path Values: + + - secretName: default + + - datasetPath: testdata/medicalqna_dataset.csv + +![img](img/image_br_dt.png) + +**Note:** + +Save the ai://… URL — you will use this when creating the dataset artifact. + +**Register the Dataset Artifact** + +- Click on **Register artifact** under lm -> artifacts in bruno collection to register the artifact + +```CODE +{ + "name": "aiconfig", + "kind": "dataset", + "url": "ai://default/testdata/medicalqna_dataset.csv", + "scenarioId": "genai-evaluations" +} +``` +![img](img/image-br02.png) + +[OPTION END] + +### Approach Selection – Choose How You Want to Provide Prompts(Read-up) + +In this evaluation workflow, you can provide prompts in two different ways. +Choose only one option based on your requirement. + +Here are your two options: + +| Option | Approach | Description | When to Use | +| ------------ | ------------------------------------------- | --------------------------------------------------------------- | ----------------------------------------------------- | +| **Option 1** | Prompt Template + Model Directly | Prompt stored in Prompt Registry and model referenced directly. | When you want reusable, versioned prompts. | +| **Option 2** | Orchestration Registry (Inline Prompt) | Prompt provided as part of orchestration config. | When prompt is ad-hoc or not reused. | + +After selecting your option: + + - Follow only the steps for that option. + + - Skip the other options. + + - After completing your selected option, go directly to Create Evaluation Configuration. + +### (Option 1) - Providing Prompts via Prompt Template + Model Directly + +✔ Follow this step **ONLY IF** you want to use **Prompt Template**. + +If not, **skip this step and go to Option 2**. + +[OPTION BEGIN [SAP AI Launchpad]] + +A Prompt Template defines: + + - The message roles (system, user, etc.) + + - Variables that get substituted from your dataset (e.g., questions) + + - Optional model configuration (temperature, max tokens, etc.) + +We’ll create a prompt template to guide the model to answer the questions + +**create the Prompt Template** + +- In SAP AI Launchpad, go to the left-hand menu and select Generative AI Hub → Prompt Management. + +- click on Templates → create + +- This is where you can define reusable templates with variables for evaluations. + +![img](img/image_007.png) + +**Define the Prompt** + +In the Message Blocks section: + +- Add a System role message: +```json +{ + "template": [ + { + "role": "user", + "content": "List the benefits and side effects of the drug in the following consumer health question: {{?question}}." + } + ] +} +``` + +**Configure Variables** + +Scroll down to Variable Definitions and add entries for each variable: + +- question + + - Default Value: leave empty or set to en for fallback + +This ensures the placeholders are dynamically substituted during evaluation. + +![img](img/image_008.png) + +**Save the Template** + +Click Save Template (top right): + +- Scenario → genai-evaluations + +- Name → prompt-registry-eval-acc-test + +- Version → 1.0.0 + +Click Save to persist the template. + +**Verify the Template** + +Go to Generative AI Hub → Prompt Management → Templates and confirm: + +- The template appears with the correct name, scenario, and version. + +- Managed By → shows how the template is stored. + +- Versioning is tracked automatically + +![img](img/image_10.png) + +[OPTION END] + +[OPTION BEGIN [Python]] + +```python +import os +import json + +def get_prompt_config_file(folder_path): + """ + Retrieves a list of all JSON file names in the specified folder. + """ + if not os.path.isdir(folder_path): + print(f"The folder path '{folder_path}' does not exist.") + return [] + + json_files = [file for file in os.listdir(folder_path) if file.endswith(".json")] + + if not json_files: + print(f"No JSON files were found in the folder '{folder_path}'.") + return json_files + + +def get_dataset_file_name(folder_path): + """ + Retrieves the name of the first file in the specified folder. + """ + if not os.path.isdir(folder_path): + print(f"The folder path '{folder_path}' does not exist.") + return None + + items_in_folder = os.listdir(folder_path) + + for item in items_in_folder: + item_path = os.path.join(folder_path, item) + if os.path.isfile(item_path): + return item + + print(f"No files were found in the folder '{folder_path}'.") + return None + + +def load_prompt_template(folder_path, file_name): + """ + Loads the contents of a JSON prompt template into a variable. + """ + file_path = os.path.join(folder_path, file_name) + try: + with open(file_path, "r", encoding="utf-8") as f: + return json.load(f) # returns Python dict + except Exception as e: + print(f"Error loading prompt template: {e}") + return None + +# --- MAIN EXECUTION --- +PROMPT_FOLDER = "./PUT_YOUR_PROMPT_TEMPLATE_HERE" +DATASET_FOLDER = "./PUT_YOUR_DATASET_HERE" + +PROMPT_CONFIG_FILES = get_prompt_config_file(PROMPT_FOLDER) +DATASET_NAME = get_dataset_file_name(DATASET_FOLDER) + +if PROMPT_CONFIG_FILES and DATASET_NAME: + # Load the first JSON prompt template + PROMPT_TEMPLATE = load_prompt_template(PROMPT_FOLDER, PROMPT_CONFIG_FILES[0]) + print(f"Prompt configs: {PROMPT_CONFIG_FILES}") + print(f"Dataset name: {DATASET_NAME}") + print("Prompt template contents:", PROMPT_TEMPLATE) +else: + print("Missing run or dataset file.") + raise SystemExit("Exiting due to missing run/dataset file.") +``` + +```python +def create_prompt_template(): + headers = _get_headers() + GET_PROMPT_TEMPLATES_ENDPOINT = '/v2/lm/promptTemplates' + request_url = f"{AICORE_BASE_URL}{GET_PROMPT_TEMPLATES_ENDPOINT}" + + request_body = { + "name": "prompt-registry-eval-acc-test", + "version": "1.0.0", + "scenario": "genai-evaluations", + "spec": PROMPT_TEMPLATE + } + try: + response = requests.post( + request_url, headers=headers, data=json.dumps(request_body), timeout=120 + ) + if(response.status_code != 200): + raise + result = response.json() + print(result) + return result['id'] + except: + logging.error("Error occurred while attempting to create a prompt template") + raise + +prompt_template_id = create_prompt_template() +``` +**Note** + +If you wish to use a prompt template that already exists in prompt registry, you can manually set prompt_template_id in the next cell and skip executing this cell + +If you already have an existing template set the ID manually: + +```python +prompt_template_id = "" +``` + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +In Bruno, you can create a prompt template by sending a POST request to the AI Core API: + +**Request: Create Prompt Template** + +**URL:** + +```bash +POST {{api_url}}/v2/lm/promptTemplates +``` + +**Headers:** +``` +Authorization: Bearer {{access_token}} +Content-Type: application/json +``` + +**Body (JSON):** +```json +{ + "name": "prompt-registry-eval-acc-test", + "version": "1.0.0", + "scenario": "genai-evaluations", + "spec": { + "template": [ + { + "role": "user", + "content": "List the benefits and side effects of the drug in the following consumer health question: {{?question}}." + } + ], + "defaults": {}, + "additional_fields": { + "modelParams": { + "temperature": 0.3, + "max_tokens": 100 + }, + "modelGroup": "chat" + } + } +} +``` +![img](img/image_br_pr.png) + +[OPTION END] + +🔑 Tip: Always increment the version (e.g., 1.0.1, 1.0.2) when updating a template. This ensures reproducibility across evaluations. + +### (Option 2) - Providing Prompts via Orchestration Registry (Inline Prompt) + +Follow this step only if you want to **store prompt + model configuration inside Orchestration Registry**. + +**Create Orchestration Registry Configuration** + +[OPTION BEGIN [SAP AI Launchpad]] + +Go to Generative AI Hub → Orchestration → Orchestration Configurations + +- click create + +- In templating add the system prompt + +```json +List the benefits and side effects of the drug in the following consumer health question: {{?question}}. +``` +![img](img/image_ail_or1.png) + +- select the model in model configuration and save + +![img](img/image_ail_or2.png) + +![img](img/image_ail_or3.png) + +[OPTION END] + +[OPTION BEGIN [Python]] + +```python +def create_orchestration_registry_config(): + headers = _get_headers() + CREATE_ORCHESTRATION_REGISTRY = '/v2/registry/v2/orchestrationConfigs' + request_url = f"{AICORE_BASE_URL}{CREATE_ORCHESTRATION_REGISTRY}" + model_name,model_version=selected_models_str.split(":") + request_body = { + "name": "genai-eval-test", + "version": "1.0.0", + "scenario": "genai-evaluations", + "spec": { + "modules": { + "prompt_templating": { + "model": { + "name": model_name, + "version": model_version + }, + "prompt": PROMPT_TEMPLATE + } + } + } + } + try: + response = requests.post( + request_url, headers=headers, data=json.dumps(request_body), timeout=120 + ) + if(response.status_code != 200): + print(response.json()) + raise + result = response.json() + print(result) + return result['id'] + except: + logging.error("Error occurred while attempting to create a orchestration registry id") + raise +orchestration_registry_id = create_orchestration_registry_config() +``` + +![img](img/image_py_or1.png) + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +You can paste this directly into a Bruno .bru file or create a new request inside Bruno. + +**Url:** +```bash +POST {{AICORE_BASE_URL}}/v2/registry/v2/orchestrationConfigs +``` + +**headers:** +``` +{ + Authorization: Bearer {{token}} + AI-Resource-Group: {{resource_group}} + Content-Type: application/json + } +``` + +**body:** +```json +{ + "name": "genai-eval-test", + "version": "1.0.0", + "scenario": "genai-evaluations", + "spec": { + "modules": { + "prompt_templating": { + "model": { + "name": "model_name", + "version": "model_version" + }, + "prompt": { + "template": [ + { + "role": "user", + "content": "List the benefits and side effects of the drug in the following consumer health question: {{?question}}." + } + ], + "defaults": {} + } + } + } + } +} +``` + +![img](img/image_br_or1.png) + +[OPTION END] + +After completing Option 2: + + - Proceed directly to the “Create Evaluation Configuration” section + + +### Understanding Metrics (Pre-Read) + +Metrics determine how your model outputs are evaluated during an evaluation run. They define the scoring logic that SAP AI Core uses to compare models, measure quality, and validate improvements over time. + +In SAP AI Core, you can use: + + - System-defined metrics (ready-made, no setup needed) + + - Custom metrics (your own definitions stored in the metric registry) + +**How Metrics Apply in Each Approach** + +| Approach | How Metrics Apply | +| ------------------------------------- | ----------------------------------------------------------------------------- | +| **Option 1 – Prompt Template** | Metrics score responses generated using the prompt template + selected model. | +| **Option 2 – Orchestration Registry** | Metrics score responses generated through orchestration configuration. | + +Metrics are provided later during **Create Evaluation Configuration**: + +```json +"metrics": "BERT, answer_relevance" +``` + +You can specify one or multiple metrics (comma-separated). + +#### Types of Metrics + +**1. System-defined Metrics** + +These come in two categories: + +**Computed Metrics** + +Score outputs using reference data or validation logic. + +| Metric | Description | Needs Reference? | +| --------------------- | ------------------------------------------ | ---------------- | +| **BERT Score** | Embedding similarity to reference | Yes | +| **BLEU** | N-gram overlap | Yes | +| **ROUGE** | Recall-based overlap | Yes | +| **Exact Match** | Checks if output exactly matches reference | Yes | +| **JSON Schema Match** | Validates output against a schema | Yes | +| **Language Match** | Detects language | No | +| **Content Filter** | Safety filter triggered (input/output) | No | + +**2. LLM-as-a-Judge Metrics** + +These metrics use a judge LLM to score responses based on a rubric. +They are ideal for open-ended tasks with no exact references. + +| Metric | What It Measures | Needs Reference? | +| ------------------------- | --------------------------------- | ---------------- | +| **Instruction Following** | How well the prompt was followed | No | +| **Correctness** | Factual accuracy | Yes | +| **Answer Relevance** | Relevance of the generated answer | No | +| **Conciseness** | Brevity + clarity | No | +| **RAG Groundedness** | Grounding in the provided context | No | +| **RAG Context Relevance** | Usefulness of retrieved context | No | + +--- + +#### Custom Metrics + +Create them when system metrics are insufficient. + +Two ways to define custom metrics: + +**1. Structured metrics (recommended)** + + - Provide task, criteria, rubric, optional examples + + - AI Core constructs the judge prompt + +**2. Free-form metrics** + + - You define prompts and scoring logic manually + +**Custom metric registration:** + +```bash +POST {{ai_api_url}}/v2/lm/evaluationMetrics +``` +Once registered, use them like system metrics: + +```json +"metrics": "my_custom_metric" +``` + +**Example — Prompt Template Approach** + +```json +"metrics": "BERT Score,answer_relevance" +``` + +**Example — Orchestration Registry Approach** + +```json +"metrics": "Pointwise Conciseness" +``` + +The chosen metrics determine: + + - scoring + + - dashboard visualizations + + - aggregated results + + - model ranking logic + +### Providing Metrics for Evaluation + +Metrics must be supplied before creating an Evaluation Configuration. + +[OPTION BEGIN [SAP AI Launchpad]] + +In SAP AI Launchpad, metrics are selected visually during the Evaluation Configuration creation flow. + +You can choose: + + - System-defined metrics + + - Custom metrics (your own definitions stored in the metric registry — cannot be created directly in AI Launchpad; to use them, register them via API/Bruno mentioned in the same step and then select them in the Evaluation Configuration) + +No manual JSON input is needed—the UI provides a selectable list of available metrics. + +1. Go to Generative AI Hub → Optimization. + +2. Click Create to start a new evaluation configuration. + +![img](img/image_25.png) + +Select Test Input / Runs depending on the option you used earlier: + +| Earlier Option Used | What to Select in AIL | +| ------------------------------------- | ----------------------------------------------------------------- | +| **Option 1 – Prompt Template** | Select your **Prompt Template** and choose one or more **Models** | +| **Option 2 – Orchestration Registry** | Select your **Orchestration Registry Config ID** | + +Then: + + - Select your registered dataset artifact + + - Enter the dataset path (example): + testdata/global_customer_queries.csv + + - Set the number of test samples (e.g., 20) + + ![img](img/image_26.png) + +- Click **Next** to go to Metrics selection. + +#### Select Evaluation Metrics + +Choose the metrics you want to evaluate. + +You may choose one or multiple system-defined or custom metrics—examples: + + - BERT Score + + - answer_relevance + + - instruction_following + +![img](img/image_27.png) + +--- + +> 📘 **Helpful Resources**: +> +> - [System-Defined Evaluation Metrics – SAP Documentation](https://help.sap.com/docs/sap-ai-core/generative-ai-hub/system-defined-evaluation-metrics) +> - [Define Your Own Custom Metrics – SAP Guide](https://help.sap.com/docs/sap-ai-core/generative-ai-hub/custom-metrics) +> *(If your evaluation requires domain-specific or advanced scoring logic)* + +> **Note: You may select additional metrics based on your use case.** + +--- + +[OPTION END] + +[OPTION BEGIN [Python]] + +**Metrics Handling in Python Notebook (Automatic Detection & Creation)** + +When running the evaluation through the Python notebook, metric setup is partially automated. +Before the evaluation configuration is created, the script performs the following: + + - Users can manually specify metric IDs + + - Or place custom metric JSON files in CUSTOM_METRIC_FOLDER + + - The notebook loads all custom metric definitions automatically + + - It checks if each metric already exists in AI Core + + - If not found → creates it automatically + + - Prints final list of metric IDs used for evaluation + +This ensures all metrics exist before the evaluation configuration is created. + +```python +import os +import json +import requests + +# --- Load JSON / JSONL files --- +def load_all_metrics(folder_path): + """ + Loads all JSON and JSONL files from a folder into a single list of dicts. + """ + metrics = [] + files = [f for f in os.listdir(folder_path) if f.endswith((".json", ".jsonl"))] + + if not files: + print(f"No JSON/JSONL files found in {folder_path}") + return metrics + + for file_name in files: + file_path = os.path.join(folder_path, file_name) + try: + with open(file_path, "r", encoding="utf-8") as f: + content = f.read().strip() + try: + data = json.loads(content) + if isinstance(data, list): + metrics.extend(data) + elif isinstance(data, dict): + metrics.append(data) + except json.JSONDecodeError: + # Attempt to parse as JSONL line by line + for line in content.splitlines(): + line = line.strip() + if not line: + continue + try: + metrics.append(json.loads(line)) + except json.JSONDecodeError: + print(f"Skipping invalid JSON line in {file_name}: {line[:50]}...") + except Exception as e: + print(f"Error reading {file_name}: {e}") + return metrics + +# --- Fetch all metrics from SAP AI Core --- +def fetch_all_metrics(): + request_url = f"{AICORE_BASE_URL}/v2/lm/evaluationMetrics" + resp = requests.get(request_url, headers=_get_headers()) + resp.raise_for_status() + return resp.json().get("resources", []) + +# --- Create or fetch a metric --- +def create_or_get_metric(custom_metric, user_metric_id=None): + all_metrics = fetch_all_metrics() + + # 1️⃣ User-supplied ID lookup + if user_metric_id: + for m in all_metrics: + if m.get("id") == user_metric_id: + print(f"✅ Metric already exists by ID: {user_metric_id}") + return user_metric_id + print(f"⚠️ User metric ID {user_metric_id} not found, will only include if valid later") + + # 2️⃣ Check by scenario, name, version + scenario = custom_metric.get("scenario") + name = custom_metric.get("name") + version = custom_metric.get("version") + if not all([scenario, name, version]): + raise ValueError("Metric must include 'scenario', 'name', and 'version'") + + for m in all_metrics: + if (m.get("scenario") == scenario and + m.get("name") == name and + m.get("version") == version): + metric_id = m.get("id") + print(f"✅ Metric already exists: {scenario}/{name} v{version}, ID = {metric_id}") + return metric_id + + # 3️⃣ Create metric if not found + request_url = f"{AICORE_BASE_URL}/v2/lm/evaluationMetrics" + required_fields = ["scenario", "name", "version", "evaluationMethod", "metricType"] + for f in required_fields: + if f not in custom_metric: + raise ValueError(f"❌ Missing required field: {f}") + + resp = requests.post(request_url, headers=_get_headers(), json=custom_metric) + resp.raise_for_status() + metric_id = resp.json().get("id") + print(f"✅ Metric created successfully: {name} v{version}, ID = {metric_id}") + return metric_id + +# --- Main pipeline --- +CUSTOM_METRIC_FOLDER = "./PUT_YOUR_CUSTOM_METRIC_HERE" +user_metric_ids = "" # set by user if needed + +# 1️⃣ Load all metrics from JSON/JSONL +custom_metric_list = load_all_metrics(CUSTOM_METRIC_FOLDER) + +# 2️⃣ Create/fetch metrics from SAP AI Core +metric_ids = [] +for metric in custom_metric_list: + try: + metric_id = create_or_get_metric(metric) + metric_ids.append(metric_id) + except ValueError as e: + print(f"Skipping metric due to error: {e}") + +# 3️⃣ Validate user_metric_ids separately if provided +if user_metric_ids and user_metric_ids.strip(): + all_metrics = fetch_all_metrics() + # Split comma-separated IDs and strip whitespace + for uid in [uid.strip() for uid in user_metric_ids.split(",")]: + if any(m.get("id") == uid for m in all_metrics): + metric_ids.append(uid) + else: + print(f"⚠️ User metric ID {uid} does not exist in AI Core, skipping.") +# 4️⃣ Convert to comma-separated string +custom_metric_ids_str = ",".join(metric_ids) +print("✅ All processed metric IDs:", custom_metric_ids_str) +``` +![img](img/image_py03.png) + +This ensures all required metrics are available before launching the evaluation. + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +Bruno supports two ways of providing metrics: + +**Use System-Defined Metrics** + +You can directly pass system metrics in your configuration: + +Example: + +```json +"metrics": "answer_relevance" +``` + +If you want to register custom metrics, you must call: + +➡️ **Create Custom Metric** + +```bash +POST {{ai_api_url}}/v2/lm/evaluationMetrics +``` +**Body example:** + +```json +{ + "scenario": "genai-evaluations", + "name": "groundedness", + "version": "0.0.1", + "evaluationMethod": "llm-as-a-judge", + "metricType": "evaluation", + "promptType": "structured", + "spec": { + "configuration": { + "modelConfiguration": { + "name": "gpt-4o", + "version": "2024-08-06", + "parameters": [ + { + "key": "temperature", + "value": "0.1" + }, + { + "key": "max_tokens", + "value": "110" + } + ] + }, + "promptConfiguration": { + "evaluationTask": "You will be assessing groundedness, which measures how well the AI-generated response aligns with and is supported by the provided reference.", + "criteria": "Groundedness: The degree of factual and contextual overlap between the response and the reference.", + "ratingRubric": [ + { + "rating": 5, + "rule": "Fully grounded — the response completely aligns with and is fully supported by the reference." + }, + { + "rating": 4, + "rule": "Mostly grounded — the response largely aligns with the reference with only minor deviations." + }, + { + "rating": 3, + "rule": "Somewhat grounded — the response partially aligns, but some details are missing or loosely connected." + }, + { + "rating": 2, + "rule": "Poorly grounded — the response contains minimal overlap with the reference." + }, + { + "rating": 1, + "rule": "Not grounded — the response has no meaningful overlap with the reference." + } + ], + "includeProperties": ["reference","response"] + } + } + } +} + +``` + +You will receive: + +```json +"id": "" +``` + +This metric ID can be directly passed into the evaluation configuration. + +[OPTION END] + +### Define and Create Evaluation Configurations + +[OPTION BEGIN [SAP AI Launchpad]] + +Once your dataset artifact is registered and you have completed Option 1 (Prompt Template) or Option 2 (Orchestration Registry), the next step is to create an Evaluation Configuration. + +An Evaluation Configuration tells SAP AI Core: + + - which dataset to evaluate + + - which prompt/model or orchestration config to use + + - which metrics to compute + + - which orchestration deployment endpoint to call + + - how many repetitions to run + + - which test dataset file to load + +This configuration becomes the blueprint for your evaluation execution. + +**Steps to Create Evaluation Configuration** + +In Additional Configuration + +- Set **Number of Repetitions** to `1`. +- Choose an existing deployment for **Orchestration Endpoint**. + + ![img](img/image_29.png) +--- + +#### Final Review & Start + +- Review all the details on the summary page. +- Once confirmed, click **Create** to start the evaluation job. + +![img](img/image_40.png) + +> ✅ You have now successfully configured and triggered a Generative AI Evaluation. + +[OPTION END] + +[OPTION BEGIN [Python]] + +When using the Python notebook, the evaluation configuration is created automatically based on your selections. +Before creating the configuration, the notebook will: + + - Load the dataset artifact ID + + - Resolve metric IDs (system + custom) + + - Load prompt template or orchestration registry IDs + + - Validate all required parameters + +**Choose Configuration Mode (Option 1 or Option 2)** + +The notebook provides a simple UI with two checkboxes: + +**Option 1 – Prompt Template + Models** + +**Option 2 – Orchestration Registry** + +You must select only one. + +The notebook ensures mutual exclusivity and stores your selection in the variable: + +```python +from ipywidgets import Checkbox, VBox, HBox, Output, Label, Layout +from IPython.display import display +import textwrap + +# --- Selection state --- +approach = None +suppress_update = False + +# --- Define options --- +flag_options = [ + "prompt_registry", + "orchestration_registry" +] + +# --- Output widget to show current selection --- + +output = Output(layout=Layout(border="1px solid black", height="70px", overflow="auto", width="900px")) + + +# --- Handler for checkbox changes --- +def on_flag_change(change): + global approach, suppress_update + if suppress_update: + return + + if change["new"]: # A checkbox was checked + suppress_update = True + # Uncheck all other checkboxes + for cb in checkboxes: + if cb.description != change["owner"].description: + cb.value = False + suppress_update = False + approach = change["owner"].description + else: + # Only clear if the unchecked one was the currently selected + if approach == change["owner"].description: + approach = None + + # Update display once per action + with output: + output.clear_output(wait=True) + msg = f"Selected approach: {approach or 'None'}" + wrapped = textwrap.fill(msg, width=60) + output.append_stdout(wrapped + "\n") + +# --- Create checkboxes --- +checkboxes = [ + Checkbox(value=False, description=option, layout=Layout(width="250px")) + for option in flag_options +] + +# --- Attach event handler --- +for cb in checkboxes: + cb.observe(on_flag_change, names="value") + +# --- Display UI --- +header = Label( + value="Please select the configuration mode:", + layout=Layout(margin="10px 0px 10px 0px") +) +ui = VBox([header, HBox(checkboxes), output]) +display(ui) +``` + +This value determines which fields are passed later: + + - If approach == "prompt_registry" → notebook passes promptTemplate + models + + - If approach == "orchestration_registry" → notebook passes orchestrationRegistryIds + +#### Create Configuration Body + +The notebook builds the configuration using the required SAP AI Core fields: + + - scenarioId + + - executableId + + - dataset artifact binding + + - selected metrics + + - test dataset details + + - repetitions + + - orchestration deployment URL + + - and Option 1 or Option 2 fields, depending on the chosen approach. + +The following function dynamically creates the configuration body for AI Core. + +```python +# creating an AICORE Configuration. +import requests + +request_body = { + "name": "genai-eval-conf", + "scenarioId": "genai-evaluations", + "executableId": "genai-evaluations-simplified", + "inputArtifactBindings": [ + { + "key": "datasetFolder", + "artifactId": artifact_id + } + ], + "parameterBindings": [ + { + "key": "repetitions", + "value": repetitions + }, + { + "key": "orchestrationDeploymentURL", + "value": orchestration_deployment_url + }, + { + "key": "metrics", + "value": metrics_list + }, + { + "key": "testDataset", + "value": test_datasets + }, + { + "key": "promptTemplate", + "value": prompt_template_id if approach == "prompt_registry" else "" + }, + { + "key": "models", + "value": models_list if approach == "prompt_registry" else "" + }, + { + "key": "orchestrationRegistryIds", + "value": orchestration_registry_id if approach == "orchestration_registry" else "" + } + ] +} + +def create_aicore_configuration(): + headers = _get_headers() + GET_CONFIGURATIONS_ENDPOINT = '/v2/lm/configurations' + request_url = f"{AICORE_BASE_URL}{GET_CONFIGURATIONS_ENDPOINT}" + try: + response = requests.post( + request_url, headers=headers, data=json.dumps(request_body), timeout=120 + ) + print(response) + if(response.status_code != 201): + raise + result = response.json() + print(result) + return result['id'] + except: + logging.error("Error occurred while attempting to create a Configuration") + raise + +configuration_id = create_aicore_configuration() +``` + +**Sample parameter setup:** + +```python +import json +test_data_path = f"testdata/{DATASET_NAME}" # specify the test data path here. For the full folder just specifying testdata will work +test_datasets = json.dumps({'path': test_data_path, 'type': 'csv'}) +metrics_list = ",".join([selected_metrics_str,custom_metric_ids_str]) +models_list = selected_models_str +print(f"Selected metrics: {metrics_list}") +print(f"Selected models: {models_list}") +orchestration_deployment_url = "" +repetitions = "1" +``` + +You will receive a configuration ID, which is required for the next step (Execution). + +![img](img/image_py_con.png) + +SAP AI Core returns a configuration ID, which is used to trigger the evaluation execution. + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +When creating an Evaluation Configuration through Bruno, you call: + +```bash +POST {{api_url}}/v2/lm/configurations +``` +Instead, you choose between: + +**Option 1 — Prompt Template + Models** + +**Option 2 — Orchestration Registry** + +based on which fields you include in your request body. + +| Option Selected | Fields You Must Pass | +| ------------------------------------- | -------------------------- | +| **Option 1 – Prompt Template** | `promptTemplate`, `models` | +| **Option 2 – Orchestration Registry** | `orchestrationRegistryIds` | + +All other fields (metrics, testDataset, repetitions, orchestrationDeploymentURL) remain the same across both options. + +Below are the sample request bodies for each option. + +#### Option 1 — Using Prompt Template + Models + +```json +{ + "name": "genai-eval-conf", + "scenarioId": "genai-evaluations", + "executableId": "genai-evaluations-simplified", + "inputArtifactBindings": [ + { + "key": "datasetFolder", + "artifactId": "{{artifactId}}" + } + ], + "parameterBindings": [ + { + "key": "repetitions", + "value": "1" + }, + { + "key": "orchestrationDeploymentURL", + "value": "{{deployment_url}}" + }, + { + "key": "metrics", + "value": "language_match" + }, + { + "key": "testDataset", + "value": "{\"path\": \"testdata/{{dataset_file}}\", \"type\": \"csv\"}" + }, + { + "key": "promptTemplate", + "value": "{{prompt_template_id}}" + }, + { + "key": "models", + "value": "{{model_name}}:{{model_version}}" + } + ] +} +``` +![img](img/image-br03.png) + +#### Option 2 — Using Orchestration Registry + +```json +{ + "name": "genai-eval-conf", + "scenarioId": "genai-evaluations", + "executableId": "genai-evaluations-simplified", + "inputArtifactBindings": [ + { + "key": "datasetFolder", + "artifactId": "{{artifactId}}" + } + ], + "parameterBindings": [ + { + "key": "repetitions", + "value": "1" + }, + { + "key": "orchestrationDeploymentURL", + "value": "{{deployment_url}}" + }, + { + "key": "metrics", + "value": "language_match" + }, + { + "key": "testDataset", + "value": "{\"path\": \"testdata/{{dataset_file}}\", \"type\": \"csv\"}" + }, + { + "key": "orchestrationRegistryIds", + "value": "{{orchestration_registry_id}}" + } + ] +} +``` + +![img](img/image-br06.png) + +[OPTION END] + +### Create and Run Evaluation Execution + +After creating the Evaluation Configuration, the next step is to execute it. +Execution triggers the evaluation workflow, which: + + - Reads the test dataset + + - Generates submissions to the orchestration service + + - Collects model outputs + + - Computes all selected metrics + + - Produces aggregate and raw evaluation results + +The process is identical for SAP AI Launchpad, Python, and Bruno, with only the invocation method differing. + +[OPTION BEGIN [SAP AI Launchpad]] + +- Once the evaluation configuration is created, the system automatically triggers an evaluation execution. + +- Follow these steps to monitor its progress and verify completion: + + - Navigate to **ML Operations** in the SAP AI Core Launchpad. + + - In the sidebar, click **Executions**. + + ![img](img/image_41.png) + + - Locate the most recent execution triggered by your evaluation configuration. You can use the timestamp or configuration name to identify it. + + - Click on the execution entry to open its details. The Current Status will update as the process runs. + + ![img](img/image_31.png) + +- Once the Target Status reaches **COMPLETED** , your evaluation has successfully finished. + +> [For More information](https://help.sap.com/docs/sap-ai-core/generative-ai-hub/create-evaluation) + +Track Execution Status + +The execution page will show: + + - Unknown + + - Pending + + - Running + + - Completed + +Once completed, you can navigate to: + + - Outputs → Tracking Metrics (aggregate results) + + - Output Artifacts (raw results stored in the SQLite DB) + +[OPTION END] + +[OPTION BEGIN [Python]] + +Once the configuration is ready, the next step is to trigger an execution. +An execution is a single evaluation run based on the configuration you defined. + +**Create Execution** + +The following function starts the evaluation in SAP AI Core using the configuration ID: + +```python +# Trigger an execution with the created configuration + +import requests +def create_execution(): + headers = _get_headers() + GET_EXECUTIONS_ENDPOINT = '/v2/lm/executions' + request_url = f"{AICORE_BASE_URL}{GET_EXECUTIONS_ENDPOINT}" + request_body = {"configurationId" : configuration_id} + try: + response = requests.post( + request_url, headers=headers, data=json.dumps(request_body), timeout=120 + ) + print("response received is ", response) + result = response.json() + print(result) + return result['id'] + except: + logging.error("Error occurred while attempting to create an execution") + raise + + +execution_id = create_execution() +``` +![img](img/image_44.png) + +#### Monitor Execution Status + +The execution progresses through states: + +UNKNOWN → PENDING → RUNNING → COMPLETED + +```python +# get execution status +import requests +def get_execution_status(execution_id): + headers = _get_headers() + LOG_EXECUTIONS_ENDPOINT = f'/v2/lm/executions/{execution_id}' + request_url = f"{AICORE_BASE_URL}{LOG_EXECUTIONS_ENDPOINT}" + try: + response = requests.get( + request_url, headers=headers, timeout=120 + ) + print("response received is ", response) + result = response.json() + return result + except: + logging.error("Error occurred while attempting to get execution status") + raise + +get_execution_status(execution_id) +``` + +#### Automatic Polling + +To continuously monitor until the evaluation finishes: + +```python +# Polling the execution status until it is COMPLETED or DEAD or timeout occurs +def poll_execution_status(execution_id, timeout_minutes=1800, poll_interval=30): + start_time = time.time() + while True: + result = get_execution_status(execution_id) + print(f"Execution Status: {result.get('status')}") + if result.get("status") == "COMPLETED": + print(f"Execution completed successfully in {time.time() - start_time} seconds, proceed to fetch results.") + break + if result.get("status") == "DEAD": + print(f"Execution failed with status DEAD in {time.time() - start_time} seconds. Check the logs for more details.") + break + if time.time() - start_time > timeout_minutes * 60: + raise TimeoutError(f"Execution status polling timed out after {timeout_minutes} minutes.") + time.sleep(poll_interval) + +``` + +![img](img/image_45.png) + +✅ Once the execution status shows COMPLETED, the evaluation results are available and can be analyzed in the next step. + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +After creating the configuration, the next step is to trigger the evaluation workload by creating an AI Core execution. + +**Create an Execution with the Created Configuration** + +- Click on create execution under executions, pass the configuration id created in previous step + +![img](img/image-br04.png) + +- The status field progresses through different states over time: +UNKNOWN → PENDING → RUNNING → COMPLETED. + +**Get Execution Status** + +check the status of created execution by passing the execution ID, The Current Status will update as the process runs. please refer the below image + +![img](img/image-br05.png) + +[OPTION END] + +### View and Analyze Evaluation Results + +Once the evaluation execution is complete, SAP AI Core generates both aggregated metrics and detailed instance-level results. +These results help compare model performance, understand quality metrics, and debug issues. + +[OPTION BEGIN [SAP AI Launchpad]] + +Once the evaluation workflow execution is completed, this step retrieves the aggregated evaluation metrics from the SAP AI Core service by specifying the run name. + +1. Go to Evaluations → Executions + +2. Select your execution + +3. Open the Metrics tab to view: + + - average latency + + - token usage + + - metric scores + +4. Open the Artifacts tab to download: + + - the complete result folder + + - the SQLite DB for deeper analysis + +This is the easiest way to visually inspect evaluation outcomes and compare multiple model runs. + +![img](img/image_46.png) + +[OPTION END] + +[OPTION BEGIN [Python]] + +The notebook includes utility scripts to retrieve aggregated metrics, download detailed artifacts, and inspect SQLite results.This returns all metric values per evaluated run, which your notebook then: + + - Converts into a DataFrame + + - Creates a pivot table + + - Prepares for ranking and scoring + +**Retrieve Aggregate Metrics (Tracking API)** + +Aggregated metrics summarize performance across all test samples. +To fetch them using execution ID: + +```python +# Get aggregate metrics using execution id +import pandas as pd +from IPython.display import HTML + +def get_model_from_run(run): + for tag in run.get("tags", []): + if tag.get("name") == "evaluation.ai.sap.com/model": + return tag.get("value") + +def aggregate_metrics_by_model(runs_list): + transformed_data = [] + for run in runs_list: + model = get_model_from_run(run) + for metric in run["metrics"]: + output_json = { + "model": model, + "metrics_name": metric.get("name"), + "metric_value": metric.get("value") + } + transformed_data.append(output_json) + return transformed_data + + +def create_metrics_pivot_table(transformed_data): + """ + Creates a pivot table where rows are models and columns are metrics. + + Args: + transformed_data: List of dictionaries with 'model', 'metrics_name', 'metric_value' + + Returns: + DataFrame with models as rows and metrics as columns + """ + # Convert list of dictionaries to DataFrame + df = pd.DataFrame(transformed_data) + + # Create pivot table + pivot_table = df.pivot_table( + index='model', + columns='metrics_name', + values='metric_value', + aggfunc='first' # Use 'first' to get the single value, or 'mean' if there are duplicates + ) + + return pivot_table + +transformed_data = aggregate_metrics_by_model(runs_data['resources']) +metrics_pivot = create_metrics_pivot_table(transformed_data) + +HTML(metrics_pivot.to_html()) +``` +![img](img/image_47.png) + +You can also retrieve using run name: + +```bash +{base_url}/v2/lm/metrics?tagFilters=evaluation.ai.sap.com/run-name={run_name} +``` + +**Download Raw Results (Output Artifact)** + +All detailed evaluation outputs are stored as an output artifact in your object store. To download all output files programmatically: + +```python +# download the result artifacts from Object store. +import boto3 + +def download_all_objects(prefix, destination_folder): + """ + Recursively download all objects from an S3 bucket starting with a specific prefix. + + :param bucket_name: Name of the S3 bucket. + :param prefix: Prefix to filter objects in the bucket. + :param destination_folder: Local folder to save the downloaded files. + """ + s3_client = boto3.client( + 's3', + aws_access_key_id=AWS_ACCESS_KEY, + aws_secret_access_key=AWS_SECRET_ACCESS_KEY, + region_name=AWS_REGION + ) + + # Ensure the destination folder exists + if not os.path.exists(destination_folder): + os.makedirs(destination_folder) + + # Paginate through objects + paginator = s3_client.get_paginator('list_objects_v2') + pages = paginator.paginate(Bucket=AWS_BUCKET_ID, Prefix=prefix) + + for page in pages: + if 'Contents' in page: + for obj in page['Contents']: + key = obj['Key'] + local_file_path = os.path.join(destination_folder, os.path.relpath(key, prefix)) + + # Ensure the local directory structure exists + local_directory = os.path.dirname(local_file_path) + if not os.path.exists(local_directory): + os.makedirs(local_directory) + + # Download the object + print(f"Downloading {key} to {local_file_path}") + s3_client.download_file(AWS_BUCKET_ID, key, local_file_path) + + +# Download the evaluation results from the object store. Look at execution status under "outputArtifacts" key to see the 'url' +# which shows the data path of where your output results are stored +EXECUTION_ID = execution_id +sqlite_db_prefix = f'{EXECUTION_ID}/evaluation_result/' # change the prefix based on where your output artifact is stored in the bucket. +destination_folder = 'results-new' + +download_all_objects(sqlite_db_prefix, destination_folder) +``` + +![img](img/image_48.png) + +**View Detailed Results (SQLite DB)** + +The evaluation stores detailed instance-level results in results.db. + +Example: Reading SQLite tables: + +```python +# viewing the results from sqlite db in tabular format.. +import sqlite3 +import pandas as pd +from IPython.display import display, HTML + +# Path to your SQLite database file +db_file = 'results-new/results.db' + +connection = sqlite3.connect(db_file) + +# Specify the table names you want to display +table_names = ['run','configuration', 'submission', 'submission_result', 'evaluation_result'] + +# Create the CSS and HTML container +html_content = """ + +
+""" + +for table_name in table_names: + query = f"SELECT * FROM {table_name};" + df = pd.read_sql_query(query, connection) + # If you want to see all the rows across all tables, remove/comment the next line + df = df.head(10) # Limiting the number of rows displayed + table_html = df.to_html(classes='table-container', index=False) + html_content += f""" +
+

Table: {table_name}

+ {table_html} +
+ """ + +html_content += "
" + +display(HTML(html_content)) + +# Close the connection +connection.close() +``` + +**Process and Rank Models (Optional Python Helpers)** + +The notebook includes post-processing utilities that: + + - normalize numeric metrics + + - process boolean and categorical metrics + + - compute weighted scores + + - generate a final ranking to identify the best model + +```python +import pandas as pd +from IPython.display import HTML + +# Scoring logic depends on "scoring_type" +# "weight" represents the relative weight of this metric to all SELECTED metrics +METRICS_SCORING_TYPE_MAPPING = { + "Content Filter on Input": { + "scoring_type": "bool-false", # False is good + "weight": 1 + }, + "Content Filter on Output": { + "scoring_type": "bool-false", # False is good + "weight": 1 + }, + "Pointwise Instruction Following": { + "scoring_type": "num_1_to_5", + "weight": 1 + }, + "Pointwise Answer Relevance": { + "scoring_type": "num_1_to_5", + "weight": 1 + }, + "Pointwise Conciseness": { + "scoring_type": "num_1_to_5", + "weight": 1 + }, + "Pointwise Correctness": { + "scoring_type": "num_1_to_5", + "weight": 1 + }, + "BLEU": { + "scoring_type": "num_0_to_1", + "weight": 1 + }, + "ROUGE": { + "scoring_type": "num_0_to_1", + "weight": 1 + }, + "BERT Score": { + "scoring_type": "F1/Precision/Recall num_0_to_1", + "weight": 1 + } +} + +def calculate_bool_metric_score(pivot_df, metric_base_name, true_is_good): + """ + Calculate scores for boolean metrics based on False/True counts. + + Args: + pivot_df: DataFrame with models as rows and metrics as columns + metric_base_name: Base name of the metric (without /False/count or /True/count) + true_is_good: Boolean indicating if True is considered a good outcome + + Returns: + Series with boolean metric scores per model (scaled to -1 to 1) + """ + false_col = f"{metric_base_name}/False/count" + true_col = f"{metric_base_name}/True/count" + + false_values = pivot_df[false_col] if false_col in pivot_df.columns else 0 + true_values = pivot_df[true_col] if true_col in pivot_df.columns else 0 + total_values = true_values + false_values + + score = ((false_values * 1) + (true_values * -1)) / total_values + + if true_is_good: + score = 0 - score + + return score + +def calculate_numeric_metric_score(pivot_df, metric_base_name, range_min=0, range_max=1): + """ + Calculate scores for numeric metrics with /mean + The mean is normalized to a score between -1 and 1 using the provided range. + + Args: + pivot_df: DataFrame with models as rows and metrics as columns + metric_base_name: Base name of the metric (without suffixes) + range_min: Minimum possible value of the metric + range_max: Maximum possible value of the metric + + Returns: + Series with numeric metric scores per model (scaled to -1 to 1) + """ + mean_col = f"{metric_base_name}/mean" + + if mean_col not in pivot_df.columns: + return pd.Series(0.0, index=pivot_df.index) + + mean_values = pivot_df[mean_col] + + # Linear normalization from [range_min, range_max] to [0, 1] + normalized = (mean_values - range_min) / (range_max - range_min) + + # Scale to [-1, 1] + score = (normalized * 2) - 1 + + return score + +def calculate_bert_score(pivot_df, metric_base_name): + """ + Calculate BERT Score by averaging F1, Precision, and Recall scores. + + Args: + pivot_df: DataFrame with models as rows and metrics as columns + metric_base_name: Base name "BERT Score" + + Returns: + Series with BERT scores per model (scaled to -1 to 1) + """ + f1_col = f"{metric_base_name}/F1/mean" + precision_col = f"{metric_base_name}/Precision/mean" + recall_col = f"{metric_base_name}/Recall/mean" + + scores = [] + for col in [f1_col, precision_col, recall_col]: + if col in pivot_df.columns: + scores.append(pivot_df[col]) + + if not scores: + return pd.Series(0.0, index=pivot_df.index) + + # Average the three metrics (already in 0 to 1 range) + avg_score = sum(scores) / len(scores) + + # Scale to [-1, 1] + score = (avg_score * 2) - 1 + + return score + +def find_unique_metrics_in_pivot(pivot_df): + """ + Identify unique metric base names present in the pivot table. + + Args: + pivot_df: DataFrame with models as rows and metrics as columns + """ + # Extract unique metric names from pivot table columns + unique_metrics = set() + for col in pivot_df.columns: + # Extract base metric name by removing suffixes + base_name = col + for suffix in ['/False/count', '/True/count', '/F1_score/mean','/Precision_score/mean', + '/Recall_score/mean','/mean','/median', '/p90', '/p95', '/stddev']: + if suffix in base_name and "BERT Score" not in base_name: + base_name = base_name.replace(suffix, '') + unique_metrics.add(base_name) + break + if base_name.startswith("BERT Score/"): + base_name = "BERT Score" + unique_metrics.add(base_name) + if not unique_metrics: + raise ValueError("No valid metrics found in pivot table") + return unique_metrics + + +def rank_models(pivot_df, unique_metrics=None): + """ + Rank models based on metrics present in the pivot table. + + Args: + pivot_df: DataFrame with models as rows (index) and metrics as columns + + Returns: + DataFrame with model rankings and scores + """ + # Calculate total weight for metrics present in pivot table + total_weight = sum(METRICS_SCORING_TYPE_MAPPING[m]["weight"] for m in unique_metrics) + + # Initialize total score + total_scores = pd.Series(0.0, index=pivot_df.index) + + # Process each metric found in the pivot table + for metric_name in unique_metrics: + config = METRICS_SCORING_TYPE_MAPPING[metric_name] + scoring_type = config["scoring_type"] + weight = config["weight"] / total_weight + + if scoring_type == "bool-false": + # False is good (True is bad) + metric_score = calculate_bool_metric_score(pivot_df, metric_name, true_is_good=False) + total_scores += metric_score * weight + + elif scoring_type == "bool-true": + # True is good (False is bad) + metric_score = calculate_bool_metric_score(pivot_df, metric_name, true_is_good=True) + total_scores += metric_score * weight + + elif scoring_type == "num_1_to_5": + metric_score = calculate_numeric_metric_score(pivot_df, metric_name, range_min=1, range_max=5) + total_scores += metric_score * weight + + elif scoring_type == "num_0_to_1": + metric_score = calculate_numeric_metric_score(pivot_df, metric_name, range_min=0, range_max=1) + total_scores += metric_score * weight + + elif scoring_type == "F1/Precision/Recall num_0_to_1": + # BERT Score + metric_score = calculate_bert_score(pivot_df, metric_name) + total_scores += metric_score * weight + + # Create results DataFrame + results_df = pd.DataFrame({ + 'model': pivot_df.index, + 'total_score': total_scores.values + }) + + # Rank models (higher score = better rank) + results_df['rank'] = results_df['total_score'].rank(ascending=False, method='min').astype(int) + results_df = results_df.sort_values('rank') + + return results_df + +def get_detailed_scores(pivot_df, unique_metrics): + """ + Get detailed breakdown of scores per metric for each model. + + Args: + pivot_df: DataFrame with models as rows and metrics as columns + + Returns: + DataFrame with detailed scores per metric + """ + detailed_scores = pd.DataFrame(index=pivot_df.index) + + # Process each metric in the mapping + for metric_name in unique_metrics: + scoring_type = METRICS_SCORING_TYPE_MAPPING[metric_name]["scoring_type"] + + if scoring_type == "bool-false": + detailed_scores[f"{metric_name}_score"] = calculate_bool_metric_score(pivot_df, metric_name, true_is_good=False) + + elif scoring_type == "bool-true": + detailed_scores[f"{metric_name}_score"] = calculate_bool_metric_score(pivot_df, metric_name, true_is_good=True) + + elif scoring_type == "num_1_to_5": + detailed_scores[f"{metric_name}_score"] = calculate_numeric_metric_score(pivot_df, metric_name, range_min=1, range_max=5) + + elif scoring_type == "num_0_to_1": + detailed_scores[f"{metric_name}_score"] = calculate_numeric_metric_score(pivot_df, metric_name, range_min=0, range_max=1) + + elif scoring_type == "F1/Precision/Recall num_0_to_1": + detailed_scores[f"{metric_name}_score"] = calculate_bert_score(pivot_df, metric_name) + + return detailed_scores + +unique_metrics = find_unique_metrics_in_pivot(metrics_pivot) + +# Get detailed scores breakdown +detailed = get_detailed_scores(metrics_pivot, unique_metrics) +display(HTML(detailed.to_html())) + +# Rank models +ranking = rank_models(metrics_pivot, unique_metrics) +display(HTML(ranking.to_html())) +``` +This provides a clear ranking of models based on the metrics you selected during evaluation. + +![img](img/image_py_rk.png) + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +Retrieve Aggregate Metrics + +Send a GET request: + +**GET** +```bash +{{apiurl}}/v2/lm/metrics?tagFilters=evaluation.ai.sap.com/child-of={{execution_id}} +``` +or using dataset run name: + +**GET** +```bash +{{apiurl}}/v2/lm/metrics?tagFilters=evaluation.ai.sap.com/run-name={{run_name}} +``` + +This returns aggregated values for: + + - latency + + - token usage + + - metric scores + + - completion count + +**Download Raw Results** + +1. Open the execution details + +2. Copy the output artifact URL + +3. Download the folder to obtain + + - step-wise results + + - sqlite_combined/results.db + +**Inspect Detailed Results** + +Open the SQLite DB in any client to inspect: + + - submissions + + - completion responses + + - evaluation_results (raw metric scores) + + - aggregation_results + + - custom_logs + +![img](img/image_49.png) + +[OPTION END] + +### Delete Evaluation Artifacts, Configurations & Metrics + +Over time, your workspace may accumulate old configurations, executions, and metrics. +SAP AI Core allows you to safely delete these resources once they are no longer needed. + +This section explains how to delete: + + - Evaluation Executions + + - Evaluation Configurations + + - Custom Metrics (if created) + +⚠️ Important: + +Deletions are permanent and cannot be undone. +System-defined metrics cannot be deleted — only your custom metrics. + +[OPTION BEGIN [SAP AI Launchpad]] + +**Delete Executions** + +1. Go to Evaluations → Executions + +2. Select the execution + +3. Click Delete + +4. Confirm the deletion + +**Delete Evaluation Configurations** + +1. Go to Evaluations → Configurations + +2. Select the configuration you created + +3. Click Delete + +[OPTION END] + +[OPTION BEGIN [Python]] + +**1. Delete an Evaluation Execution** + +```python +#Delete Execution Id +def delete_execution(): + headers = _get_headers() + EXEC_ID = execution_id + GET_EXECUTIONS_ENDPOINT = '/v2/lm/executions/' + request_url = f"{AICORE_BASE_URL}{GET_EXECUTIONS_ENDPOINT}{EXEC_ID}" + try: + response = requests.delete( + request_url, headers=headers, params={"AI-Resource-Group":AICORE_RESOURCE_GROUP}, timeout=120 + ) + print(response) + if(response.status_code != 202): + raise + result = response.json() + print(result) + except: + logging.error("Error occurred while attempting to delete a Configuration") + raise + +delete_execution() +``` +**2. Delete an Evaluation Configuration** + +```python +def delete_configuration(configuration_id): + headers = _get_headers() + endpoint = f"/v2/lm/configurations/{configuration_id}" + url = f"{AICORE_BASE_URL}{endpoint}" + + response = requests.delete(url, headers=headers) + print("Status:", response.status_code) + print(response.text) + +# Example: +delete_configuration(configuration_id) +``` + +**3. Delete a Custom Metric** + +```python +def delete_metric(metric_id): + headers = _get_headers() + endpoint = f"/v2/lm/evaluationMetrics/{metric_id}" + url = f"{AICORE_BASE_URL}{endpoint}" + + response = requests.delete(url, headers=headers) + print("Status:", response.status_code) + print(response.text) + +# Example: +delete_metric(metric_id) +``` + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +**1. Delete Execution** + +**DELETE Request** +```bash +{{apiurl}}/v2/lm/executions/{{execution_id}} +``` +**Headers:** +``` +Authorization: Bearer {{access_token}} +AI-Resource-Group: {{resource_group}} +``` +**2. Delete Configuration** + +```bash +DELETE {{apiurl}}/v2/lm/configurations/{{configuration_id}} +``` + +**3. Delete Custom Metric** + +```bash +DELETE {{apiurl}}/v2/lm/evaluationMetrics/{{metric_id}} +``` + +[OPTION END] diff --git a/tutorials/ai-core-genaihub-evaluation/evaluation_public_simplified_workflow.ipynb b/tutorials/ai-core-genaihub-evaluation/evaluation_public_simplified_workflow.ipynb new file mode 100644 index 0000000000..a03d5dbfc3 --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/evaluation_public_simplified_workflow.ipynb @@ -0,0 +1,2745 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Generative AI Custom Evaluation\n", + "This is an example notebook which showcases how a user can use AI Core custom evaluation to benchmark their large language models, evaluate orchestration configuration or prompts for their use case.\n", + "It uses publicly available [MedicationQA dataset](https://langtest.org/docs/pages/benchmarks/medical/medicationqa/) which consists of commonly asked consumer questions about medications. The workload computes industry standard metrics to check the reliability of the response generate by llm.\n", + "
**Note: For detailed instructions please refer to [Readme](./Readme.md)**" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Place your Dataset and Run configuration\n", + "Place your files as such:\n", + "1. Place your dataset in the folder `PUT_YOUR_DATASET_HERE`\n", + "2. Place your prompt template configurations in the folder `PUT_YOUR_PROMPT_TEMPLATE_HERE`\n", + "3. Place your custom metric files in folder `PUT_YOUR_CUSTOM_METRIC_HERE`\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# SetUp (Step 1)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: generative-ai-hub-sdk==4.4.3 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from -r requirements.txt (line 1)) (4.4.3)\n", + "Requirement already satisfied: python-dotenv==1.0.1 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from -r requirements.txt (line 2)) (1.0.1)\n", + "Requirement already satisfied: boto3==1.37.4 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from -r requirements.txt (line 3)) (1.37.4)\n", + "Requirement already satisfied: pandas==2.2.3 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from -r requirements.txt (line 4)) (2.2.3)\n", + "Requirement already satisfied: json2html==1.3.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from -r requirements.txt (line 5)) (1.3.0)\n", + "Requirement already satisfied: numpy==1.26.4 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from -r requirements.txt (line 6)) (1.26.4)\n", + "Requirement already satisfied: ipywidgets==8.1.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from -r requirements.txt (line 7)) (8.1.0)\n", + "Requirement already satisfied: pydantic==2.9.2 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (2.9.2)\n", + "Requirement already satisfied: dacite>=1.8.1 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (1.9.2)\n", + "Requirement already satisfied: ai-core-sdk>=2.5.7 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (2.6.2)\n", + "Requirement already satisfied: httpx>=0.27.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (0.28.1)\n", + "Requirement already satisfied: click>=8.1.7 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (8.1.8)\n", + "Requirement already satisfied: openai>=1.56.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (2.6.1)\n", + "Requirement already satisfied: overloading==0.5.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (0.5.0)\n", + "Requirement already satisfied: packaging>=23.2 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (25.0)\n", + "Requirement already satisfied: s3transfer<0.12.0,>=0.11.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from boto3==1.37.4->-r requirements.txt (line 3)) (0.11.5)\n", + "Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from boto3==1.37.4->-r requirements.txt (line 3)) (1.0.1)\n", + "Requirement already satisfied: botocore<1.38.0,>=1.37.4 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from boto3==1.37.4->-r requirements.txt (line 3)) (1.37.38)\n", + "Requirement already satisfied: pytz>=2020.1 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from pandas==2.2.3->-r requirements.txt (line 4)) (2025.2)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from pandas==2.2.3->-r requirements.txt (line 4)) (2.9.0.post0)\n", + "Requirement already satisfied: tzdata>=2022.7 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from pandas==2.2.3->-r requirements.txt (line 4)) (2025.2)\n", + "Requirement already satisfied: widgetsnbextension~=4.0.7 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipywidgets==8.1.0->-r requirements.txt (line 7)) (4.0.15)\n", + "Requirement already satisfied: jupyterlab-widgets~=3.0.7 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipywidgets==8.1.0->-r requirements.txt (line 7)) (3.0.16)\n", + "Requirement already satisfied: comm>=0.1.3 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipywidgets==8.1.0->-r requirements.txt (line 7)) (0.2.3)\n", + "Requirement already satisfied: traitlets>=4.3.1 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipywidgets==8.1.0->-r requirements.txt (line 7)) (5.14.3)\n", + "Requirement already satisfied: ipython>=6.1.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipywidgets==8.1.0->-r requirements.txt (line 7)) (8.18.1)\n", + "Requirement already satisfied: annotated-types>=0.6.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from pydantic==2.9.2->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (0.7.0)\n", + "Requirement already satisfied: typing-extensions>=4.6.1 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from pydantic==2.9.2->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (4.15.0)\n", + "Requirement already satisfied: pydantic-core==2.23.4 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from pydantic==2.9.2->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (2.23.4)\n", + "Requirement already satisfied: ai-api-client-sdk==2.6.1 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ai-core-sdk>=2.5.7->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (2.6.1)\n", + "Requirement already satisfied: aenum~=3.1 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ai-api-client-sdk==2.6.1->ai-core-sdk>=2.5.7->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (3.1.16)\n", + "Requirement already satisfied: pyhumps~=3.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ai-api-client-sdk==2.6.1->ai-core-sdk>=2.5.7->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (3.8.0)\n", + "Requirement already satisfied: requests<3.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ai-api-client-sdk==2.6.1->ai-core-sdk>=2.5.7->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (2.32.5)\n", + "Requirement already satisfied: urllib3<1.27,>=1.25.4 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from botocore<1.38.0,>=1.37.4->boto3==1.37.4->-r requirements.txt (line 3)) (1.26.20)\n", + "Requirement already satisfied: httpcore==1.* in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from httpx>=0.27.0->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (1.0.9)\n", + "Requirement already satisfied: anyio in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from httpx>=0.27.0->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (4.11.0)\n", + "Requirement already satisfied: idna in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from httpx>=0.27.0->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (3.11)\n", + "Requirement already satisfied: certifi in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from httpx>=0.27.0->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (2025.10.5)\n", + "Requirement already satisfied: h11>=0.16 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from httpcore==1.*->httpx>=0.27.0->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (0.16.0)\n", + "Requirement already satisfied: matplotlib-inline in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (0.2.1)\n", + "Requirement already satisfied: decorator in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (5.2.1)\n", + "Requirement already satisfied: jedi>=0.16 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (0.19.2)\n", + "Requirement already satisfied: pygments>=2.4.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (2.19.2)\n", + "Requirement already satisfied: exceptiongroup in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (1.3.0)\n", + "Requirement already satisfied: pexpect>4.3 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (4.9.0)\n", + "Requirement already satisfied: stack-data in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (0.6.3)\n", + "Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (3.0.52)\n", + "Requirement already satisfied: distro<2,>=1.7.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from openai>=1.56.0->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (1.9.0)\n", + "Requirement already satisfied: tqdm>4 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from openai>=1.56.0->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (4.67.1)\n", + "Requirement already satisfied: sniffio in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from openai>=1.56.0->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (1.3.1)\n", + "Requirement already satisfied: jiter<1,>=0.10.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from openai>=1.56.0->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (0.11.1)\n", + "Requirement already satisfied: six>=1.5 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from python-dateutil>=2.8.2->pandas==2.2.3->-r requirements.txt (line 4)) (1.17.0)\n", + "Requirement already satisfied: parso<0.9.0,>=0.8.4 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from jedi>=0.16->ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (0.8.5)\n", + "Requirement already satisfied: ptyprocess>=0.5 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from pexpect>4.3->ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (0.7.0)\n", + "Requirement already satisfied: wcwidth in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from prompt-toolkit<3.1.0,>=3.0.41->ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (0.2.14)\n", + "Requirement already satisfied: pure-eval in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from stack-data->ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (0.2.3)\n", + "Requirement already satisfied: asttokens>=2.1.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from stack-data->ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (3.0.0)\n", + "Requirement already satisfied: executing>=1.2.0 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from stack-data->ipython>=6.1.0->ipywidgets==8.1.0->-r requirements.txt (line 7)) (2.2.1)\n", + "Requirement already satisfied: charset_normalizer<4,>=2 in /Users/c5408555/Downloads/notebook-update-v2/venv/lib/python3.9/site-packages (from requests<3.0->ai-api-client-sdk==2.6.1->ai-core-sdk>=2.5.7->generative-ai-hub-sdk==4.4.3->-r requirements.txt (line 1)) (3.4.4)\n", + "\u001b[33mWARNING: You are using pip version 22.0.4; however, version 25.3 is available.\n", + "You should consider upgrading via the '/Users/c5408555/Downloads/notebook-update-v2/venv/bin/python3 -m pip install --upgrade pip' command.\u001b[0m\u001b[33m\n", + "\u001b[0m\u001b[33m(Deprecated) Installing extensions with the jupyter labextension install command is now deprecated and will be removed in a future major version of JupyterLab.\n", + "\n", + "Users should manage prebuilt extensions with package managers like pip and conda, and extension authors are encouraged to distribute their extensions as prebuilt packages \u001b[0m\n", + "Building jupyterlab assets (production, minimized)\n" + ] + } + ], + "source": [ + "! pip install -r requirements.txt\n", + "! jupyter labextension install @jupyter-widgets/jupyterlab-manager" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Load your environment variables\n", + "\n", + "Ensure that your environment variables are set in a `.env` file (see sample.env for an example). If there is a missing field the notebook will prompt you for a value." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "# Loading the credentials from the env file\n", + "from gen_ai_hub.proxy.gen_ai_hub_proxy import GenAIHubProxyClient\n", + "from dotenv import load_dotenv\n", + "import os\n", + "\n", + "load_dotenv(override=True)\n", + "\n", + "\n", + "# Fetching environment variables or prompting the user if missing\n", + "AICORE_BASE_URL = os.getenv(\"AICORE_BASE_URL\") or input(\"AICORE_BASE_URL is missing. Please enter it: \")\n", + "AICORE_RESOURCE_GROUP = os.getenv(\"AICORE_RESOURCE_GROUP\") or input(\"AICORE_RESOURCE_GROUP is missing. Please enter it (default: 'default'): \") or \"default\"\n", + "AICORE_AUTH_URL = os.getenv(\"AICORE_AUTH_URL\") or input(\"AICORE_AUTH_URL is missing. Please enter it: \")\n", + "AICORE_CLIENT_ID = os.getenv(\"AICORE_CLIENT_ID\") or input(\"AICORE_CLIENT_ID is missing. Please enter it: \")\n", + "AICORE_CLIENT_SECRET = os.getenv(\"AICORE_CLIENT_SECRET\") or input(\"AICORE_CLIENT_SECRET is missing. Please enter it: \")\n", + "\n", + "AWS_ACCESS_KEY = os.getenv(\"AWS_ACCESS_KEY\") or input(\"AWS_ACCESS_KEY is missing. Please enter it: \")\n", + "AWS_BUCKET_ID = os.getenv(\"AWS_BUCKET_ID\") or input(\"AWS_BUCKET_ID is missing. Please enter it: \")\n", + "AWS_REGION = os.getenv(\"AWS_REGION\") or input(\"AWS_REGION is missing. Please enter it: \")\n", + "AWS_SECRET_ACCESS_KEY = os.getenv(\"AWS_SECRET_ACCESS_KEY\") or input(\"AWS_SECRET_ACCESS_KEY is missing. Please enter it: \")\n", + "DEPLOYMENT_URL = os.getenv(\"DEPLOYMENT_URL\", None)\n", + "\n", + "# Initializing the GenAIHubProxyClient\n", + "client = GenAIHubProxyClient(\n", + " base_url=AICORE_BASE_URL,\n", + " auth_url=AICORE_AUTH_URL,\n", + " client_id=AICORE_CLIENT_ID,\n", + " client_secret=AICORE_CLIENT_SECRET,\n", + " resource_group=AICORE_RESOURCE_GROUP\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Dependencies and Helper Functions (Step 2)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Prompt configs: ['prompt_template.json']\n", + "Dataset name: medicalqna_dataset.csv\n", + "Prompt template contents: {'template': [{'role': 'user', 'content': 'List the benefits and side effects of the drug in the following consumer health question: {{?question}}.'}]}\n" + ] + } + ], + "source": [ + "import os\n", + "import json\n", + "\n", + "def get_prompt_config_file(folder_path):\n", + " \"\"\"\n", + " Retrieves a list of all JSON file names in the specified folder.\n", + " \"\"\"\n", + " if not os.path.isdir(folder_path):\n", + " print(f\"The folder path '{folder_path}' does not exist.\")\n", + " return []\n", + "\n", + " json_files = [file for file in os.listdir(folder_path) if file.endswith(\".json\")]\n", + "\n", + " if not json_files:\n", + " print(f\"No JSON files were found in the folder '{folder_path}'.\")\n", + " return json_files\n", + "\n", + "\n", + "def get_dataset_file_name(folder_path):\n", + " \"\"\"\n", + " Retrieves the name of the first file in the specified folder.\n", + " \"\"\"\n", + " if not os.path.isdir(folder_path):\n", + " print(f\"The folder path '{folder_path}' does not exist.\")\n", + " return None\n", + "\n", + " items_in_folder = os.listdir(folder_path)\n", + "\n", + " for item in items_in_folder:\n", + " item_path = os.path.join(folder_path, item)\n", + " if os.path.isfile(item_path):\n", + " return item\n", + "\n", + " print(f\"No files were found in the folder '{folder_path}'.\")\n", + " return None\n", + "\n", + "\n", + "def load_prompt_template(folder_path, file_name):\n", + " \"\"\"\n", + " Loads the contents of a JSON prompt template into a variable.\n", + " \"\"\"\n", + " file_path = os.path.join(folder_path, file_name)\n", + " try:\n", + " with open(file_path, \"r\", encoding=\"utf-8\") as f:\n", + " return json.load(f) # returns Python dict\n", + " except Exception as e:\n", + " print(f\"Error loading prompt template: {e}\")\n", + " return None\n", + "\n", + "# --- MAIN EXECUTION ---\n", + "PROMPT_FOLDER = \"./PUT_YOUR_PROMPT_TEMPLATE_HERE\"\n", + "DATASET_FOLDER = \"./PUT_YOUR_DATASET_HERE\"\n", + "\n", + "PROMPT_CONFIG_FILES = get_prompt_config_file(PROMPT_FOLDER)\n", + "DATASET_NAME = get_dataset_file_name(DATASET_FOLDER)\n", + "\n", + "if PROMPT_CONFIG_FILES and DATASET_NAME:\n", + " # Load the first JSON prompt template\n", + " PROMPT_TEMPLATE = load_prompt_template(PROMPT_FOLDER, PROMPT_CONFIG_FILES[0])\n", + " print(f\"Prompt configs: {PROMPT_CONFIG_FILES}\")\n", + " print(f\"Dataset name: {DATASET_NAME}\")\n", + " print(\"Prompt template contents:\", PROMPT_TEMPLATE)\n", + "else:\n", + " print(\"Missing run or dataset file.\")\n", + " raise SystemExit(\"Exiting due to missing run/dataset file.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Register an Object Store Secret\n", + "To use the evaluations service, you must register an object store with the name default. Optionally, you can register an additional object store with a name of your choice." + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "# setup authentication and headers needed for AI Core requests\n", + "def _get_headers():\n", + " headers = {\n", + " \"Authorization\": client.get_ai_core_token(),\n", + " \"AI-Resource-Group\": AICORE_RESOURCE_GROUP,\n", + " \"Content-Type\": \"application/json\",\n", + " }\n", + " return headers" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Successfully deleted object store secret: default\n", + "Successfully deleted object store secret: genai-quick-data-notebook\n" + ] + }, + { + "data": { + "text/plain": [ + "{'message': 'secret has been created'}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Register S3 secret with AI Core which will be used an input source \n", + "import requests\n", + "import json\n", + "import logging\n", + "\n", + "def delete_oss_secret(oss_name=\"\"):\n", + " headers = _get_headers()\n", + " \n", + " DELETE_SECRETS_ENDPOINT = f'/v2/admin/objectStoreSecrets/{oss_name}'\n", + " request_url = f\"{AICORE_BASE_URL}{DELETE_SECRETS_ENDPOINT}\"\n", + " \n", + " try:\n", + " response = requests.delete(request_url, headers=headers, timeout=120)\n", + " if response.status_code == 202:\n", + " print(f\"Successfully deleted object store secret: {oss_name}\")\n", + " elif response.status_code == 404:\n", + " print(f\"Object store secret not found: {oss_name}. It may not exist.\")\n", + " else:\n", + " logging.error(f\"Failed to delete object store secret: {oss_name}, Status Code: {response.status_code}\")\n", + " except Exception as e:\n", + " logging.error(f\"Error occurred while attempting to delete object store secret: {e}\")\n", + " raise\n", + "\n", + "def register_oss_secret(oss_name=\"\", path_prefix=\"\"):\n", + " headers = _get_headers()\n", + " \n", + " POST_SECRETS_ENDPOINT = '/v2/admin/objectStoreSecrets'\n", + " request_url = f\"{AICORE_BASE_URL}{POST_SECRETS_ENDPOINT}\"\n", + " \n", + " request_body = {\n", + " \"name\": oss_name,\n", + " \"data\": {\n", + " \"AWS_ACCESS_KEY_ID\": AWS_ACCESS_KEY,\n", + " \"AWS_SECRET_ACCESS_KEY\": AWS_SECRET_ACCESS_KEY\n", + " },\n", + " \"type\": \"S3\",\n", + " \"bucket\": AWS_BUCKET_ID,\n", + " \"endpoint\": \"s3-eu-central-1.amazonaws.com\",\n", + " \"region\": AWS_REGION,\n", + " \"pathPrefix\": path_prefix,\n", + " \"verifyssl\": \"0\",\n", + " \"usehttps\": \"1\",\n", + " }\n", + " try:\n", + " response = requests.post(\n", + " request_url, headers=headers, data=json.dumps(request_body), timeout=120\n", + " )\n", + " result = response.json()\n", + " return result\n", + " except:\n", + " logging.error(\"Error occurred while attempting to create object store secret\")\n", + " raise\n", + " \n", + "delete_oss_secret(oss_name=\"default\")\n", + "delete_oss_secret(oss_name=\"genai-quick-data-notebook\")\n", + " \n", + "register_oss_secret(oss_name=\"default\", path_prefix=\"\")\n", + "register_oss_secret(oss_name=\"genai-quick-data-notebook\", path_prefix=\"\")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "val of root is medicalqna_dataset.csv\n", + "val of s3 key is genaiEvaluation/I321506/testdata/medicalqna_dataset.csv\n", + "Uploading ./PUT_YOUR_DATASET_HERE\\medicalqna_dataset.csv to s3://hcp-b60330de-a879-4848-9a3d-0ac828f4517c/genaiEvaluation/I321506/testdata/medicalqna_dataset.csv\n" + ] + } + ], + "source": [ + "# uploading these files to Object store to register as an artifact inside ai core\n", + "\n", + "import boto3\n", + "import os\n", + "import uuid\n", + "\n", + "def upload_folder_to_s3(folder_path, bucket_name, s3_prefix=\"\"):\n", + " \"\"\"\n", + " Upload a folder to an S3 bucket recursively.\n", + "\n", + " :param folder_path: The local folder path to upload.\n", + " :param bucket_name: The name of the S3 bucket.\n", + " :param s3_prefix: Optional prefix to use for the S3 keys (e.g., subfolder in the bucket).\n", + " \"\"\"\n", + " s3_client = boto3.client(\n", + " 's3',\n", + " aws_access_key_id=AWS_ACCESS_KEY,\n", + " aws_secret_access_key=AWS_SECRET_ACCESS_KEY,\n", + " region_name=AWS_REGION\n", + " )\n", + "\n", + " for root, dirs, files in os.walk(folder_path):\n", + " for file_name in files:\n", + " print(\"val of root is \", file_name)\n", + " local_path = os.path.join(root, file_name)\n", + " # Compute the relative path for the S3 key\n", + " relative_path = os.path.relpath(local_path, folder_path)\n", + " s3_key = os.path.join(s3_prefix, relative_path).replace(\"\\\\\", \"/\") # Ensure S3-compatible paths\n", + " print(\"val of s3 key is \", s3_key)\n", + " print(f\"Uploading {local_path} to s3://{bucket_name}/{s3_key}\")\n", + " \n", + " # Upload the file\n", + " s3_client.upload_file(local_path, bucket_name, s3_key)\n", + "\n", + "# Example usage\n", + "folder_to_upload_testdata = \"./PUT_YOUR_DATASET_HERE\"\n", + "folder_to_upload_custommetric = \"./PUT_YOUR_CUSTOM_METRIC_HERE\"\n", + "user_directory_prefix = \"I321506\" # replace with your i-number as string here\n", + "prefix_guid = user_directory_prefix if user_directory_prefix is not None else str(uuid.uuid4().hex)\n", + "s3_testdata_prefix = f\"genaiEvaluation/{prefix_guid}/testdata\" # Leave empty for root of the bucket\n", + "\n", + "\n", + "upload_folder_to_s3(folder_to_upload_testdata, AWS_BUCKET_ID, s3_testdata_prefix)\n", + "input_artifact_path = f\"ai://genai-quick-data-notebook/genaiEvaluation/{prefix_guid}\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The user stores the input files in the object store and registers the root folder as artifact with AI Core. The File Upload and Artifact endpoints of AI Core API may be used for this purpose. In this example `genaiEvaluation\\{prefix_guid}` is the root folder containing the orchestration configurations and test data which is registered as AI Core artifact." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'id': '75dd115f-1707-4de6-9031-ce22d8c12015', 'message': 'Artifact acknowledged', 'url': 'ai://genai-quick-data-notebook/genaiEvaluation/I321506'}\n" + ] + } + ], + "source": [ + "import requests\n", + "import logging\n", + "# Registering the uploaded files from AWS as artifacts to use inside configuration.\n", + "\n", + "def register_artifact():\n", + " headers = _get_headers()\n", + " \n", + " GET_ARTIFACTS_ENDPOINT = '/v2/lm/artifacts'\n", + " request_url = f\"{AICORE_BASE_URL}{GET_ARTIFACTS_ENDPOINT}\"\n", + " \n", + " request_body = {\n", + " \"labels\": [\n", + " {\n", + " \"key\": \"ext.ai.sap.com/prompt-evaluation\",\n", + " \"value\": \"true\"\n", + " }\n", + " ],\n", + " \"name\": \"genai-eval-simplified-test-data\",\n", + " \"kind\": \"other\",\n", + " \"url\": input_artifact_path, # input artifact path\n", + " \"description\": \"demo artifacts for evaluation flow.\",\n", + " \"scenarioId\": \"genai-evaluations\"\n", + " }\n", + " try:\n", + " response = requests.post(\n", + " request_url, headers=headers, data=json.dumps(request_body), timeout=120\n", + " )\n", + " result = response.json()\n", + " print(result)\n", + " return result['id']\n", + " except:\n", + " print(\"Error occurred while attempting to create an execution\")\n", + " raise\n", + " \n", + "\n", + "artifact_id = register_artifact()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Create Orchestration Deployment\n", + "An orchestration Deployment URL is required for us to run our evaluation. Once created we need to wait until the deployment is running and provides us a deployment url which will be add to our configuration file in the next step. You can skip this step if you already have a orchestration deployment running." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "import requests\n", + "import json\n", + "import time\n", + "\n", + "\n", + "\n", + "def create_orchestration_configuration():\n", + " headers = _get_headers()\n", + " request_body = {\n", + " \"name\": \"orchestrationDeployment\",\n", + " \"executableId\": \"orchestration\",\n", + " \"scenarioId\": \"orchestration\",\n", + " \"parameterBindings\": [\n", + " {\n", + " \"key\": \"modelFilterList\",\n", + " \"value\": \"null\"\n", + " },\n", + " {\n", + " \"key\": \"modelFilterListType\",\n", + " \"value\": \"allow\"\n", + " }\n", + " ],\n", + " \"inputArtifactBindings\": []\n", + " }\n", + " \n", + " GET_CONFIGURATIONS_ENDPOINT = '/v2/lm/configurations'\n", + " request_url = f\"{AICORE_BASE_URL}{GET_CONFIGURATIONS_ENDPOINT}\"\n", + " try:\n", + " response = requests.post(\n", + " request_url, headers=headers, data=json.dumps(request_body), timeout=120\n", + " )\n", + " print(response)\n", + " if(response.status_code != 201):\n", + " raise\n", + " result = response.json()\n", + " print(result)\n", + " return result['id']\n", + " except:\n", + " logging.error(\"Error occurred while attempting to create a Configuration\")\n", + " raise\n", + " \n", + "def execute_orchestration_deployment(configuration_id):\n", + " headers = _get_headers()\n", + " GET_DEPLOYMENTS_ENDPOINT = '/v2/lm/deployments'\n", + " request_url = f\"{AICORE_BASE_URL}{GET_DEPLOYMENTS_ENDPOINT}\"\n", + " \n", + " request_body = {\n", + " \"configurationId\": configuration_id\n", + " }\n", + " \n", + " try:\n", + " response = requests.post(\n", + " request_url, headers=headers, data=json.dumps(request_body), timeout=120\n", + " )\n", + " print(response)\n", + " if(response.status_code != 202):\n", + " print(\"Deployment execution failed\")\n", + " result = response.json()\n", + " print(result)\n", + " return result['id']\n", + " \n", + " except:\n", + " logging.error(\"Error occurred while attempting to create an execution\")\n", + " raise\n", + "\n", + "def get_deployment_status(orchestration_deployment_id):\n", + " headers = _get_headers()\n", + " api_url = f\"{AICORE_BASE_URL}/v2/lm/deployments/{orchestration_deployment_id}?$select=status\"\n", + " timeout = 400 \n", + " initial_interval = 30 \n", + " pending_interval = 10\n", + " start = time.time()\n", + "\n", + " status = None\n", + " current_interval = initial_interval\n", + "\n", + " while time.time() - start < timeout:\n", + " response = requests.get(api_url, headers=headers)\n", + " if response.status_code == 200:\n", + " status = response.json().get('status')\n", + " print(f\"Deployment {orchestration_deployment_id} status: {status}\")\n", + " # Adjust polling interval based on status\n", + " if status == 'RUNNING':\n", + " return True\n", + " elif status == 'UNKNOWN':\n", + " current_interval = initial_interval\n", + " elif status == 'PENDING':\n", + " current_interval = pending_interval\n", + "\n", + " else:\n", + " print(f\"Failed to fetch deployment status. HTTP {response.status_code}\")\n", + " return False\n", + "\n", + " # Waiting according to status for API call\n", + " time.sleep(current_interval)\n", + "\n", + "def get_deployment_url(orchestration_deployment_id):\n", + " headers = _get_headers()\n", + " response = requests.get(f\"{AICORE_BASE_URL}/v2/lm/deployments/{orchestration_deployment_id}\", headers=headers)\n", + " if response.status_code != 200:\n", + " raise Exception(f\"Failed to get deployment URL: {response.status_code} - {response.text}\")\n", + " return response.json().get('deploymentUrl')\n", + "\n", + "# You can skip this step if you already have a orchestration deployment running\n", + "deployment_url = DEPLOYMENT_URL\n", + "if not deployment_url:\n", + " configuration_id = create_orchestration_configuration()\n", + " orchestration_deployment_id = execute_orchestration_deployment(configuration_id)\n", + " is_running = get_deployment_status(orchestration_deployment_id) \n", + " if is_running:\n", + " deployment_url = get_deployment_url(orchestration_deployment_id)\n", + " print(f\"Deployment URL: {deployment_url}\")\n", + " else:\n", + " print(\"Deployment is not running or failed.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Approach Selection\n", + "\n", + "Select whether to use `Prompt Registry` or `Orchestration Registry` approach" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "50f821a5ff974acebf2de68badce0bd3", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(Label(value='Please select the configuration mode:', layout=Layout(margin='10px 0px 10px 0px'))…" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from ipywidgets import Checkbox, VBox, HBox, Output, Label, Layout\n", + "from IPython.display import display\n", + "import textwrap\n", + "\n", + "# --- Selection state ---\n", + "approach = None\n", + "suppress_update = False \n", + "\n", + "# --- Define options ---\n", + "flag_options = [\n", + " \"prompt_registry\",\n", + " \"orchestration_registry\"\n", + "]\n", + "\n", + "# --- Output widget to show current selection ---\n", + "\n", + "output = Output(layout=Layout(border=\"1px solid black\", height=\"70px\", overflow=\"auto\", width=\"900px\"))\n", + "\n", + "\n", + "# --- Handler for checkbox changes ---\n", + "def on_flag_change(change):\n", + " global approach, suppress_update\n", + " if suppress_update:\n", + " return\n", + "\n", + " if change[\"new\"]: # A checkbox was checked\n", + " suppress_update = True\n", + " # Uncheck all other checkboxes\n", + " for cb in checkboxes:\n", + " if cb.description != change[\"owner\"].description:\n", + " cb.value = False\n", + " suppress_update = False\n", + " approach = change[\"owner\"].description\n", + " else:\n", + " # Only clear if the unchecked one was the currently selected\n", + " if approach == change[\"owner\"].description:\n", + " approach = None\n", + "\n", + " # Update display once per action\n", + " with output:\n", + " output.clear_output(wait=True)\n", + " msg = f\"Selected approach: {approach or 'None'}\"\n", + " wrapped = textwrap.fill(msg, width=60)\n", + " output.append_stdout(wrapped + \"\\n\")\n", + "\n", + "# --- Create checkboxes ---\n", + "checkboxes = [\n", + " Checkbox(value=False, description=option, layout=Layout(width=\"250px\"))\n", + " for option in flag_options\n", + "]\n", + "\n", + "# --- Attach event handler ---\n", + "for cb in checkboxes:\n", + " cb.observe(on_flag_change, names=\"value\")\n", + "\n", + "# --- Display UI ---\n", + "header = Label(\n", + " value=\"Please select the configuration mode:\",\n", + " layout=Layout(margin=\"10px 0px 10px 0px\")\n", + ")\n", + "ui = VBox([header, HBox(checkboxes), output])\n", + "display(ui)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "orchestration_registry\n" + ] + } + ], + "source": [ + "# Select the approach, either \"prompt_registry\" or orchestration_registry\"\n", + "print(approach)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create a Prompt Template in Prompt Registry (Prompt Registry Approach)\n", + "\n", + "The following code defines a function `create_prompt_template()` that creates a new **Prompt Template** in the SAP AI Core **Prompt Registry**.\n", + "\n", + "**Note** : If you wish to use a prompt template that already exists in prompt registry, you can manually set `prompt_template_id` in the next cell and skip executing this cell" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'message': 'Prompt updated successfully.', 'id': 'cf1908d7-c793-497d-ab8c-4e220f41102b', 'scenario': 'genai-evaluations', 'name': 'prompt-registry-eval-acc-test', 'version': '1.0.0'}\n" + ] + } + ], + "source": [ + "def create_prompt_template():\n", + " headers = _get_headers()\n", + " GET_PROMPT_TEMPLATES_ENDPOINT = '/v2/lm/promptTemplates'\n", + " request_url = f\"{AICORE_BASE_URL}{GET_PROMPT_TEMPLATES_ENDPOINT}\"\n", + " \n", + " request_body = {\n", + " \"name\": \"prompt-registry-eval-acc-test\",\n", + " \"version\": \"1.0.0\",\n", + " \"scenario\": \"genai-evaluations\",\n", + " \"spec\": PROMPT_TEMPLATE\n", + " }\n", + " try:\n", + " response = requests.post(\n", + " request_url, headers=headers, data=json.dumps(request_body), timeout=120\n", + " )\n", + " if(response.status_code != 200):\n", + " raise\n", + " result = response.json()\n", + " print(result)\n", + " return result['id']\n", + " except:\n", + " logging.error(\"Error occurred while attempting to create a prompt template\")\n", + " raise\n", + "\n", + "prompt_template_id = create_prompt_template()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Manually set prompt_template_id here if you wish to use pre existing prompt template\n", + "# prompt_template_id=\"\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Select your metrics\n", + " \n", + "Tick the metrics you wish to use. If the widget does not load properly, you can manually fill in the string `selected_metrics_str`\n", + "\n", + "**Note: If your dataset does not have a reference column, DO NOT Select metrcis where reference is required.**" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "4a1db8c29df04fc3b03700fca7ba83a6", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(Label(value='Please choose which metrics you want to run', layout=Layout(margin='10px 0px 10px …" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from ipywidgets import Checkbox, VBox, HBox, Output, Label, Layout\n", + "import textwrap\n", + "\n", + "\n", + "# List to store selected values\n", + "selected_values = []\n", + "\n", + "# Original list of checkbox options\n", + "checkbox_options = [\n", + " \"Content Filter on Input\",\n", + " \"Content Filter on Output\",\n", + " \"Pointwise Instruction Following\",\n", + " \"Pointwise Answer Relevance\",\n", + " \"Pointwise Conciseness\"\n", + "]\n", + "\n", + "# Additional options with \"(reference required)\" in their description\n", + "additional_options = [\n", + " f\"{option} (reference required)\" for option in [\"BLEU\", \"ROUGE\", \"BERT Score\", \"Pointwise Correctness\"]\n", + "]\n", + "\n", + "# Combine both lists\n", + "all_checkbox_options = checkbox_options + additional_options\n", + "\n", + "# Function to handle checkbox changes\n", + "def on_checkbox_change(change):\n", + " global selected_metrics_str # Declare the string version of selected_values as global\n", + " if change['new']: # If the checkbox is checked\n", + " # Remove \"(reference required)\" before adding to the list\n", + " metric_name = change['owner'].description.replace(\" (reference required)\", \"\")\n", + " if metric_name not in selected_values:\n", + " selected_values.append(metric_name)\n", + " else: # If the checkbox is unchecked\n", + " # Remove \"(reference required)\" before removing from the list\n", + " metric_name = change['owner'].description.replace(\" (reference required)\", \"\")\n", + " if metric_name in selected_values:\n", + " selected_values.remove(metric_name)\n", + " # Convert the list to a comma-separated string\n", + " selected_metrics_str = \",\".join(selected_values)\n", + " # Display the updated list with wrapped text\n", + " with output:\n", + " output.clear_output(wait=True) # Clear the output before printing\n", + " wrapped_text = textwrap.fill(f\"Selected values: {selected_values}\", width=80)\n", + " output.append_stdout(wrapped_text + \"\\n\") # Write directly to the output widget\n", + "\n", + "# Create checkboxes for the combined options with wider layout\n", + "checkboxes = [\n", + " Checkbox(value=False, description=option, layout=Layout(width=\"900px\")) for option in all_checkbox_options\n", + "]\n", + "\n", + "# Attach the change handler to each checkbox\n", + "for checkbox in checkboxes:\n", + " checkbox.observe(on_checkbox_change, names='value')\n", + "\n", + "# Group checkboxes into rows (2 per row)\n", + "rows = [HBox(checkboxes[i:i+2]) for i in range(0, len(checkboxes), 2)]\n", + "\n", + "# Output widget to display the selected values with a scrollable and wrapped area\n", + "output = Output(layout=Layout(border=\"1px solid black\", height=\"150px\", overflow=\"auto\", width=\"900px\"))\n", + "\n", + "# Header label\n", + "header = Label(value=\"Please choose which metrics you want to run\", layout=Layout(margin=\"10px 0px 10px 0px\"))\n", + "\n", + "# Display the header, checkboxes in rows, and the output\n", + "display(VBox([header] + rows + [output]))\n", + "\n", + "# Initialize the string version of selected_values\n", + "selected_metrics_str = \",\".join(selected_values)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "BERT Score,Pointwise Conciseness\n" + ] + } + ], + "source": [ + "# Manual Selection of Metrics\n", + "#selected_metrics_str = \"rouge\"\n", + "print(selected_metrics_str)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "This script checks for an evaluation metric in SAP AI Core.\n", + "\n", + "1. You can provide Metric ID's directly by setting the variable as comma separated string:\n", + " user_metric_ids = `\"\"`\n", + " - ✅ If the ID exists, it will be returned.\n", + " \n", + "2. Script reads all `.json` and `.jsonl` files from `CUSTOM_METRIC_FOLDER` to load the custom metrics\n", + " -The loaded metrics are stored in `custom_metric_list'\n", + " - The script will use the contents of the `custom_metric_list`\n", + " to search for an existing metric by scenario + name + version.\n", + "\n", + "3. If no existing metric is found:\n", + " - A new metric will be created using the details in `custom_metric_list`.\n", + " - Required fields in custom_metric: scenario, name, version, evaluationMethod.\n", + "\n", + "4. At the end:\n", + " - The script prints the final Metric ID that was found or created.\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "✅ Metric already exists: genai-evaluations/groundedness v0.0.1, ID = 2b3cc135-a031-4d93-8641-1f3833797034\n", + "✅ Metric already exists: genai-evaluations/groundedness v0.1.6, ID = 9b349f8e-cd39-486d-809c-3dcfa3b15ac7\n", + "⚠️ User metric ID d1868b00-1601-407a-92cd-0b9065682d1f does not exist in AI Core, skipping.\n", + "⚠️ User metric ID dbf56851-8444-45d3-a0c1-adbe210c7e771 does not exist in AI Core, skipping.\n", + "✅ All processed metric IDs: 2b3cc135-a031-4d93-8641-1f3833797034,9b349f8e-cd39-486d-809c-3dcfa3b15ac7\n" + ] + } + ], + "source": [ + "import os\n", + "import json\n", + "import requests\n", + "\n", + "# --- Load JSON / JSONL files ---\n", + "def load_all_metrics(folder_path):\n", + " \"\"\"\n", + " Loads all JSON and JSONL files from a folder into a single list of dicts.\n", + " \"\"\"\n", + " metrics = []\n", + " files = [f for f in os.listdir(folder_path) if f.endswith((\".json\", \".jsonl\"))]\n", + "\n", + " if not files:\n", + " print(f\"No JSON/JSONL files found in {folder_path}\")\n", + " return metrics\n", + "\n", + " for file_name in files:\n", + " file_path = os.path.join(folder_path, file_name)\n", + " try:\n", + " with open(file_path, \"r\", encoding=\"utf-8\") as f:\n", + " content = f.read().strip()\n", + " try:\n", + " data = json.loads(content)\n", + " if isinstance(data, list):\n", + " metrics.extend(data)\n", + " elif isinstance(data, dict):\n", + " metrics.append(data)\n", + " except json.JSONDecodeError:\n", + " # Attempt to parse as JSONL line by line\n", + " for line in content.splitlines():\n", + " line = line.strip()\n", + " if not line:\n", + " continue\n", + " try:\n", + " metrics.append(json.loads(line))\n", + " except json.JSONDecodeError:\n", + " print(f\"Skipping invalid JSON line in {file_name}: {line[:50]}...\")\n", + " except Exception as e:\n", + " print(f\"Error reading {file_name}: {e}\")\n", + " return metrics\n", + "\n", + "# --- Fetch all metrics from SAP AI Core ---\n", + "def fetch_all_metrics():\n", + " request_url = f\"{AICORE_BASE_URL}/v2/lm/evaluationMetrics\"\n", + " resp = requests.get(request_url, headers=_get_headers())\n", + " resp.raise_for_status()\n", + " return resp.json().get(\"resources\", [])\n", + "\n", + "# --- Create or fetch a metric ---\n", + "def create_or_get_metric(custom_metric, user_metric_id=None):\n", + " all_metrics = fetch_all_metrics()\n", + "\n", + " # 1️⃣ User-supplied ID lookup\n", + " if user_metric_id:\n", + " for m in all_metrics:\n", + " if m.get(\"id\") == user_metric_id:\n", + " print(f\"✅ Metric already exists by ID: {user_metric_id}\")\n", + " return user_metric_id\n", + " print(f\"⚠️ User metric ID {user_metric_id} not found, will only include if valid later\")\n", + "\n", + " # 2️⃣ Check by scenario, name, version\n", + " scenario = custom_metric.get(\"scenario\")\n", + " name = custom_metric.get(\"name\")\n", + " version = custom_metric.get(\"version\")\n", + " if not all([scenario, name, version]):\n", + " raise ValueError(\"Metric must include 'scenario', 'name', and 'version'\")\n", + "\n", + " for m in all_metrics:\n", + " if (m.get(\"scenario\") == scenario and\n", + " m.get(\"name\") == name and\n", + " m.get(\"version\") == version):\n", + " metric_id = m.get(\"id\")\n", + " print(f\"✅ Metric already exists: {scenario}/{name} v{version}, ID = {metric_id}\")\n", + " return metric_id\n", + "\n", + " # 3️⃣ Create metric if not found\n", + " request_url = f\"{AICORE_BASE_URL}/v2/lm/evaluationMetrics\"\n", + " required_fields = [\"scenario\", \"name\", \"version\", \"evaluationMethod\", \"metricType\"]\n", + " for f in required_fields:\n", + " if f not in custom_metric:\n", + " raise ValueError(f\"❌ Missing required field: {f}\")\n", + "\n", + " resp = requests.post(request_url, headers=_get_headers(), json=custom_metric)\n", + " resp.raise_for_status()\n", + " metric_id = resp.json().get(\"id\")\n", + " print(f\"✅ Metric created successfully: {name} v{version}, ID = {metric_id}\")\n", + " return metric_id\n", + "\n", + "# --- Main pipeline ---\n", + "CUSTOM_METRIC_FOLDER = \"./PUT_YOUR_CUSTOM_METRIC_HERE\"\n", + "user_metric_ids = \"d1868b00-1601-407a-92cd-0b9065682d1f,dbf56851-8444-45d3-a0c1-adbe210c7e771\" # set by user if needed\n", + "\n", + "# 1️⃣ Load all metrics from JSON/JSONL\n", + "custom_metric_list = load_all_metrics(CUSTOM_METRIC_FOLDER)\n", + "\n", + "# 2️⃣ Create/fetch metrics from SAP AI Core\n", + "metric_ids = []\n", + "for metric in custom_metric_list:\n", + " try:\n", + " metric_id = create_or_get_metric(metric)\n", + " metric_ids.append(metric_id)\n", + " except ValueError as e:\n", + " print(f\"Skipping metric due to error: {e}\")\n", + "\n", + "# 3️⃣ Validate user_metric_ids separately if provided\n", + "if user_metric_ids and user_metric_ids.strip():\n", + " all_metrics = fetch_all_metrics()\n", + " # Split comma-separated IDs and strip whitespace\n", + " for uid in [uid.strip() for uid in user_metric_ids.split(\",\")]:\n", + " if any(m.get(\"id\") == uid for m in all_metrics):\n", + " metric_ids.append(uid)\n", + " else:\n", + " print(f\"⚠️ User metric ID {uid} does not exist in AI Core, skipping.\")\n", + "# 4️⃣ Convert to comma-separated string\n", + "custom_metric_ids_str = \",\".join(metric_ids)\n", + "print(\"✅ All processed metric IDs:\", custom_metric_ids_str)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Select your Models\n", + " \n", + "Tick the metrics you wish to use. If the widget does not load properly, you can manually fill in the string `selected_models_str`\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "1ab806f2179a4deab49fd0cd761a863a", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + "VBox(children=(Label(value='Please choose which LLM models you want to run:', layout=Layout(margin='10px 0px 1…" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import requests\n", + "import textwrap\n", + "from functools import partial\n", + "from ipywidgets import Checkbox, VBox, HBox, Output, Label, Layout\n", + "from IPython.display import display\n", + "\n", + "\n", + "# --- Call the API ---\n", + "GET_MODELS_ENDPOINT = '/v2/lm/scenarios/foundation-models/models'\n", + "request_url = f\"{AICORE_BASE_URL}{GET_MODELS_ENDPOINT}\"\n", + "headers = _get_headers() # your existing function\n", + "response = requests.get(request_url, headers=headers)\n", + "models_data = response.json()\n", + "# --- Extract model options ---\n", + "llm_options = []\n", + "resources = models_data.get(\"resources\", [])\n", + "for m in resources:\n", + " display_name = m.get(\"displayName\") or m.get(\"name\") or m.get(\"model\", \"Unknown\")\n", + " model_id = m.get(\"model\", m.get(\"id\", \"unknown\"))\n", + "\n", + " versions = m.get(\"versions\", [])\n", + " version = \"latest\"\n", + " if versions:\n", + " latest = next((v for v in versions if v.get(\"isLatest\")), versions[0])\n", + " version = latest.get(\"name\") or \"latest\"\n", + "\n", + " label = f\"{display_name} ({model_id}, v:{version})\"\n", + " value = f\"{model_id}:{version}\"\n", + " llm_options.append({\"label\": label, \"value\": value})\n", + "\n", + "# --- Selection state ---\n", + "selected_models = []\n", + "selected_models_str = \"\" # <-- your comma-separated string\n", + "output = Output(layout=Layout(border=\"1px solid black\", height=\"150px\", overflow=\"auto\", width=\"900px\"))\n", + "\n", + "def update_output():\n", + " global selected_models_str\n", + " selected_models_str = \",\".join(selected_models)\n", + " with output:\n", + " output.clear_output(wait=True)\n", + " if selected_models_str:\n", + " wrapped_text = textwrap.fill(f\"Selected models: {selected_models_str}\", width=80)\n", + " output.append_stdout(wrapped_text + \"\\n\")\n", + "\n", + "# --- Callback handler ---\n", + "def on_checkbox_change(model_value, change):\n", + " # Ignore redundant triggers\n", + " if change[\"old\"] == change[\"new\"]:\n", + " return\n", + "\n", + " if approach == \"prompt_registry\":\n", + " # Multiple selections allowed\n", + " if change[\"new\"]:\n", + " if model_value not in selected_models:\n", + " selected_models.append(model_value)\n", + " else:\n", + " if model_value in selected_models:\n", + " selected_models.remove(model_value)\n", + " else:\n", + " # Single selection only\n", + " if change[\"new\"]:\n", + " # Uncheck all other boxes\n", + " for cb in checkboxes:\n", + " if cb.model_value != model_value:\n", + " cb.unobserve_all()\n", + " cb.value = False\n", + " cb.observe(partial(on_checkbox_change, cb.model_value), names=\"value\")\n", + " selected_models.clear()\n", + " selected_models.append(model_value)\n", + " else:\n", + " if model_value in selected_models:\n", + " selected_models.remove(model_value)\n", + "\n", + " update_output()\n", + "\n", + "# --- Create checkboxes + labels ---\n", + "checkboxes = []\n", + "checkbox_rows = []\n", + "for opt in llm_options:\n", + " cb = Checkbox(value=False, indent=False, layout=Layout(width=\"30px\"))\n", + " cb.model_value = opt[\"value\"] # attach model identifier\n", + " cb.observe(partial(on_checkbox_change, opt[\"value\"]), names=\"value\")\n", + " lbl = Label(value=opt[\"label\"], layout=Layout(width=\"850px\"))\n", + " checkboxes.append(cb)\n", + " checkbox_rows.append(HBox([cb, lbl]))\n", + "\n", + "# --- Display ---\n", + "header = Label(value=\"Please choose which LLM models you want to run:\", layout=Layout(margin=\"10px 0px 10px 0px\"))\n", + "display(VBox([header] + checkbox_rows + [output]))\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Selected models string: gpt-4o:2024-08-06\n" + ] + } + ], + "source": [ + "# Manual selection of models\n", + "# selected_models_str=\"gpt-4o:2024-08-06\"\n", + "print(\"Selected models string:\", selected_models_str)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create orchestration registry config (Only needed if you chose orchestraion registry approach)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'message': 'Orchestration config updated successfully.', 'id': '96f7424b-496d-4c47-8f14-0c6562e7744f', 'scenario': 'genai-evaluations', 'name': 'genai-eval-test', 'version': '1.0.0'}\n" + ] + } + ], + "source": [ + "def create_orchestration_registry_config():\n", + " headers = _get_headers()\n", + " CREATE_ORCHESTRATION_REGISTRY = '/v2/registry/v2/orchestrationConfigs'\n", + " request_url = f\"{AICORE_BASE_URL}{CREATE_ORCHESTRATION_REGISTRY}\"\n", + " model_name,model_version=selected_models_str.split(\":\")\n", + " request_body = {\n", + " \"name\": \"genai-eval-test\",\n", + " \"version\": \"1.0.0\",\n", + " \"scenario\": \"genai-evaluations\",\n", + " \"spec\": {\n", + " \"modules\": {\n", + " \"prompt_templating\": {\n", + " \"model\": {\n", + " \"name\": model_name,\n", + " \"version\": model_version\n", + " },\n", + " \"prompt\": PROMPT_TEMPLATE\n", + " }\n", + " }\n", + " }\n", + " }\n", + " try:\n", + " response = requests.post(\n", + " request_url, headers=headers, data=json.dumps(request_body), timeout=120\n", + " )\n", + " if(response.status_code != 200):\n", + " print(response.json())\n", + " raise\n", + " result = response.json()\n", + " print(result)\n", + " return result['id']\n", + " except:\n", + " logging.error(\"Error occurred while attempting to create a orchestration registry id\")\n", + " raise\n", + "orchestration_registry_id = create_orchestration_registry_config()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Start Evaluation Run (Step 3)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Selected metrics: BERT Score,Pointwise Conciseness,2b3cc135-a031-4d93-8641-1f3833797034,9b349f8e-cd39-486d-809c-3dcfa3b15ac7\n", + "Selected models: gpt-4o:2024-08-06\n" + ] + } + ], + "source": [ + "\n", + "import json\n", + "test_data_path = f\"testdata/{DATASET_NAME}\" # specify the test data path here. For the full folder just specifying testdata will work\n", + "test_datasets = json.dumps({'path': test_data_path, 'type': 'csv'})\n", + "metrics_list = \",\".join([selected_metrics_str,custom_metric_ids_str])\n", + "models_list = selected_models_str\n", + "print(f\"Selected metrics: {metrics_list}\")\n", + "print(f\"Selected models: {models_list}\")\n", + "#variable_mapping = json.dumps({'prompt/question': 'data/topic'}) # to map the question prompt variable to the entry in dataset.\n", + "# orchestration_deployment_url = deployment_url # needs to specify this to use a specific deployment id\n", + "orchestration_deployment_url = \"https://api.ai.internalprod.eu-central-1.aws.ml.hana.ondemand.com/v2/inference/deployments/d92895b42bdd6175\"\n", + "repetitions = \"1\"" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "{'id': 'fc21348f-4232-4579-8d21-062b88328ef0', 'message': 'Configuration created'}\n" + ] + } + ], + "source": [ + "# creating an AICORE Configuration.\n", + "import requests\n", + "\n", + "request_body = {\n", + " \"name\": \"genai-eval-conf\",\n", + " \"scenarioId\": \"genai-evaluations\",\n", + " \"executableId\": \"genai-evaluations-simplified\",\n", + " \"inputArtifactBindings\": [\n", + " {\n", + " \"key\": \"datasetFolder\",\n", + " \"artifactId\": artifact_id\n", + " }\n", + " ],\n", + " \"parameterBindings\": [\n", + " {\n", + " \"key\": \"repetitions\",\n", + " \"value\": repetitions\n", + " },\n", + " {\n", + " \"key\": \"orchestrationDeploymentURL\",\n", + " \"value\": orchestration_deployment_url\n", + " },\n", + " {\n", + " \"key\": \"metrics\",\n", + " \"value\": metrics_list\n", + " },\n", + " {\n", + " \"key\": \"testDataset\",\n", + " \"value\": test_datasets\n", + " },\n", + " {\n", + " \"key\": \"promptTemplate\",\n", + " \"value\": prompt_template_id if approach == \"prompt_registry\" else \"\"\n", + " },\n", + " {\n", + " \"key\": \"models\",\n", + " \"value\": models_list if approach == \"prompt_registry\" else \"\"\n", + " },\n", + " {\n", + " \"key\": \"orchestrationRegistryIds\",\n", + " \"value\": orchestration_registry_id if approach == \"orchestration_registry\" else \"\"\n", + " }\n", + " ]\n", + "}\n", + "\n", + "def create_aicore_configuration():\n", + " headers = _get_headers()\n", + " GET_CONFIGURATIONS_ENDPOINT = '/v2/lm/configurations'\n", + " request_url = f\"{AICORE_BASE_URL}{GET_CONFIGURATIONS_ENDPOINT}\"\n", + " try:\n", + " response = requests.post(\n", + " request_url, headers=headers, data=json.dumps(request_body), timeout=120\n", + " )\n", + " print(response)\n", + " if(response.status_code != 201):\n", + " raise\n", + " result = response.json()\n", + " print(result)\n", + " return result['id']\n", + " except:\n", + " logging.error(\"Error occurred while attempting to create a Configuration\")\n", + " raise\n", + " \n", + "configuration_id = create_aicore_configuration()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Evaluation Execution Creation\n", + "Once Configration is create, we create the AI Core execution which triggers the evaluation workload.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "response received is \n", + "{'id': 'e8d0adb660289477', 'message': 'Execution scheduled', 'status': 'UNKNOWN', 'targetStatus': 'COMPLETED'}\n" + ] + } + ], + "source": [ + "# create an execution with the created configuration.\n", + "\n", + "import requests\n", + "def create_execution():\n", + " headers = _get_headers()\n", + " GET_EXECUTIONS_ENDPOINT = '/v2/lm/executions'\n", + " request_url = f\"{AICORE_BASE_URL}{GET_EXECUTIONS_ENDPOINT}\"\n", + " request_body = {\"configurationId\" : configuration_id} \n", + " try:\n", + " response = requests.post(\n", + " request_url, headers=headers, data=json.dumps(request_body), timeout=120\n", + " )\n", + " print(\"response received is \", response)\n", + " result = response.json()\n", + " print(result)\n", + " return result['id']\n", + " except:\n", + " logging.error(\"Error occurred while attempting to create an execution\")\n", + " raise\n", + " \n", + "\n", + "execution_id = create_execution()" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "response received is \n" + ] + }, + { + "data": { + "text/plain": [ + "{'id': 'e8d0adb660289477',\n", + " 'createdAt': '2025-11-14T05:36:34Z',\n", + " 'modifiedAt': '2025-11-14T05:36:34Z',\n", + " 'status': 'COMPLETED',\n", + " 'scenarioId': 'genai-evaluations',\n", + " 'configurationId': 'fc21348f-4232-4579-8d21-062b88328ef0',\n", + " 'targetStatus': 'COMPLETED',\n", + " 'submissionTime': '2025-11-14T05:36:56Z',\n", + " 'startTime': '2025-11-14T05:36:56Z',\n", + " 'completionTime': '2025-11-14T05:52:15Z',\n", + " 'configurationName': 'genai-eval-conf',\n", + " 'executableId': 'genai-evaluations-simplified',\n", + " 'outputArtifacts': [{'id': '80dfbccc-b559-496c-a03a-4d21b18c11be',\n", + " 'createdAt': '2025-11-14T05:52:06Z',\n", + " 'modifiedAt': '2025-11-14T05:52:06Z',\n", + " 'url': 'ai://default/e8d0adb660289477/evaluation_result',\n", + " 'name': 'evaluation_result',\n", + " 'kind': 'resultset',\n", + " 'description': '',\n", + " 'scenarioId': 'genai-evaluations',\n", + " 'executionId': 'e8d0adb660289477'},\n", + " {'id': '2cb535ce-33d0-482d-a673-ba66b0e1df6f',\n", + " 'createdAt': '2025-11-14T05:50:23Z',\n", + " 'modifiedAt': '2025-11-14T05:50:23Z',\n", + " 'url': 'ai://default/e8d0adb660289477/debug_files',\n", + " 'name': 'debug_files',\n", + " 'kind': 'resultset',\n", + " 'description': '',\n", + " 'scenarioId': 'genai-evaluations',\n", + " 'executionId': 'e8d0adb660289477'}]}" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# get execution status\n", + "import requests\n", + "def get_execution_status(execution_id):\n", + " headers = _get_headers()\n", + " LOG_EXECUTIONS_ENDPOINT = f'/v2/lm/executions/{execution_id}'\n", + " request_url = f\"{AICORE_BASE_URL}{LOG_EXECUTIONS_ENDPOINT}\"\n", + " try:\n", + " response = requests.get(\n", + " request_url, headers=headers, timeout=120\n", + " )\n", + " print(\"response received is \", response)\n", + " result = response.json()\n", + " return result\n", + " except:\n", + " logging.error(\"Error occurred while attempting to get execution status\")\n", + " raise\n", + " \n", + "\n", + "get_execution_status(execution_id)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\n", + "\n", + "1. Run the following cells only when the status field in the Execution response is \"COMPLETED\" to view the results.\n", + "2. The status field progresses through different states over time: UNKNOWN → PENDING → RUNNING → COMPLETED. Ensure it reaches COMPLETED before proceeding.\n", + "\n", + "\n", + "Note: The targetStatus will always be COMPLETED from the start, as it represents the intended final state of the Execution. Do not confuse it with the actual status field.\n", + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Evaluation Result (Step 4)\n", + "The evaluation job produces two outputs\n", + "1. A SQLite DB file which stores the orchestration input, orchestration output, values for all the metrics calculated for this orchestration output and statistics such as latency for this orchestration output. These metric values are called raw metric values. This SQLite DB file is stored in the object store as an AI Core output artifact.\n", + "2. A set of metrics whose values are aggregated from the raw metric values. The aggregate metrics are stored in the tracking service. The user-defined tags along with the run names are stored with the metrics.\n", + "Post execution completion user can see the runs generated by the workload along with the aggregate metrics by calling the tracking api as show below" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "response received is \n" + ] + } + ], + "source": [ + "# Get aggregate metrics using execution id\n", + "import requests\n", + "def retrieve_aggregate_metrics(execution_id):\n", + " headers = _get_headers()\n", + " GET_METRICS_ENDPOINT = f'/v2/lm/metrics?tagFilters=evaluation.ai.sap.com/child-of={execution_id}'\n", + " request_url = f\"{AICORE_BASE_URL}{GET_METRICS_ENDPOINT}\"\n", + " try:\n", + " response = requests.get(request_url, headers=headers, timeout=120)\n", + " print(\"response received is \", response)\n", + " result = response.json()\n", + " return result\n", + " except:\n", + " logging.error(\"Error occurred while attempting to retreive aggeregate metrics for the run\")\n", + " raise\n", + "\n", + "runs_data = retrieve_aggregate_metrics(execution_id)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
metrics_nameBERT Score/F1/meanBERT Score/F1/medianBERT Score/F1/p90BERT Score/F1/p95BERT Score/F1/stddevBERT Score/Precision/meanBERT Score/Precision/medianBERT Score/Precision/p90BERT Score/Precision/p95BERT Score/Precision/stddevBERT Score/Recall/meanBERT Score/Recall/medianBERT Score/Recall/p90BERT Score/Recall/p95BERT Score/Recall/stddevPointwise Conciseness/1/countPointwise Conciseness/2/countPointwise Conciseness/3/countPointwise Conciseness/4/countPointwise Conciseness/5/countPointwise Conciseness/meanPointwise Conciseness/medianPointwise Conciseness/p90Pointwise Conciseness/p95Pointwise Conciseness/stddevcompletion_tokens/sumgroundedness/0/countgroundedness/1/countgroundedness/2/countgroundedness/3/countgroundedness/4/countgroundedness/5/countlatency/averageprompt_tokens/sumsubmission/sum
model
gpt-4o0.4665450.4869340.5501160.5614220.0772350.4145020.4457250.4984970.5051580.0810790.5394360.5481890.638810.6629220.0810680.00.013.022.014.04.0204084.05.05.00.74971619553.00.00.00.00.00.00.0105.2847391608.049.0
" + ], + "text/plain": [ + "" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import pandas as pd\n", + "from IPython.display import HTML\n", + "\n", + "def get_model_from_run(run):\n", + " for tag in run.get(\"tags\", []):\n", + " if tag.get(\"name\") == \"evaluation.ai.sap.com/model\":\n", + " return tag.get(\"value\")\n", + "\n", + "def aggregate_metrics_by_model(runs_list):\n", + " transformed_data = []\n", + " for run in runs_list:\n", + " model = get_model_from_run(run)\n", + " for metric in run[\"metrics\"]:\n", + " output_json = {\n", + " \"model\": model,\n", + " \"metrics_name\": metric.get(\"name\"),\n", + " \"metric_value\": metric.get(\"value\")\n", + " }\n", + " transformed_data.append(output_json)\n", + " return transformed_data\n", + "\n", + "\n", + "def create_metrics_pivot_table(transformed_data):\n", + " \"\"\"\n", + " Creates a pivot table where rows are models and columns are metrics.\n", + " \n", + " Args:\n", + " transformed_data: List of dictionaries with 'model', 'metrics_name', 'metric_value'\n", + " \n", + " Returns:\n", + " DataFrame with models as rows and metrics as columns\n", + " \"\"\"\n", + " # Convert list of dictionaries to DataFrame\n", + " df = pd.DataFrame(transformed_data)\n", + " \n", + " # Create pivot table\n", + " pivot_table = df.pivot_table(\n", + " index='model',\n", + " columns='metrics_name',\n", + " values='metric_value',\n", + " aggfunc='first' # Use 'first' to get the single value, or 'mean' if there are duplicates\n", + " )\n", + " \n", + " return pivot_table\n", + "\n", + "transformed_data = aggregate_metrics_by_model(runs_data['resources'])\n", + "metrics_pivot = create_metrics_pivot_table(transformed_data)\n", + "\n", + "HTML(metrics_pivot.to_html())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Process Your Execution Results\n", + "The next steps will take your evaluation run and process it such that it will give you a point based ranking of which particular model did the best based on the metrics you selected" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
BERT Score_scorePointwise Conciseness_score
model
gpt-4o-0.0530110.510204
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
modeltotal_scorerank
0gpt-4o0.2285961
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import pandas as pd\n", + "from IPython.display import HTML\n", + "\n", + "# Scoring logic depends on \"scoring_type\"\n", + "# \"weight\" represents the relative weight of this metric to all SELECTED metrics\n", + "METRICS_SCORING_TYPE_MAPPING = {\n", + " \"Content Filter on Input\": {\n", + " \"scoring_type\": \"bool-false\", # False is good\n", + " \"weight\": 1\n", + " },\n", + " \"Content Filter on Output\": {\n", + " \"scoring_type\": \"bool-false\", # False is good\n", + " \"weight\": 1\n", + " },\n", + " \"Pointwise Instruction Following\": {\n", + " \"scoring_type\": \"num_1_to_5\",\n", + " \"weight\": 1\n", + " },\n", + " \"Pointwise Answer Relevance\": {\n", + " \"scoring_type\": \"num_1_to_5\",\n", + " \"weight\": 1\n", + " },\n", + " \"Pointwise Conciseness\": {\n", + " \"scoring_type\": \"num_1_to_5\",\n", + " \"weight\": 1\n", + " },\n", + " \"Pointwise Correctness\": {\n", + " \"scoring_type\": \"num_1_to_5\",\n", + " \"weight\": 1\n", + " },\n", + " \"BLEU\": {\n", + " \"scoring_type\": \"num_0_to_1\",\n", + " \"weight\": 1\n", + " },\n", + " \"ROUGE\": {\n", + " \"scoring_type\": \"num_0_to_1\",\n", + " \"weight\": 1\n", + " },\n", + " \"BERT Score\": {\n", + " \"scoring_type\": \"F1/Precision/Recall num_0_to_1\",\n", + " \"weight\": 1\n", + " }\n", + "}\n", + "\n", + "def calculate_bool_metric_score(pivot_df, metric_base_name, true_is_good):\n", + " \"\"\"\n", + " Calculate scores for boolean metrics based on False/True counts.\n", + " \n", + " Args:\n", + " pivot_df: DataFrame with models as rows and metrics as columns\n", + " metric_base_name: Base name of the metric (without /False/count or /True/count)\n", + " true_is_good: Boolean indicating if True is considered a good outcome\n", + " \n", + " Returns:\n", + " Series with boolean metric scores per model (scaled to -1 to 1)\n", + " \"\"\"\n", + " false_col = f\"{metric_base_name}/False/count\"\n", + " true_col = f\"{metric_base_name}/True/count\"\n", + " \n", + " false_values = pivot_df[false_col] if false_col in pivot_df.columns else 0\n", + " true_values = pivot_df[true_col] if true_col in pivot_df.columns else 0\n", + " total_values = true_values + false_values\n", + "\n", + " score = ((false_values * 1) + (true_values * -1)) / total_values\n", + "\n", + " if true_is_good:\n", + " score = 0 - score\n", + "\n", + " return score\n", + "\n", + "def calculate_numeric_metric_score(pivot_df, metric_base_name, range_min=0, range_max=1):\n", + " \"\"\"\n", + " Calculate scores for numeric metrics with /mean\n", + " The mean is normalized to a score between -1 and 1 using the provided range.\n", + " \n", + " Args:\n", + " pivot_df: DataFrame with models as rows and metrics as columns\n", + " metric_base_name: Base name of the metric (without suffixes)\n", + " range_min: Minimum possible value of the metric\n", + " range_max: Maximum possible value of the metric\n", + " \n", + " Returns:\n", + " Series with numeric metric scores per model (scaled to -1 to 1)\n", + " \"\"\"\n", + " mean_col = f\"{metric_base_name}/mean\"\n", + " \n", + " if mean_col not in pivot_df.columns:\n", + " return pd.Series(0.0, index=pivot_df.index)\n", + " \n", + " mean_values = pivot_df[mean_col]\n", + " \n", + " # Linear normalization from [range_min, range_max] to [0, 1]\n", + " normalized = (mean_values - range_min) / (range_max - range_min)\n", + " \n", + " # Scale to [-1, 1]\n", + " score = (normalized * 2) - 1\n", + " \n", + " return score\n", + "\n", + "def calculate_bert_score(pivot_df, metric_base_name):\n", + " \"\"\"\n", + " Calculate BERT Score by averaging F1, Precision, and Recall scores.\n", + " \n", + " Args:\n", + " pivot_df: DataFrame with models as rows and metrics as columns\n", + " metric_base_name: Base name \"BERT Score\"\n", + " \n", + " Returns:\n", + " Series with BERT scores per model (scaled to -1 to 1)\n", + " \"\"\"\n", + " f1_col = f\"{metric_base_name}/F1/mean\"\n", + " precision_col = f\"{metric_base_name}/Precision/mean\"\n", + " recall_col = f\"{metric_base_name}/Recall/mean\"\n", + " \n", + " scores = []\n", + " for col in [f1_col, precision_col, recall_col]:\n", + " if col in pivot_df.columns:\n", + " scores.append(pivot_df[col])\n", + " \n", + " if not scores:\n", + " return pd.Series(0.0, index=pivot_df.index)\n", + " \n", + " # Average the three metrics (already in 0 to 1 range)\n", + " avg_score = sum(scores) / len(scores)\n", + " \n", + " # Scale to [-1, 1]\n", + " score = (avg_score * 2) - 1\n", + " \n", + " return score\n", + "\n", + "def find_unique_metrics_in_pivot(pivot_df):\n", + " \"\"\"\n", + " Identify unique metric base names present in the pivot table.\n", + " \n", + " Args:\n", + " pivot_df: DataFrame with models as rows and metrics as columns\n", + " \"\"\"\n", + " # Extract unique metric names from pivot table columns\n", + " unique_metrics = set()\n", + " for col in pivot_df.columns:\n", + " # Extract base metric name by removing suffixes\n", + " base_name = col\n", + " for suffix in ['/False/count', '/True/count', '/F1_score/mean','/Precision_score/mean', \n", + " '/Recall_score/mean','/mean','/median', '/p90', '/p95', '/stddev']:\n", + " if suffix in base_name and \"BERT Score\" not in base_name:\n", + " base_name = base_name.replace(suffix, '')\n", + " unique_metrics.add(base_name)\n", + " break\n", + " if base_name.startswith(\"BERT Score/\"):\n", + " base_name = \"BERT Score\"\n", + " unique_metrics.add(base_name)\n", + " if not unique_metrics:\n", + " raise ValueError(\"No valid metrics found in pivot table\")\n", + " return unique_metrics\n", + "\n", + "\n", + "def rank_models(pivot_df, unique_metrics=None):\n", + " \"\"\"\n", + " Rank models based on metrics present in the pivot table.\n", + " \n", + " Args:\n", + " pivot_df: DataFrame with models as rows (index) and metrics as columns\n", + " \n", + " Returns:\n", + " DataFrame with model rankings and scores\n", + " \"\"\" \n", + " # Calculate total weight for metrics present in pivot table\n", + " total_weight = sum(METRICS_SCORING_TYPE_MAPPING[m][\"weight\"] for m in unique_metrics)\n", + " \n", + " # Initialize total score\n", + " total_scores = pd.Series(0.0, index=pivot_df.index)\n", + " \n", + " # Process each metric found in the pivot table\n", + " for metric_name in unique_metrics:\n", + " config = METRICS_SCORING_TYPE_MAPPING[metric_name]\n", + " scoring_type = config[\"scoring_type\"]\n", + " weight = config[\"weight\"] / total_weight\n", + " \n", + " if scoring_type == \"bool-false\":\n", + " # False is good (True is bad)\n", + " metric_score = calculate_bool_metric_score(pivot_df, metric_name, true_is_good=False)\n", + " total_scores += metric_score * weight\n", + " \n", + " elif scoring_type == \"bool-true\":\n", + " # True is good (False is bad)\n", + " metric_score = calculate_bool_metric_score(pivot_df, metric_name, true_is_good=True)\n", + " total_scores += metric_score * weight\n", + " \n", + " elif scoring_type == \"num_1_to_5\":\n", + " metric_score = calculate_numeric_metric_score(pivot_df, metric_name, range_min=1, range_max=5)\n", + " total_scores += metric_score * weight\n", + " \n", + " elif scoring_type == \"num_0_to_1\":\n", + " metric_score = calculate_numeric_metric_score(pivot_df, metric_name, range_min=0, range_max=1)\n", + " total_scores += metric_score * weight\n", + " \n", + " elif scoring_type == \"F1/Precision/Recall num_0_to_1\":\n", + " # BERT Score\n", + " metric_score = calculate_bert_score(pivot_df, metric_name)\n", + " total_scores += metric_score * weight\n", + " \n", + " # Create results DataFrame\n", + " results_df = pd.DataFrame({\n", + " 'model': pivot_df.index,\n", + " 'total_score': total_scores.values\n", + " })\n", + " \n", + " # Rank models (higher score = better rank)\n", + " results_df['rank'] = results_df['total_score'].rank(ascending=False, method='min').astype(int)\n", + " results_df = results_df.sort_values('rank')\n", + " \n", + " return results_df\n", + "\n", + "def get_detailed_scores(pivot_df, unique_metrics):\n", + " \"\"\"\n", + " Get detailed breakdown of scores per metric for each model.\n", + " \n", + " Args:\n", + " pivot_df: DataFrame with models as rows and metrics as columns\n", + " \n", + " Returns:\n", + " DataFrame with detailed scores per metric\n", + " \"\"\"\n", + " detailed_scores = pd.DataFrame(index=pivot_df.index)\n", + " \n", + " # Process each metric in the mapping\n", + " for metric_name in unique_metrics:\n", + " scoring_type = METRICS_SCORING_TYPE_MAPPING[metric_name][\"scoring_type\"]\n", + " \n", + " if scoring_type == \"bool-false\":\n", + " detailed_scores[f\"{metric_name}_score\"] = calculate_bool_metric_score(pivot_df, metric_name, true_is_good=False)\n", + " \n", + " elif scoring_type == \"bool-true\":\n", + " detailed_scores[f\"{metric_name}_score\"] = calculate_bool_metric_score(pivot_df, metric_name, true_is_good=True)\n", + " \n", + " elif scoring_type == \"num_1_to_5\":\n", + " detailed_scores[f\"{metric_name}_score\"] = calculate_numeric_metric_score(pivot_df, metric_name, range_min=1, range_max=5)\n", + " \n", + " elif scoring_type == \"num_0_to_1\":\n", + " detailed_scores[f\"{metric_name}_score\"] = calculate_numeric_metric_score(pivot_df, metric_name, range_min=0, range_max=1)\n", + " \n", + " elif scoring_type == \"F1/Precision/Recall num_0_to_1\":\n", + " detailed_scores[f\"{metric_name}_score\"] = calculate_bert_score(pivot_df, metric_name)\n", + " \n", + " return detailed_scores\n", + "\n", + "unique_metrics = find_unique_metrics_in_pivot(metrics_pivot)\n", + "\n", + "# Get detailed scores breakdown\n", + "detailed = get_detailed_scores(metrics_pivot, unique_metrics)\n", + "display(HTML(detailed.to_html()))\n", + "\n", + "# Rank models\n", + "ranking = rank_models(metrics_pivot, unique_metrics)\n", + "display(HTML(ranking.to_html()))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To further drill down , User can also download the SQLite DB file from object storage and analyse the results(instance level metrics, logs etc) locally." + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Downloading e8d0adb660289477/evaluation_result/results.db to results-new\\results.db\n" + ] + } + ], + "source": [ + "# download the result artifacts from Object store.\n", + "import boto3\n", + "\n", + "def download_all_objects(prefix, destination_folder):\n", + " \"\"\"\n", + " Recursively download all objects from an S3 bucket starting with a specific prefix.\n", + "\n", + " :param bucket_name: Name of the S3 bucket.\n", + " :param prefix: Prefix to filter objects in the bucket.\n", + " :param destination_folder: Local folder to save the downloaded files.\n", + " \"\"\"\n", + " s3_client = boto3.client(\n", + " 's3',\n", + " aws_access_key_id=AWS_ACCESS_KEY,\n", + " aws_secret_access_key=AWS_SECRET_ACCESS_KEY,\n", + " region_name=AWS_REGION\n", + " )\n", + "\n", + " # Ensure the destination folder exists\n", + " if not os.path.exists(destination_folder):\n", + " os.makedirs(destination_folder)\n", + "\n", + " # Paginate through objects\n", + " paginator = s3_client.get_paginator('list_objects_v2')\n", + " pages = paginator.paginate(Bucket=AWS_BUCKET_ID, Prefix=prefix)\n", + "\n", + " for page in pages:\n", + " if 'Contents' in page:\n", + " for obj in page['Contents']:\n", + " key = obj['Key']\n", + " local_file_path = os.path.join(destination_folder, os.path.relpath(key, prefix))\n", + "\n", + " # Ensure the local directory structure exists\n", + " local_directory = os.path.dirname(local_file_path)\n", + " if not os.path.exists(local_directory):\n", + " os.makedirs(local_directory)\n", + "\n", + " # Download the object\n", + " print(f\"Downloading {key} to {local_file_path}\")\n", + " s3_client.download_file(AWS_BUCKET_ID, key, local_file_path)\n", + "\n", + "\n", + "# Download the evaluation results from the object store. Look at execution status under \"outputArtifacts\" key to see the 'url'\n", + "# which shows the data path of where your output results are stored\n", + "EXECUTION_ID = execution_id\n", + "sqlite_db_prefix = f'{EXECUTION_ID}/evaluation_result/' # change the prefix based on where your output artifact is stored in the bucket.\n", + "destination_folder = 'results-new'\n", + "\n", + "download_all_objects(sqlite_db_prefix, destination_folder)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "NOTE: The below Cell shows results of top 10 rows of the Evaluation Results across all SQLite tables. IF you wish to see all the entries you can comment the line saying df.head(10) in the below cell or modify the number accordingly." + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + "\n", + "
\n", + "\n", + "
\n", + "

Table: run

\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idnameconfigtagscreated_atupdated_at
960997700d79409680974700c0d67825Run-genai-eval-test-gpt-4o-2024-08-06{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{}2025-11-14 05:38:21.9641282025-11-14 05:38:21.964132
\n", + "
\n", + " \n", + "
\n", + "

Table: configuration

\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idtest_datasetsmetricsvariable_mappingtagsorchestration_deployment_urlrepetitionsmetric_templatescreated_atupdated_at
076096962816435e8e03c0aed7fa4743{\"path\": \"testdata/medicalqna_dataset.csv\", \"type\": \"csv\"}[\"BERT Score\", \"Pointwise Conciseness\", \"2b3cc135-a031-4d93-8641-1f3833797034\", \"9b349f8e-cd39-486d-809c-3dcfa3b15ac7\"]{}{}https://api.ai.internalprod.eu-central-1.aws.ml.hana.ondemand.com/v2/inference/deployments/d92895b42bdd61751[{\"evaluationMethod\": \"computed\", \"scenario\": \"genai-evaluations\", \"createdAt\": \"0001-01-01 00:00:00+00:00\", \"managedBy\": \"imperative\", \"metricType\": \"evaluation\", \"systemPredefined\": true, \"id\": \"93a16045-d577-4132-8481-9497cb205961\", \"name\": \"BERT Score\", \"description\": \"Bertscore is a metric for evaluating the quality of text generation by comparing it to reference texts. It leverages BERT, a pre-trained transformer model, to compute contextual embeddings for each token in both the candidate and reference sentences.\", \"version\": \"1.0.0\", \"includeProperties\": [\"reference\"], \"additionalProperties\": {\"variables\": [], \"output_type\": \"numerical\", \"supported_values\": [0, 1], \"experimental\": false}}, {\"evaluationMethod\": \"llm-as-a-judge\", \"scenario\": \"genai-evaluations\", \"createdAt\": \"0001-01-01 00:00:00+00:00\", \"managedBy\": \"imperative\", \"metricType\": \"evaluation\", \"systemPredefined\": true, \"id\": \"95c03e1b-3938-42dd-bc69-3ec5cd0e5e18\", \"name\": \"Pointwise Conciseness\", \"description\": \"Assess the model's response is a short and concise answer to user prompt.\", \"version\": \"1.0.0\", \"spec\": {\"promptType\": \"structured\", \"configuration\": {\"modelConfiguration\": {\"name\": \"gpt-4.1\", \"version\": \"2025-04-14\", \"parameters\": [{\"key\": \"temperature\", \"value\": \"0\"}]}, \"promptConfiguration\": {\"evaluationTask\": \"You are an expert evaluator. Your task is to evaluate the conciseness of responses generated by AI models.\\nWe will provide you with the user input and an AI-generated response.\\nYou should first read the user input carefully to understand the context and intention, and then evaluate the conciseness of the response based on the criteria provided in the Evaluation section below.\\nYou will assign the response a rating following the Rating Rubric and Evaluation Steps.\\nGive step-by-step explanations for your rating, and only choose ratings from the Rating Rubric.\", \"definition\": \"You will be assessing conciseness, which measures the ability to convey the necessary information in a clear and succinct manner.\", \"criteria\": \"Conciseness: Does the response deliver the essential information without unnecessary words or redundancy?\", \"ratingRubric\": [{\"rating\": 1, \"rule\": \"(Not concise). The response is not concise and is filled with unnecessary or redundant content that obscures the main points.\"}, {\"rating\": 2, \"rule\": \"(Slightly concise). The response is slightly concise and contains a significant amount of unnecessary or redundant information.\"}, {\"rating\": 3, \"rule\": \"(Somewhat concise). The response is somewhat concise but may include some unnecessary words or slightly redundant information.\"}, {\"rating\": 4, \"rule\": \"(Mostly concise). The response is mostly concise and generally avoids unnecessary words while covering the essential information.\"}, {\"rating\": 5, \"rule\": \"(Highly concise). The response is very concise, delivering all necessary information in a succinct manner without any superfluous content.\"}], \"evaluationSteps\": [\"Assess the response in terms of Conciseness. Identify how effectively the response communicates essential information without unnecessary words according to the Criteria.\", \"Score based on the rating rubric. Give a brief rationale to explain your evaluation considering Conciseness.\"]}}}, \"additionalProperties\": {\"variables\": [], \"output_type\": \"numerical\", \"supported_values\": [1, 5], \"experimental\": true}}, {\"id\": \"2b3cc135-a031-4d93-8641-1f3833797034\", \"createdAt\": \"2025-11-14 05:10:58.078072\", \"name\": \"groundedness\", \"scenario\": \"genai-evaluations\", \"version\": \"0.0.1\", \"evaluationMethod\": \"llm-as-a-judge\", \"managedBy\": \"imperative\", \"systemPredefined\": false, \"metricType\": \"evaluation\", \"spec\": {\"promptType\": \"free-form\", \"configuration\": {\"modelConfiguration\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"parameters\": [{\"key\": \"temperature\", \"value\": \"0.1\"}, {\"key\": \"max_tokens\", \"value\": \"110\"}]}, \"promptConfiguration\": {\"systemPrompt\": \"You should strictly follow the instruction given to you. Please act as an impartial judge and evaluate the quality of the responses based on the prompt and following criteria:\", \"userPrompt\": \"You are an expert evaluator. Your task is to evaluate the quality of the responses generated by AI models. We will provide you with a reference and an AI-generated response. You should first read the user input carefully for analyzing the task, and then evaluate the quality of the responses based on the criteria provided in the Evaluation section below. You will assign the response a rating following the Rating Rubric and Evaluation Steps. Give step-by-step explanations for your rating, and only choose ratings from the Rating Rubric.\\n\\n## Metric Definition\\nYou are an INFORMATION OVERLAP classifier providing the overlap of information between a response and reference.\\n\\n## Criteria\\nGroundedness: The of information between a response generated by AI models and provided reference.\\n\\n## Rating Rubric\\n5: (Fully grounded). The response and the reference are fully overlapped.\\n4: (Mostly grounded). The response and the reference are mostly overlapped.\\n3: (Somewhat grounded). The response and the reference are somewhat overlapped.\\n2: (Poorly grounded). The response and the reference are slightly overlapped.\\n1: (Not grounded). There is no overlap between the response and the reference.\\n\\n## Evaluation Steps\\nSTEP 1: Assess the response in aspects of Groundedness. Identify any information in the response and provide assessment according to the Criteria.\\nSTEP 2: Score based on the rating rubric. Give a brief rationale to explain your evaluation considering Groundedness.\\n\\nReference: {{?reference}}\\nResponse: {{?aicore_llm_completion}}\\n\\nBegin your evaluation by providing a short explanation. Be as unbiased as possible. After providing your explanation, please rate the response according to the rubric and outputs STRICTLY following this JSON format:\\n\\n{ \\\"explanation\\\": string, \\\"rating\\\": integer }\\n\\nOutput:\\n\", \"dataType\": \"numeric\"}}}}, {\"id\": \"9b349f8e-cd39-486d-809c-3dcfa3b15ac7\", \"createdAt\": \"2025-11-14 05:11:00.137979\", \"name\": \"groundedness\", \"scenario\": \"genai-evaluations\", \"version\": \"0.1.6\", \"evaluationMethod\": \"llm-as-a-judge\", \"managedBy\": \"imperative\", \"systemPredefined\": false, \"metricType\": \"evaluation\", \"spec\": {\"promptType\": \"free-form\", \"configuration\": {\"modelConfiguration\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"parameters\": [{\"key\": \"temperature\", \"value\": \"0.1\"}, {\"key\": \"max_tokens\", \"value\": \"110\"}]}, \"promptConfiguration\": {\"systemPrompt\": \"You should strictly follow the instruction given to you. Please act as an impartial judge and evaluate the quality of the responses based on the prompt and following criteria:\", \"userPrompt\": \"You are an expert evaluator. Your task is to evaluate the quality of the responses generated by AI models. We will provide you with a reference and an AI-generated response. You should first read the user input carefully for analyzing the task, and then evaluate the quality of the responses based on the criteria provided in the Evaluation section below. You will assign the response a rating following the Rating Rubric and Evaluation Steps. Give step-by-step explanations for your rating, and only choose ratings from the Rating Rubric.\\n\\n## Metric Definition\\nYou are an INFORMATION OVERLAP classifier providing the overlap of information between a response and reference.\\n\\n## Criteria\\nGroundedness: The of information between a response generated by AI models and provided reference.\\n\\n## Rating Rubric\\n5: (Fully grounded). The response and the reference are fully overlapped.\\n4: (Mostly grounded). The response and the reference are mostly overlapped.\\n3: (Somewhat grounded). The response and the reference are somewhat overlapped.\\n2: (Poorly grounded). The response and the reference are slightly overlapped.\\n1: (Not grounded). There is no overlap between the response and the reference.\\n\\n## Evaluation Steps\\nSTEP 1: Assess the response in aspects of Groundedness. Identify any information in the response and provide assessment according to the Criteria.\\nSTEP 2: Score based on the rating rubric. Give a brief rationale to explain your evaluation considering Groundedness.\\n\\nReference: {{?reference}}\\nResponse: {{?aicore_llm_completion}}\\n\\nBegin your evaluation by providing a short explanation. Be as unbiased as possible. After providing your explanation, please rate the response according to the rubric and outputs STRICTLY following this JSON format:\\n\\n{ \\\"explanation\\\": string, \\\"rating\\\": integer }\\n\\nOutput:\\n\", \"dataType\": \"numeric\"}}}}]2025-11-14 05:38:21.9548642025-11-14 05:38:21.954869
\n", + "
\n", + " \n", + "
\n", + "

Table: submission

\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idrun_idorchestration_configurationtemplate_variablescreated_atupdated_at
f1132352cb524392b733ca0773c6bef0960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"how does rivatigmine and otc sleep medicine interact\", \"sentiment\": \"Interaction\", \"reference\": \"tell your doctor and pharmacist what prescription and nonprescription medications, vitamins, nutritional supplements, and herbal products you are taking or plan to take. Be sure to mention any of the following: antihistamines; aspirin and other nonsteroidal anti-inflammatory medications (NSAIDs) such as ibuprofen (Advil, Motrin) and naproxen (Aleve, Naprosyn); bethanechol (Duvoid, Urecholine); ipratropium (Atrovent, in Combivent, DuoNeb); and medications for Alzheimer's disease, glaucoma, irritable bowel disease, motion sickness, ulcers, or urinary problems. Your doctor may need to change the doses of your medications or monitor you carefully for side effects.\"}2025-11-14 05:38:21.9750022025-11-14 05:38:21.975004
ce3fd3f1f8f04499847153fb1d3a2b0f960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"how does valium affect the brain\", \"sentiment\": \"Action\", \"reference\": \"Diazepam is a benzodiazepine that exerts anxiolytic, sedative, muscle-relaxant, anticonvulsant and amnestic effects. Most of these effects are thought to result from a facilitation of the action of gamma aminobutyric acid (GABA), an inhibitory neurotransmitter in the central nervous system.\"}2025-11-14 05:38:21.9750092025-11-14 05:38:21.975010
e0a2c70183dd4ce289772b5ae74957b6960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"what is morphine\", \"sentiment\": \"Information\", \"reference\": \"Morphine is a pain medication of the opiate family which is found naturally in a number of plants and animals.[5][7] It acts directly on the central nervous system (CNS) to decrease the feeling of pain.\"}2025-11-14 05:38:21.9750142025-11-14 05:38:21.975015
61ca98967e5b45f4865db10d81de298b960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"what are the milligrams for oxycodone e\", \"sentiment\": \"Dose\", \"reference\": \"\\ufffd 10 mg \\ufffd 20 mg \\ufffd 40 mg \\ufffd 80 mg ...\"}2025-11-14 05:38:21.9750182025-11-14 05:38:21.975019
9f84346869014412a1fd55ad52bd23b1960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"81% aspirin contain resin and shellac in it. ?\", \"sentiment\": \"Ingredient\", \"reference\": \"Inactive Ingredients Ingredient Name\"}2025-11-14 05:38:21.9750222025-11-14 05:38:21.975023
98a14a854ba94f09b7a7b48c30878f3b960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"what is desonide ointment used for\", \"sentiment\": \"Indication\", \"reference\": \"Desonide is used to treat the redness, swelling, itching, and discomfort of various skin conditions, including psoriasis (a skin disease in which red, scaly patches form on some areas of the body and eczema (a skin disease that causes the skin to be dry and itchy and to sometimes develop red, scaly rashes).\"}2025-11-14 05:38:21.9750272025-11-14 05:38:21.975027
6c34dd7a4bba4f4e8bd9bff5ab9afa1f960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"how soon can tylenol be taken after a cocktail?\", \"sentiment\": \"Interaction\", \"reference\": \"According to the National Health Service (NHS) in the UK, it is usually safe to drink a small amount of alcohol while taking this pain reliever. ... However, when people take acetaminophen at high doses or together with alcohol, it can cause side effects ranging from minor to severe, with the possibility of fatal liver damage. This risk may be higher for people with alcohol use disorder (AUD), which was previously known as alcoholism.... According to the U.S. National Library of Medicine, taking acetaminophen can be dangerous for people who regularly drink alcohol. Manufacturers currently recommend that people who have more than 3 alcoholic drinks per day should ask their doctor before taking acetaminophen.\"}2025-11-14 05:38:21.9750322025-11-14 05:38:21.975032
b8c446bc2c2c423e9d60b1e7511f5c36960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"breo inhaler how it works\", \"sentiment\": \"Action\", \"reference\": \"The combination of fluticasone and vilanterol is used to control wheezing, shortness of breath, coughing, and chest tightness caused by asthma and chronic obstructive pulmonary (COPD; a group of diseases that affect the lungs and airways, that includes chronic bronchitis and emphysema). Fluticasone is in a class of medications called steroids. It works by reducing swelling in the airways. Vilanterol is in a class of medications called long-acting beta-agonists (LABAs). It works by relaxing and opening air passages in the lungs, making it easier to breathe.\"}2025-11-14 05:38:21.9750362025-11-14 05:38:21.975036
4b6e2f1ddefa4f1585977e1cbe2fa900960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"breo inhaler how it works\", \"sentiment\": \"Usage\", \"reference\": \"To use the inhaler, follow these steps:\\n\\t1\\tIf you will be using a new inhaler for the first time, remove it from the box and the foil wrapper. Fill in the \\\"Tray opened\\\" and \\\"Discard\\\" blanks on the inhaler label with the date that you opened the pouch and the date 6 weeks later when you must replace the inhaler.\\n\\t2\\tWhen you are ready to inhale your dose, slide the cover down to expose the mouthpiece until it clicks. If you open and close the inhaler without using your dose, you will waste the medication.\\n\\t3\\tThe counter will count down by 1 each time you open the cover. If the counter does not count down, your inhaler will not provide the medicine. If your inhaler does not count down, call your pharmacist or doctor.\\n\\t4\\tHold the inhaler away from your mouth and breathe out as far as you comfortably can. Do not breathe out into the mouthpiece.\\n\\t5\\tPut the mouthpiece between your lips, and close your lips firmly around it. Take a long, steady, deep breath in through your mouth. Do not breathe in through your nose. Be careful not block the air vent with your fingers.\\n\\t6\\tRemove the inhaler from your mouth, and hold your breath for about 3 to 4 seconds or as long as you comfortably can. Breathe out slowly.\\n\\t7\\tYou may or may not taste or feel the medicine released by the inhaler. Even if you do not, do not inhale another dose. If you are not sure you are getting your dose of fluticasone and vilanterol, call your doctor or pharmacist.\\n\\t8\\tYou may clean the mouthpiece with a dry tissue, if needed. Slide the cover up over the mouthpiece as far as it will go to close the inhaler.\\n\\t9\\tRinse your mouth with water, but do not swallow.\\nAsk your pharmacist or doctor for a copy of the manufacturer's information for the patient.\"}2025-11-14 05:38:21.9750402025-11-14 05:38:21.975040
ac009b3ba51c470ea3d672e1dc0fc290960997700d79409680974700c0d67825{\"modules\": {\"prompt_templating\": {\"prompt\": {\"template\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: {{?question}}.\", \"role\": \"user\"}]}, \"model\": {\"name\": \"gpt-4o\", \"version\": \"2024-08-06\", \"timeout\": 600, \"max_retries\": 2}}}}{\"question\": \"qvar 40mg what is it for\", \"sentiment\": \"Indication\", \"reference\": \"QVAR is indicated in the maintenance treatment of asthma as prophylactic therapy in patients 5 years of age and older. QVAR is also indicated for asthma patients who require systemic corticosteroid administration, where adding QVAR may reduce or eliminate the need for the systemic corticosteroids.\"}2025-11-14 05:38:21.9750442025-11-14 05:38:21.975045
\n", + "
\n", + " \n", + "
\n", + "

Table: submission_result

\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
submission_idrun_idrepetition_countcompletion_resultlatencycreated_atupdated_at
f1132352cb524392b733ca0773c6bef0960997700d79409680974700c0d678251{\"request_id\": \"a84d63c1-35ad-9e6e-aa8d-bc27f6c22e5e\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: how does rivatigmine and otc sleep medicine interact.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-CbgpKlbqIxb3V5NHK52VUybEb7B5T\", \"object\": \"chat.completion\", \"created\": 1763098798, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Rivastigmine is a pharmaceutical drug primarily used for the treatment of mild to moderate dementia associated with Alzheimer's and Parkinson's disease. It belongs to a class of drugs known as cholinesterase inhibitors. Over-the-counter (OTC) sleep medicines often contain antihistamines, such as diphenhydramine or doxylamine, which can cause sedation.\\n\\n**Benefits of Rivastigmine:**\\n- Improvement in cognitive function in patients with Alzheimer's and Parkinson's disease-related dementia.\\n- May help with daily living activities by slowing the progression of symptoms.\\n- Possible benefits in improving attention and memory.\\n\\n**Side Effects of Rivastigmine:**\\n- Common side effects include nausea, vomiting, and diarrhea.\\n- Loss of appetite and weight loss.\\n- Dizziness or headache.\\n- Excessive sweating.\\n- More severe side effects can include heart problems such as bradycardia, peptic ulcers, or exacerbation of respiratory conditions.\\n\\n**Interactions between Rivastigmine and OTC Sleep Medicine:**\\n- **Enhanced Sedation:** Rivastigmine can enhance the sedative effects of antihistamines found in OTC sleep aids, leading to increased drowsiness or dizziness.\\n- **Cognitive Effects:** The combination could lead to worsened cognitive impairment in patients already dealing with cognitive decline, due to the sedative effects of sleep medicines.\\n- **Anticholinergic Effects:** Many OTC sleep aids have anticholinergic properties, which can counteract the effects of cholinesterase inhibitors like rivastigmine, potentially reducing its efficacy.\\n- **Risk of Falls:** Increased sedation and dizziness can raise the risk of falls, especially in elderly patients.\\n\\nIt is important for individuals considering these medications to consult a healthcare provider to carefully evaluate the risks, benefits, and potential interactions specific to their health needs.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 367, \"prompt_tokens\": 34, \"total_tokens\": 401}}}, \"final_result\": {\"id\": \"chatcmpl-CbgpKlbqIxb3V5NHK52VUybEb7B5T\", \"object\": \"chat.completion\", \"created\": 1763098798, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Rivastigmine is a pharmaceutical drug primarily used for the treatment of mild to moderate dementia associated with Alzheimer's and Parkinson's disease. It belongs to a class of drugs known as cholinesterase inhibitors. Over-the-counter (OTC) sleep medicines often contain antihistamines, such as diphenhydramine or doxylamine, which can cause sedation.\\n\\n**Benefits of Rivastigmine:**\\n- Improvement in cognitive function in patients with Alzheimer's and Parkinson's disease-related dementia.\\n- May help with daily living activities by slowing the progression of symptoms.\\n- Possible benefits in improving attention and memory.\\n\\n**Side Effects of Rivastigmine:**\\n- Common side effects include nausea, vomiting, and diarrhea.\\n- Loss of appetite and weight loss.\\n- Dizziness or headache.\\n- Excessive sweating.\\n- More severe side effects can include heart problems such as bradycardia, peptic ulcers, or exacerbation of respiratory conditions.\\n\\n**Interactions between Rivastigmine and OTC Sleep Medicine:**\\n- **Enhanced Sedation:** Rivastigmine can enhance the sedative effects of antihistamines found in OTC sleep aids, leading to increased drowsiness or dizziness.\\n- **Cognitive Effects:** The combination could lead to worsened cognitive impairment in patients already dealing with cognitive decline, due to the sedative effects of sleep medicines.\\n- **Anticholinergic Effects:** Many OTC sleep aids have anticholinergic properties, which can counteract the effects of cholinesterase inhibitors like rivastigmine, potentially reducing its efficacy.\\n- **Risk of Falls:** Increased sedation and dizziness can raise the risk of falls, especially in elderly patients.\\n\\nIt is important for individuals considering these medications to consult a healthcare provider to carefully evaluate the risks, benefits, and potential interactions specific to their health needs.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 367, \"prompt_tokens\": 34, \"total_tokens\": 401}}}9.1126042025-11-14 05:43:14.0161692025-11-14 05:43:14.016173
ce3fd3f1f8f04499847153fb1d3a2b0f960997700d79409680974700c0d678251{\"request_id\": \"0e717c24-58c4-9c75-8b79-487f11da96c3\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: how does valium affect the brain.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-CbgpOcNTGm3nqeh2uGJBEijIUDYbC\", \"object\": \"chat.completion\", \"created\": 1763098802, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Valium, also known by its generic name diazepam, is a medication belonging to the benzodiazepine class. It is commonly used to treat anxiety, muscle spasms, and seizures, and it can also be used in certain situations to provide sedation before medical procedures. Here's how Valium affects the brain, including its benefits and potential side effects:\\n\\n### Benefits:\\n1. **Anxiety Relief**: Valium acts on the central nervous system to produce calming effects, thus reducing symptoms of anxiety.\\n2. **Muscle Relaxation**: It can help relieve muscle spasms by promoting relaxation.\\n3. **Seizure Control**: Valium can be used to manage certain types of seizures, especially when used in conjunction with other medications.\\n4. **Sedation**: It may be used to sedate patients before surgery or medical procedures, helping them relax.\\n5. **Alcohol Withdrawal**: Valium is sometimes used to manage symptoms associated with acute alcohol withdrawal.\\n\\n### Side Effects:\\n1. **Drowsiness and Fatigue**: One of the most common side effects, which can affect concentration and coordination.\\n2. **Dizziness**: Users might experience light-headedness or a sensation of spinning.\\n3. **Cognitive Effects**: Can include confusion or forgetfulness.\\n4. **Dependence and Withdrawal**: Long-term use can lead to dependence, with withdrawal symptoms occurring if the medication is abruptly stopped.\\n5. **Coordination Problems**: There may be issues with balance and physical coordination.\\n6. **Blurred Vision**: Some users report changes in their vision.\\n7. **Mood Changes**: Can include feelings of depression or euphoria.\\n8. **Gastrointestinal Issues**: Such as nausea, constipation, or dry mouth.\\n9. **Respiratory Depression**: High doses can depress breathing, especially when combined with other CNS depressants, such as alcohol.\\n\\n### Important Considerations:\\n- **Addiction Risk**: Because it has the potential for abuse and addiction, Valium should be used only as prescribed by a healthcare professional.\\n- **Interactions**: Valium can interact with other medications, including alcohol, further increasing sedative effects.\\n- **Not Suitable for Everyone**: It might not be appropriate for people with certain conditions, such as severe lung conditions, sleep apnea, or a history of substance abuse.\\n\\nAlways follow the advice of a healthcare provider when using Valium, and report any side effects or concerns you have while taking the medication.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 507, \"prompt_tokens\": 31, \"total_tokens\": 538}}}, \"final_result\": {\"id\": \"chatcmpl-CbgpOcNTGm3nqeh2uGJBEijIUDYbC\", \"object\": \"chat.completion\", \"created\": 1763098802, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Valium, also known by its generic name diazepam, is a medication belonging to the benzodiazepine class. It is commonly used to treat anxiety, muscle spasms, and seizures, and it can also be used in certain situations to provide sedation before medical procedures. Here's how Valium affects the brain, including its benefits and potential side effects:\\n\\n### Benefits:\\n1. **Anxiety Relief**: Valium acts on the central nervous system to produce calming effects, thus reducing symptoms of anxiety.\\n2. **Muscle Relaxation**: It can help relieve muscle spasms by promoting relaxation.\\n3. **Seizure Control**: Valium can be used to manage certain types of seizures, especially when used in conjunction with other medications.\\n4. **Sedation**: It may be used to sedate patients before surgery or medical procedures, helping them relax.\\n5. **Alcohol Withdrawal**: Valium is sometimes used to manage symptoms associated with acute alcohol withdrawal.\\n\\n### Side Effects:\\n1. **Drowsiness and Fatigue**: One of the most common side effects, which can affect concentration and coordination.\\n2. **Dizziness**: Users might experience light-headedness or a sensation of spinning.\\n3. **Cognitive Effects**: Can include confusion or forgetfulness.\\n4. **Dependence and Withdrawal**: Long-term use can lead to dependence, with withdrawal symptoms occurring if the medication is abruptly stopped.\\n5. **Coordination Problems**: There may be issues with balance and physical coordination.\\n6. **Blurred Vision**: Some users report changes in their vision.\\n7. **Mood Changes**: Can include feelings of depression or euphoria.\\n8. **Gastrointestinal Issues**: Such as nausea, constipation, or dry mouth.\\n9. **Respiratory Depression**: High doses can depress breathing, especially when combined with other CNS depressants, such as alcohol.\\n\\n### Important Considerations:\\n- **Addiction Risk**: Because it has the potential for abuse and addiction, Valium should be used only as prescribed by a healthcare professional.\\n- **Interactions**: Valium can interact with other medications, including alcohol, further increasing sedative effects.\\n- **Not Suitable for Everyone**: It might not be appropriate for people with certain conditions, such as severe lung conditions, sleep apnea, or a history of substance abuse.\\n\\nAlways follow the advice of a healthcare provider when using Valium, and report any side effects or concerns you have while taking the medication.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 507, \"prompt_tokens\": 31, \"total_tokens\": 538}}}16.7714402025-11-14 05:43:14.0161742025-11-14 05:43:14.016174
e0a2c70183dd4ce289772b5ae74957b6960997700d79409680974700c0d678251{\"request_id\": \"7210615f-2b11-9523-a798-ed1af505e05f\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: what is morphine.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-CbgpSRd0RQJNQTjNWQs53chmAduGo\", \"object\": \"chat.completion\", \"created\": 1763098806, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Morphine is a powerful opioid pain medication used to treat moderate to severe pain. It's often used in a hospital setting for pain relief after surgery or for chronic pain management. Here are the benefits and side effects of morphine:\\n\\n### Benefits:\\n1. **Pain Relief**: Morphine is highly effective in reducing severe pain, providing relief for patients who are suffering from acute or chronic pain conditions.\\n2. **Reduced Anxiety and Stress**: By alleviating pain, morphine can also help reduce anxiety and stress associated with severe pain.\\n3. **Sedation**: It may provide a calming effect which can be beneficial for patients in extreme discomfort.\\n4. **Improves Quality of Life**: For those with chronic pain, it can improve daily functioning and overall quality of life.\\n5. **Flexible Administration**: Morphine can be administered in various forms, including orally, intravenously, and via injection, providing flexibility in its use.\\n\\n### Side Effects:\\n1. **Respiratory Depression**: One of the most serious side effects, morphine can slow down breathing, which can be dangerous, requiring careful monitoring especially when first starting the medication or adjusting doses.\\n2. **Nausea and Vomiting**: Common side effects, especially when first starting treatment.\\n3. **Drowsiness and Sedation**: Can limit activities such as driving or operating heavy machinery.\\n4. **Constipation**: A very common issue with opioid use; patients may need to use laxatives or other remedies to counteract this effect.\\n5. **Dizziness**: This may occur, leading to risks of falls, especially in older adults.\\n6. **Tolerance and Dependence**: Long-term use can lead to tolerance (requiring higher doses to achieve the same effect) and physical dependence, meaning that withdrawal symptoms may occur if the medication is abruptly stopped.\\n7. **Potential for Abuse**: As an opioid, morphine has a potential for addiction and abuse, which necessitates careful monitoring and regulation of its use.\\n8. **Allergic Reactions**: Although rare, some individuals may experience allergic reactions such as skin rashes, itching, or more severe reactions.\\n\\nGiven its potent effects and risks, morphine should be used under strict medical supervision to manage its efficacy and safety.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 463, \"prompt_tokens\": 28, \"total_tokens\": 491}}}, \"final_result\": {\"id\": \"chatcmpl-CbgpSRd0RQJNQTjNWQs53chmAduGo\", \"object\": \"chat.completion\", \"created\": 1763098806, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Morphine is a powerful opioid pain medication used to treat moderate to severe pain. It's often used in a hospital setting for pain relief after surgery or for chronic pain management. Here are the benefits and side effects of morphine:\\n\\n### Benefits:\\n1. **Pain Relief**: Morphine is highly effective in reducing severe pain, providing relief for patients who are suffering from acute or chronic pain conditions.\\n2. **Reduced Anxiety and Stress**: By alleviating pain, morphine can also help reduce anxiety and stress associated with severe pain.\\n3. **Sedation**: It may provide a calming effect which can be beneficial for patients in extreme discomfort.\\n4. **Improves Quality of Life**: For those with chronic pain, it can improve daily functioning and overall quality of life.\\n5. **Flexible Administration**: Morphine can be administered in various forms, including orally, intravenously, and via injection, providing flexibility in its use.\\n\\n### Side Effects:\\n1. **Respiratory Depression**: One of the most serious side effects, morphine can slow down breathing, which can be dangerous, requiring careful monitoring especially when first starting the medication or adjusting doses.\\n2. **Nausea and Vomiting**: Common side effects, especially when first starting treatment.\\n3. **Drowsiness and Sedation**: Can limit activities such as driving or operating heavy machinery.\\n4. **Constipation**: A very common issue with opioid use; patients may need to use laxatives or other remedies to counteract this effect.\\n5. **Dizziness**: This may occur, leading to risks of falls, especially in older adults.\\n6. **Tolerance and Dependence**: Long-term use can lead to tolerance (requiring higher doses to achieve the same effect) and physical dependence, meaning that withdrawal symptoms may occur if the medication is abruptly stopped.\\n7. **Potential for Abuse**: As an opioid, morphine has a potential for addiction and abuse, which necessitates careful monitoring and regulation of its use.\\n8. **Allergic Reactions**: Although rare, some individuals may experience allergic reactions such as skin rashes, itching, or more severe reactions.\\n\\nGiven its potent effects and risks, morphine should be used under strict medical supervision to manage its efficacy and safety.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 463, \"prompt_tokens\": 28, \"total_tokens\": 491}}}17.6568122025-11-14 05:43:14.0161752025-11-14 05:43:14.016177
61ca98967e5b45f4865db10d81de298b960997700d79409680974700c0d678251{\"request_id\": \"34e8b9ee-890d-957d-89f4-53dfcad18a20\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: what are the milligrams for oxycodone e.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-CbgpWCiud9mjIG1PkXPDcHc9HFIrQ\", \"object\": \"chat.completion\", \"created\": 1763098810, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Oxycodone is a prescription opioid medication used to treat moderate to severe pain. It is important to use this medication exactly as prescribed by a healthcare provider. Here are some of the benefits and side effects of oxycodone:\\n\\n### Benefits\\n1. **Pain Relief**: Oxycodone is effective in reducing or eliminating acute and chronic pain.\\n2. **Improved Quality of Life**: For individuals with chronic pain, oxycodone can improve the ability to perform daily activities and overall quality of life.\\n3. **Various Formulations**: Available in immediate-release and extended-release formulations for flexible pain management.\\n\\n### Side Effects\\nCommon side effects include:\\n1. **Nausea and Vomiting**: These can occur when starting the medication or adjusting the dose.\\n2. **Constipation**: A very common side effect that often requires dietary changes or laxatives to manage.\\n3. **Drowsiness and Dizziness**: May impair the ability to drive or operate machinery.\\n4. **Sweating**: Increased sweating is a possible side effect.\\n5. **Dry Mouth**: Can occur with opioid use.\\n\\nSerious side effects may include:\\n1. **Respiratory Depression**: Slowed breathing can be life-threatening and requires immediate medical attention.\\n2. **Addiction, Abuse, and Misuse**: Oxycodone has a high potential for addiction.\\n3. **Withdrawal Symptoms**: These can occur if the medication is stopped abruptly after prolonged use.\\n4. **Interactions with Other Medications**: Can have harmful interactions with other drugs, especially other CNS depressants.\\n5. **Severe Allergic Reactions**: Symptoms such as rash, itching, swelling, severe dizziness, or trouble breathing require immediate medical attention.\\n\\nAlways consult a healthcare provider for personalized advice and to discuss the risks and benefits before starting any new medication.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 379, \"prompt_tokens\": 34, \"total_tokens\": 413}}}, \"final_result\": {\"id\": \"chatcmpl-CbgpWCiud9mjIG1PkXPDcHc9HFIrQ\", \"object\": \"chat.completion\", \"created\": 1763098810, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Oxycodone is a prescription opioid medication used to treat moderate to severe pain. It is important to use this medication exactly as prescribed by a healthcare provider. Here are some of the benefits and side effects of oxycodone:\\n\\n### Benefits\\n1. **Pain Relief**: Oxycodone is effective in reducing or eliminating acute and chronic pain.\\n2. **Improved Quality of Life**: For individuals with chronic pain, oxycodone can improve the ability to perform daily activities and overall quality of life.\\n3. **Various Formulations**: Available in immediate-release and extended-release formulations for flexible pain management.\\n\\n### Side Effects\\nCommon side effects include:\\n1. **Nausea and Vomiting**: These can occur when starting the medication or adjusting the dose.\\n2. **Constipation**: A very common side effect that often requires dietary changes or laxatives to manage.\\n3. **Drowsiness and Dizziness**: May impair the ability to drive or operate machinery.\\n4. **Sweating**: Increased sweating is a possible side effect.\\n5. **Dry Mouth**: Can occur with opioid use.\\n\\nSerious side effects may include:\\n1. **Respiratory Depression**: Slowed breathing can be life-threatening and requires immediate medical attention.\\n2. **Addiction, Abuse, and Misuse**: Oxycodone has a high potential for addiction.\\n3. **Withdrawal Symptoms**: These can occur if the medication is stopped abruptly after prolonged use.\\n4. **Interactions with Other Medications**: Can have harmful interactions with other drugs, especially other CNS depressants.\\n5. **Severe Allergic Reactions**: Symptoms such as rash, itching, swelling, severe dizziness, or trouble breathing require immediate medical attention.\\n\\nAlways consult a healthcare provider for personalized advice and to discuss the risks and benefits before starting any new medication.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 379, \"prompt_tokens\": 34, \"total_tokens\": 413}}}20.1365062025-11-14 05:43:14.0161782025-11-14 05:43:14.016179
9f84346869014412a1fd55ad52bd23b1960997700d79409680974700c0d678251{\"request_id\": \"38ddc04e-b9df-92d8-936a-fbd4b4b5f407\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: 81% aspirin contain resin and shellac in it. ?.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-Cbgpaso97P0FcGhMa2DzrKllg1yEq\", \"object\": \"chat.completion\", \"created\": 1763098814, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Aspirin, including low-dose formulations like 81 mg aspirin, is widely used for its anti-inflammatory, analgesic, and antipyretic properties and its potential protective effects against heart attack and stroke. Here's a detailed list of benefits and side effects associated with aspirin:\\n\\n### Benefits:\\n1. **Cardiovascular Protection:** Low-dose aspirin is commonly prescribed to reduce the risk of heart attack and stroke, particularly in individuals with cardiovascular disease or risk factors.\\n2. **Pain Relief:** Aspirin provides relief from mild to moderate pain, such as headaches, muscle aches, toothaches, and menstrual cramps.\\n3. **Anti-Inflammatory Effects:** It helps reduce inflammation from conditions such as arthritis.\\n4. **Antipyretic Effects:** Aspirin can help reduce fever.\\n\\n### Side Effects:\\n1. **Gastrointestinal Issues:** These can include stomach pain, heartburn, nausea, and more serious effects like gastrointestinal bleeding or ulcers.\\n2. **Increased Bleeding Risk:** Aspirin affects blood clotting, which can lead to an increased risk of bleeding, especially if used long term.\\n3. **Allergic Reactions:** Some individuals may experience allergic reactions to aspirin, including hives, facial swelling, asthma, or anaphylaxis.\\n4. **Kidney and Liver Effects:** Prolonged use of aspirin can potentially impact kidney and liver function, though this is more common with high doses or long-term use.\\n5. **Reye's Syndrome:** Aspirin is linked to Reye's syndrome when given to children with viral infections; thus, it is generally avoided in pediatric medicine for viral illnesses.\\n6. **Ringing in the Ears:** Also known as tinnitus, this can occur at higher doses of aspirin.\\n\\nRegarding the mention of resin and shellac, these are commonly used as excipients or coating materials in the manufacturing of pills, including some aspirin products. They generally serve to protect the pill, control its release into the system, or enhance its appearance. These components are usually considered safe, but people with specific allergies or sensitivities might need to be cautious.\\n\\nAlways consult a healthcare provider before starting or changing a medication regimen to ensure it aligns with your health needs and conditions.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 447, \"prompt_tokens\": 36, \"total_tokens\": 483}}}, \"final_result\": {\"id\": \"chatcmpl-Cbgpaso97P0FcGhMa2DzrKllg1yEq\", \"object\": \"chat.completion\", \"created\": 1763098814, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Aspirin, including low-dose formulations like 81 mg aspirin, is widely used for its anti-inflammatory, analgesic, and antipyretic properties and its potential protective effects against heart attack and stroke. Here's a detailed list of benefits and side effects associated with aspirin:\\n\\n### Benefits:\\n1. **Cardiovascular Protection:** Low-dose aspirin is commonly prescribed to reduce the risk of heart attack and stroke, particularly in individuals with cardiovascular disease or risk factors.\\n2. **Pain Relief:** Aspirin provides relief from mild to moderate pain, such as headaches, muscle aches, toothaches, and menstrual cramps.\\n3. **Anti-Inflammatory Effects:** It helps reduce inflammation from conditions such as arthritis.\\n4. **Antipyretic Effects:** Aspirin can help reduce fever.\\n\\n### Side Effects:\\n1. **Gastrointestinal Issues:** These can include stomach pain, heartburn, nausea, and more serious effects like gastrointestinal bleeding or ulcers.\\n2. **Increased Bleeding Risk:** Aspirin affects blood clotting, which can lead to an increased risk of bleeding, especially if used long term.\\n3. **Allergic Reactions:** Some individuals may experience allergic reactions to aspirin, including hives, facial swelling, asthma, or anaphylaxis.\\n4. **Kidney and Liver Effects:** Prolonged use of aspirin can potentially impact kidney and liver function, though this is more common with high doses or long-term use.\\n5. **Reye's Syndrome:** Aspirin is linked to Reye's syndrome when given to children with viral infections; thus, it is generally avoided in pediatric medicine for viral illnesses.\\n6. **Ringing in the Ears:** Also known as tinnitus, this can occur at higher doses of aspirin.\\n\\nRegarding the mention of resin and shellac, these are commonly used as excipients or coating materials in the manufacturing of pills, including some aspirin products. They generally serve to protect the pill, control its release into the system, or enhance its appearance. These components are usually considered safe, but people with specific allergies or sensitivities might need to be cautious.\\n\\nAlways consult a healthcare provider before starting or changing a medication regimen to ensure it aligns with your health needs and conditions.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 447, \"prompt_tokens\": 36, \"total_tokens\": 483}}}26.6376532025-11-14 05:43:14.0161802025-11-14 05:43:14.016180
98a14a854ba94f09b7a7b48c30878f3b960997700d79409680974700c0d678251{\"request_id\": \"b3487dc5-1c06-9c24-8493-fcc226b751a3\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: what is desonide ointment used for.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-CbgpeWG1wvBScw4hRug9GmhLBfQYr\", \"object\": \"chat.completion\", \"created\": 1763098818, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Desonide ointment is a topical corticosteroid used primarily to treat various skin conditions by reducing inflammation, redness, and itching. Here are the benefits and potential side effects of using desonide ointment:\\n\\n### Benefits\\n1. **Reduces Inflammation:** It helps alleviate inflammation associated with conditions like eczema, dermatitis, and psoriasis.\\n2. **Decreases Itching:** By calming the skin, desonide reduces the urge to scratch, which can improve comfort.\\n3. **Reduces Redness:** The ointment helps in minimizing redness and swelling of the affected areas.\\n4. **Promotes Healing:** By managing symptoms like inflammation and itching, it supports faster healing of the skin.\\n5. **Mild Formulation:** As a low-potency steroid, it is often recommended for sensitive skin areas and for use in children.\\n\\n### Side Effects\\nWhile desonide is considered low-potency and generally well-tolerated, some potential side effects may occur:\\n\\n1. **Skin Irritation:** This can include burning, itching, or dryness at the application site.\\n2. **Contact Dermatitis:** Some individuals may experience an allergic reaction leading to a rash.\\n3. **Hypopigmentation:** Prolonged use might cause lightening of the skin.\\n4. **Thinning of Skin:** Extended use, especially under occlusive dressings, can lead to skin thinning.\\n5. **Stretch Marks:** May occur with long-term use in certain areas.\\n6. **Increased Hair Growth:** Some people may notice more hair growth in the treated area.\\n7. **Systemic Absorption:** Though rare, especially with topical use, large amounts or prolonged use can lead to systemic absorption with corticosteroid-related side effects.\\n\\nIt is important to use desonide ointment as directed by a healthcare provider. If you experience severe side effects or signs of an allergic reaction, such as rash, swelling, or difficulty breathing, seek medical attention promptly.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 395, \"prompt_tokens\": 33, \"total_tokens\": 428}}}, \"final_result\": {\"id\": \"chatcmpl-CbgpeWG1wvBScw4hRug9GmhLBfQYr\", \"object\": \"chat.completion\", \"created\": 1763098818, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Desonide ointment is a topical corticosteroid used primarily to treat various skin conditions by reducing inflammation, redness, and itching. Here are the benefits and potential side effects of using desonide ointment:\\n\\n### Benefits\\n1. **Reduces Inflammation:** It helps alleviate inflammation associated with conditions like eczema, dermatitis, and psoriasis.\\n2. **Decreases Itching:** By calming the skin, desonide reduces the urge to scratch, which can improve comfort.\\n3. **Reduces Redness:** The ointment helps in minimizing redness and swelling of the affected areas.\\n4. **Promotes Healing:** By managing symptoms like inflammation and itching, it supports faster healing of the skin.\\n5. **Mild Formulation:** As a low-potency steroid, it is often recommended for sensitive skin areas and for use in children.\\n\\n### Side Effects\\nWhile desonide is considered low-potency and generally well-tolerated, some potential side effects may occur:\\n\\n1. **Skin Irritation:** This can include burning, itching, or dryness at the application site.\\n2. **Contact Dermatitis:** Some individuals may experience an allergic reaction leading to a rash.\\n3. **Hypopigmentation:** Prolonged use might cause lightening of the skin.\\n4. **Thinning of Skin:** Extended use, especially under occlusive dressings, can lead to skin thinning.\\n5. **Stretch Marks:** May occur with long-term use in certain areas.\\n6. **Increased Hair Growth:** Some people may notice more hair growth in the treated area.\\n7. **Systemic Absorption:** Though rare, especially with topical use, large amounts or prolonged use can lead to systemic absorption with corticosteroid-related side effects.\\n\\nIt is important to use desonide ointment as directed by a healthcare provider. If you experience severe side effects or signs of an allergic reaction, such as rash, swelling, or difficulty breathing, seek medical attention promptly.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 395, \"prompt_tokens\": 33, \"total_tokens\": 428}}}30.8816902025-11-14 05:43:14.0161812025-11-14 05:43:14.016181
6c34dd7a4bba4f4e8bd9bff5ab9afa1f960997700d79409680974700c0d678251{\"request_id\": \"fd5cbafd-b66b-9b97-93c2-eebcdc27661d\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: how soon can tylenol be taken after a cocktail?.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-CbgpiVkYdzlpHQQsRHqvnGJfohWuk\", \"object\": \"chat.completion\", \"created\": 1763098822, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"### Benefits of Tylenol (Acetaminophen)\\n\\n1. **Pain Relief:** \\n - Tylenol is commonly used to relieve mild to moderate pain from headaches, muscle aches, menstrual periods, colds and sore throats, toothaches, and backaches.\\n\\n2. **Fever Reduction:**\\n - It is effective in reducing fever.\\n\\n3. **Generally Safe:**\\n - When taken at recommended doses, Tylenol is generally safe for most people and can be used by those who cannot take NSAIDs (non-steroidal anti-inflammatory drugs) like aspirin, ibuprofen, or naproxen.\\n\\n4. **Well-Tolerated:**\\n - It generally causes fewer gastrointestinal side effects than NSAIDs.\\n\\n### Side Effects of Tylenol (Acetaminophen)\\n\\n1. **Liver Damage:**\\n - High doses or prolonged use can cause severe liver damage. This risk is increased with excessive alcohol consumption.\\n\\n2. **Allergic Reactions:**\\n - Rarely, some people may experience allergic reactions like rash, itching, swelling, severe dizziness, or trouble breathing.\\n\\n3. **Kidney Damage:**\\n - Long-term use can potentially lead to kidney damage, especially at high doses.\\n\\n### Regarding Alcohol Consumption\\n\\n- **Timing:** \\n - It is generally advised to wait at least 3-4 hours after consuming a cocktail before taking Tylenol. This allows your body to process the alcohol and reduces the risk of liver damage. However, depending on the amount of alcohol consumed and individual health considerations, it might be better to consult a healthcare professional for personalized advice.\\n\\n- **Risk of Liver Damage:**\\n - Both alcohol and acetaminophen are processed via the liver, and taking them together, especially in large amounts or over a long period, can increase the risk of liver damage.\\n\\nIt is always important to follow dosing instructions on the medication label and to consult with a healthcare professional if you have specific concerns or health conditions that might affect how you should use Tylenol.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 414, \"prompt_tokens\": 35, \"total_tokens\": 449}}}, \"final_result\": {\"id\": \"chatcmpl-CbgpiVkYdzlpHQQsRHqvnGJfohWuk\", \"object\": \"chat.completion\", \"created\": 1763098822, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"### Benefits of Tylenol (Acetaminophen)\\n\\n1. **Pain Relief:** \\n - Tylenol is commonly used to relieve mild to moderate pain from headaches, muscle aches, menstrual periods, colds and sore throats, toothaches, and backaches.\\n\\n2. **Fever Reduction:**\\n - It is effective in reducing fever.\\n\\n3. **Generally Safe:**\\n - When taken at recommended doses, Tylenol is generally safe for most people and can be used by those who cannot take NSAIDs (non-steroidal anti-inflammatory drugs) like aspirin, ibuprofen, or naproxen.\\n\\n4. **Well-Tolerated:**\\n - It generally causes fewer gastrointestinal side effects than NSAIDs.\\n\\n### Side Effects of Tylenol (Acetaminophen)\\n\\n1. **Liver Damage:**\\n - High doses or prolonged use can cause severe liver damage. This risk is increased with excessive alcohol consumption.\\n\\n2. **Allergic Reactions:**\\n - Rarely, some people may experience allergic reactions like rash, itching, swelling, severe dizziness, or trouble breathing.\\n\\n3. **Kidney Damage:**\\n - Long-term use can potentially lead to kidney damage, especially at high doses.\\n\\n### Regarding Alcohol Consumption\\n\\n- **Timing:** \\n - It is generally advised to wait at least 3-4 hours after consuming a cocktail before taking Tylenol. This allows your body to process the alcohol and reduces the risk of liver damage. However, depending on the amount of alcohol consumed and individual health considerations, it might be better to consult a healthcare professional for personalized advice.\\n\\n- **Risk of Liver Damage:**\\n - Both alcohol and acetaminophen are processed via the liver, and taking them together, especially in large amounts or over a long period, can increase the risk of liver damage.\\n\\nIt is always important to follow dosing instructions on the medication label and to consult with a healthcare professional if you have specific concerns or health conditions that might affect how you should use Tylenol.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 414, \"prompt_tokens\": 35, \"total_tokens\": 449}}}34.0473912025-11-14 05:43:14.0161822025-11-14 05:43:14.016182
b8c446bc2c2c423e9d60b1e7511f5c36960997700d79409680974700c0d678251{\"request_id\": \"ad1459b8-f922-9fd0-ae8b-beb41d2bfc9a\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: breo inhaler how it works.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-Cbgpm1fLXLizRqds95YiTnF1MgSfk\", \"object\": \"chat.completion\", \"created\": 1763098826, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"The Breo inhaler, also known by its generic components fluticasone furoate and vilanterol, is used primarily to treat asthma and chronic obstructive pulmonary disease (COPD). Here's how it works and its potential benefits and side effects:\\n\\n### How It Works:\\n- **Fluticasone Furoate**: This is a corticosteroid that reduces inflammation in the airways, helping to prevent asthma attacks and improve breathing.\\n- **Vilanterol**: This is a long-acting beta-agonist (LABA) that relaxes muscles in the airways to improve airflow and breathing.\\n\\n### Benefits:\\n- **Improved Breathing**: Helps ease breathing by reducing airway inflammation and relaxing airway muscles.\\n- **Reduced Symptoms**: Decreases the frequency and severity of asthma attacks and COPD flare-ups.\\n- **Long-Lasting Relief**: Provides relief that can last for 24 hours, meaning it typically needs to be used once a day.\\n- **Convenience**: Combines two medications in a single inhaler, simplifying treatment.\\n\\n### Potential Side Effects:\\n- **Common Side Effects**:\\n - Throat irritation or hoarseness\\n - Headache\\n - Cough\\n - Back pain\\n\\n- **Serious Side Effects** (require immediate medical attention):\\n - Difficulty breathing or swallowing\\n - Signs of an allergic reaction (rash, itching, swelling, severe dizziness)\\n - High blood pressure\\n - Increased heart rate\\n - Chest pain\\n - Eye problems like blurred vision or eye pain\\n\\n- **Long-term Use Side Effects**:\\n - Potential for increased risk of pneumonia in COPD patients\\n - Possible risk of osteoporosis\\n - Oral thrush (a fungal infection in the mouth) \\u2013 to reduce this risk, rinse your mouth with water after each use\\n\\nIt's important for users to follow their healthcare provider's instructions and not to use the Breo inhaler to treat sudden breathing problems. This medication is meant for long-term management, and a rescue inhaler should be used for acute symptoms. Always consult a healthcare professional for personalized advice and guidance.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 435, \"prompt_tokens\": 31, \"total_tokens\": 466}}}, \"final_result\": {\"id\": \"chatcmpl-Cbgpm1fLXLizRqds95YiTnF1MgSfk\", \"object\": \"chat.completion\", \"created\": 1763098826, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"The Breo inhaler, also known by its generic components fluticasone furoate and vilanterol, is used primarily to treat asthma and chronic obstructive pulmonary disease (COPD). Here's how it works and its potential benefits and side effects:\\n\\n### How It Works:\\n- **Fluticasone Furoate**: This is a corticosteroid that reduces inflammation in the airways, helping to prevent asthma attacks and improve breathing.\\n- **Vilanterol**: This is a long-acting beta-agonist (LABA) that relaxes muscles in the airways to improve airflow and breathing.\\n\\n### Benefits:\\n- **Improved Breathing**: Helps ease breathing by reducing airway inflammation and relaxing airway muscles.\\n- **Reduced Symptoms**: Decreases the frequency and severity of asthma attacks and COPD flare-ups.\\n- **Long-Lasting Relief**: Provides relief that can last for 24 hours, meaning it typically needs to be used once a day.\\n- **Convenience**: Combines two medications in a single inhaler, simplifying treatment.\\n\\n### Potential Side Effects:\\n- **Common Side Effects**:\\n - Throat irritation or hoarseness\\n - Headache\\n - Cough\\n - Back pain\\n\\n- **Serious Side Effects** (require immediate medical attention):\\n - Difficulty breathing or swallowing\\n - Signs of an allergic reaction (rash, itching, swelling, severe dizziness)\\n - High blood pressure\\n - Increased heart rate\\n - Chest pain\\n - Eye problems like blurred vision or eye pain\\n\\n- **Long-term Use Side Effects**:\\n - Potential for increased risk of pneumonia in COPD patients\\n - Possible risk of osteoporosis\\n - Oral thrush (a fungal infection in the mouth) \\u2013 to reduce this risk, rinse your mouth with water after each use\\n\\nIt's important for users to follow their healthcare provider's instructions and not to use the Breo inhaler to treat sudden breathing problems. This medication is meant for long-term management, and a rescue inhaler should be used for acute symptoms. Always consult a healthcare professional for personalized advice and guidance.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 435, \"prompt_tokens\": 31, \"total_tokens\": 466}}}38.3906542025-11-14 05:43:14.0161832025-11-14 05:43:14.016183
4b6e2f1ddefa4f1585977e1cbe2fa900960997700d79409680974700c0d678251{\"request_id\": \"7ed2ae00-47ea-97fc-8d72-69f143a42abc\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: breo inhaler how it works.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-Cbgpq82kWg8SHVgUnPQhAFvm7VaIR\", \"object\": \"chat.completion\", \"created\": 1763098830, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Breo Ellipta is an inhaler that contains two active ingredients, fluticasone furoate and vilanterol. It is commonly used for managing asthma and chronic obstructive pulmonary disease (COPD). Here's how it works, along with its benefits and potential side effects:\\n\\n### How It Works\\n- **Fluticasone Furoate**: This is a corticosteroid that helps reduce inflammation in the lungs, making it easier to breathe.\\n- **Vilanterol**: This is a long-acting beta-agonist (LABA) that relaxes muscles in the airways to improve airflow and reduce symptoms like wheezing and shortness of breath.\\n\\n### Benefits\\n- **Improved Breathing**: By reducing inflammation and relaxing airway muscles, the inhaler helps improve overall breathing.\\n- **Symptom Control**: Helps control and prevent symptoms such as wheezing, coughing, chest tightness, and shortness of breath.\\n- **Convenience**: Once-daily dosing can improve adherence and make it easier for patients to manage their condition.\\n- **Improved Quality of Life**: Better management of asthma or COPD symptoms can lead to an improved ability to carry out daily activities.\\n\\n### Potential Side Effects\\n- **Common Side Effects**: These may include headaches, sore throat, cough, and oral thrush (a fungal infection in the mouth).\\n- **Muscle Pain**: Some people may experience muscle and joint pain.\\n- **Increased Heart Rate**: Vilanterol may cause an increased heart rate or palpitations.\\n- **Risk of Infections**: Corticosteroids can suppress the immune system, increasing the risk of infections, such as pneumonia.\\n- **Hoarseness or Voice Changes**: Inhaled corticosteroids can affect the vocal cords.\\n- **Paradoxical Bronchospasm**: Rarely, inhalers can cause bronchospasm, which is a tightening of the muscles around the airways.\\n\\nIt's important for patients to discuss their symptoms and any side effects they experience with their healthcare provider, who can offer guidance tailored to individual health needs.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 431, \"prompt_tokens\": 31, \"total_tokens\": 462}}}, \"final_result\": {\"id\": \"chatcmpl-Cbgpq82kWg8SHVgUnPQhAFvm7VaIR\", \"object\": \"chat.completion\", \"created\": 1763098830, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Breo Ellipta is an inhaler that contains two active ingredients, fluticasone furoate and vilanterol. It is commonly used for managing asthma and chronic obstructive pulmonary disease (COPD). Here's how it works, along with its benefits and potential side effects:\\n\\n### How It Works\\n- **Fluticasone Furoate**: This is a corticosteroid that helps reduce inflammation in the lungs, making it easier to breathe.\\n- **Vilanterol**: This is a long-acting beta-agonist (LABA) that relaxes muscles in the airways to improve airflow and reduce symptoms like wheezing and shortness of breath.\\n\\n### Benefits\\n- **Improved Breathing**: By reducing inflammation and relaxing airway muscles, the inhaler helps improve overall breathing.\\n- **Symptom Control**: Helps control and prevent symptoms such as wheezing, coughing, chest tightness, and shortness of breath.\\n- **Convenience**: Once-daily dosing can improve adherence and make it easier for patients to manage their condition.\\n- **Improved Quality of Life**: Better management of asthma or COPD symptoms can lead to an improved ability to carry out daily activities.\\n\\n### Potential Side Effects\\n- **Common Side Effects**: These may include headaches, sore throat, cough, and oral thrush (a fungal infection in the mouth).\\n- **Muscle Pain**: Some people may experience muscle and joint pain.\\n- **Increased Heart Rate**: Vilanterol may cause an increased heart rate or palpitations.\\n- **Risk of Infections**: Corticosteroids can suppress the immune system, increasing the risk of infections, such as pneumonia.\\n- **Hoarseness or Voice Changes**: Inhaled corticosteroids can affect the vocal cords.\\n- **Paradoxical Bronchospasm**: Rarely, inhalers can cause bronchospasm, which is a tightening of the muscles around the airways.\\n\\nIt's important for patients to discuss their symptoms and any side effects they experience with their healthcare provider, who can offer guidance tailored to individual health needs.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 431, \"prompt_tokens\": 31, \"total_tokens\": 462}}}41.6401132025-11-14 05:43:14.0161842025-11-14 05:43:14.016184
ac009b3ba51c470ea3d672e1dc0fc290960997700d79409680974700c0d678251{\"request_id\": \"b2b05a40-a5a0-9a34-933b-df8af63c91a7\", \"intermediate_results\": {\"templating\": [{\"content\": \"List the benefits and side effects of the drug in the following consumer health question: qvar 40mg what is it for.\", \"role\": \"user\"}], \"llm\": {\"id\": \"chatcmpl-CbgpuOliFS4lXR3FtBVPP7oeSZOho\", \"object\": \"chat.completion\", \"created\": 1763098834, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Qvar (beclomethasone dipropionate) is an inhaled corticosteroid medication commonly used for the maintenance treatment of asthma. It helps to prevent and control symptoms such as wheezing and shortness of breath by reducing inflammation in the airways. It is not intended for the relief of acute asthma attacks.\\n\\n### Benefits:\\n1. **Reduces Inflammation**: Decreases swelling and irritation in the airways, helping to prevent asthma symptoms.\\n2. **Improves Breathing**: Helps to open airways, making it easier to breathe.\\n3. **Fewer Asthma Attacks**: Regular use can lead to fewer and milder asthma attacks.\\n4. **Maintenance of Asthma Control**: Helps in maintaining long-term control of asthma symptoms.\\n\\n### Potential Side Effects:\\n1. **Throat Irritation**: May cause a sore throat or hoarseness.\\n2. **Oral Thrush**: A fungal infection in the mouth; can be minimized by rinsing the mouth after use.\\n3. **Cough**: Some users may experience a cough immediately after use.\\n4. **Nasal Congestion**: Stuffy nose might occur in some individuals.\\n5. **Headache**: A common mild side effect.\\n6. **Potential for Delayed Growth in Children**: Long-term use can affect growth rates in children, so growth should be monitored.\\n7. **Other Systemic Effects**: While rare with inhaled steroids, potential side effects could include changes in mood, adrenal suppression, and bone density reduction if used at high doses for prolonged periods.\\n\\nIt is essential for users to follow their healthcare provider\\u2019s instructions and discuss any concerns or side effects they experience.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 348, \"prompt_tokens\": 33, \"total_tokens\": 381}}}, \"final_result\": {\"id\": \"chatcmpl-CbgpuOliFS4lXR3FtBVPP7oeSZOho\", \"object\": \"chat.completion\", \"created\": 1763098834, \"model\": \"gpt-4o-2024-08-06\", \"system_fingerprint\": \"fp_4a331a0222\", \"choices\": [{\"index\": 0, \"message\": {\"role\": \"assistant\", \"content\": \"Qvar (beclomethasone dipropionate) is an inhaled corticosteroid medication commonly used for the maintenance treatment of asthma. It helps to prevent and control symptoms such as wheezing and shortness of breath by reducing inflammation in the airways. It is not intended for the relief of acute asthma attacks.\\n\\n### Benefits:\\n1. **Reduces Inflammation**: Decreases swelling and irritation in the airways, helping to prevent asthma symptoms.\\n2. **Improves Breathing**: Helps to open airways, making it easier to breathe.\\n3. **Fewer Asthma Attacks**: Regular use can lead to fewer and milder asthma attacks.\\n4. **Maintenance of Asthma Control**: Helps in maintaining long-term control of asthma symptoms.\\n\\n### Potential Side Effects:\\n1. **Throat Irritation**: May cause a sore throat or hoarseness.\\n2. **Oral Thrush**: A fungal infection in the mouth; can be minimized by rinsing the mouth after use.\\n3. **Cough**: Some users may experience a cough immediately after use.\\n4. **Nasal Congestion**: Stuffy nose might occur in some individuals.\\n5. **Headache**: A common mild side effect.\\n6. **Potential for Delayed Growth in Children**: Long-term use can affect growth rates in children, so growth should be monitored.\\n7. **Other Systemic Effects**: While rare with inhaled steroids, potential side effects could include changes in mood, adrenal suppression, and bone density reduction if used at high doses for prolonged periods.\\n\\nIt is essential for users to follow their healthcare provider\\u2019s instructions and discuss any concerns or side effects they experience.\"}, \"finish_reason\": \"stop\"}], \"usage\": {\"completion_tokens\": 348, \"prompt_tokens\": 33, \"total_tokens\": 381}}}44.5463812025-11-14 05:43:14.0161852025-11-14 05:43:14.016185
\n", + "
\n", + " \n", + "
\n", + "

Table: evaluation_result

\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
submission_idrun_idrepetition_countmetricaggregating_valuemetric_resulterrorcreated_atupdated_at
f1132352cb524392b733ca0773c6bef0960997700d79409680974700c0d678251\"BERT Score/F1\"0.522608{\"precision\": 0.4782029390335083, \"recall\": 0.5761047601699829, \"f1\": 0.5226083397865295}None2025-11-14 05:52:03.1291652025-11-14 05:52:03.129169
ce3fd3f1f8f04499847153fb1d3a2b0f960997700d79409680974700c0d678251\"BERT Score/F1\"0.490477{\"precision\": 0.4271319508552551, \"recall\": 0.5758814811706543, \"f1\": 0.4904767870903015}None2025-11-14 05:52:03.1291702025-11-14 05:52:03.129171
e0a2c70183dd4ce289772b5ae74957b6960997700d79409680974700c0d678251\"BERT Score/F1\"0.479421{\"precision\": 0.4179512560367584, \"recall\": 0.5620903968811035, \"f1\": 0.4794212579727173}None2025-11-14 05:52:03.1291712025-11-14 05:52:03.129174
61ca98967e5b45f4865db10d81de298b960997700d79409680974700c0d678251\"BERT Score/F1\"0.343647{\"precision\": 0.31056681275367737, \"recall\": 0.3846154510974884, \"f1\": 0.34364742040634155}None2025-11-14 05:52:03.1291752025-11-14 05:52:03.129176
9f84346869014412a1fd55ad52bd23b1960997700d79409680974700c0d678251\"BERT Score/F1\"0.331058{\"precision\": 0.27349621057510376, \"recall\": 0.4193095266819, \"f1\": 0.3310583531856537}None2025-11-14 05:52:03.1291762025-11-14 05:52:03.129177
98a14a854ba94f09b7a7b48c30878f3b960997700d79409680974700c0d678251\"BERT Score/F1\"0.532768{\"precision\": 0.457075834274292, \"recall\": 0.6385050415992737, \"f1\": 0.5327680706977844}None2025-11-14 05:52:03.1291772025-11-14 05:52:03.129178
6c34dd7a4bba4f4e8bd9bff5ab9afa1f960997700d79409680974700c0d678251\"BERT Score/F1\"0.549074{\"precision\": 0.5064661502838135, \"recall\": 0.5995101928710938, \"f1\": 0.5490743517875671}None2025-11-14 05:52:03.1291782025-11-14 05:52:03.129179
b8c446bc2c2c423e9d60b1e7511f5c36960997700d79409680974700c0d678251\"BERT Score/F1\"0.585487{\"precision\": 0.5031953454017639, \"recall\": 0.6999572515487671, \"f1\": 0.5854871869087219}None2025-11-14 05:52:03.1291802025-11-14 05:52:03.129180
4b6e2f1ddefa4f1585977e1cbe2fa900960997700d79409680974700c0d678251\"BERT Score/F1\"0.506072{\"precision\": 0.49769705533981323, \"recall\": 0.5147332549095154, \"f1\": 0.5060718655586243}None2025-11-14 05:52:03.1291812025-11-14 05:52:03.129181
ac009b3ba51c470ea3d672e1dc0fc290960997700d79409680974700c0d678251\"BERT Score/F1\"0.509633{\"precision\": 0.4473775625228882, \"recall\": 0.5920162200927734, \"f1\": 0.5096331238746643}None2025-11-14 05:52:03.1291822025-11-14 05:52:03.129182
\n", + "
\n", + "
" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# viewing the results from sqlite db in tabular format..\n", + "import sqlite3\n", + "import pandas as pd\n", + "from IPython.display import display, HTML\n", + "\n", + "# Path to your SQLite database file\n", + "db_file = 'results-new/results.db'\n", + "\n", + "connection = sqlite3.connect(db_file)\n", + "\n", + "# Specify the table names you want to display\n", + "table_names = ['run','configuration', 'submission', 'submission_result', 'evaluation_result'] \n", + "\n", + "# Create the CSS and HTML container\n", + "html_content = \"\"\"\n", + "\n", + "
\n", + "\"\"\"\n", + "\n", + "for table_name in table_names:\n", + " query = f\"SELECT * FROM {table_name};\"\n", + " df = pd.read_sql_query(query, connection)\n", + " # If you want to see all the rows across all tables, remove/comment the next line\n", + " df = df.head(10) # Limiting the number of rows displayed\n", + " table_html = df.to_html(classes='table-container', index=False)\n", + " html_content += f\"\"\"\n", + "
\n", + "

Table: {table_name}

\n", + " {table_html}\n", + "
\n", + " \"\"\"\n", + "\n", + "html_content += \"
\"\n", + "\n", + "display(HTML(html_content))\n", + "\n", + "# Close the connection\n", + "connection.close()" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "{'id': 'ef8963f68ec99242', 'message': 'Deletion scheduled', 'targetStatus': 'DELETED'}\n" + ] + } + ], + "source": [ + "#Delete Execution Id\n", + "def delete_execution():\n", + " headers = _get_headers()\n", + " EXEC_ID = execution_id\n", + " GET_EXECUTIONS_ENDPOINT = '/v2/lm/executions/'\n", + " request_url = f\"{AICORE_BASE_URL}{GET_EXECUTIONS_ENDPOINT}{EXEC_ID}\"\n", + " try:\n", + " response = requests.delete(\n", + " request_url, headers=headers, params={\"AI-Resource-Group\":AICORE_RESOURCE_GROUP}, timeout=120\n", + " )\n", + " print(response)\n", + " if(response.status_code != 202):\n", + " raise\n", + " result = response.json()\n", + " print(result)\n", + " except:\n", + " logging.error(\"Error occurred while attempting to delete a Configuration\")\n", + " raise\n", + " \n", + "delete_execution()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/tutorials/ai-core-genaihub-evaluation/img/AI_Core.json b/tutorials/ai-core-genaihub-evaluation/img/AI_Core.json new file mode 100644 index 0000000000..56a807a864 --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/img/AI_Core.json @@ -0,0 +1,1578 @@ +{ + "name": "AI Core", + "version": "1", + "items": [ + { + "type": "http", + "name": "get_token", + "filename": "get_token.bru", + "seq": 1, + "request": { + "url": "{{ai_auth_url}}/oauth/token", + "method": "POST", + "headers": [ + { + "name": "Content-Type", + "value": "application/x-www-form-urlencoded", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "formUrlEncoded", + "formUrlEncoded": [ + { + "name": "grant_type", + "value": "client_credentials", + "enabled": true + }, + { + "name": "client_id", + "value": "{{client_id}}", + "enabled": true + }, + { + "name": "client_secret", + "value": "{{client_secret}}", + "enabled": true + } + ], + "multipartForm": [], + "file": [] + }, + "script": { + "res": "if (res.getStatus() == 200) {\n bru.setEnvVar(\"access_token\", res.body.access_token);\n}" + }, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "", + "auth": { + "mode": "none" + } + } + }, + { + "type": "folder", + "name": "admin", + "filename": "admin", + "root": { + "meta": { + "name": "admin" + } + }, + "items": [ + { + "type": "folder", + "name": "objectStoreSecrets", + "filename": "objectStoreSecrets", + "root": { + "meta": { + "name": "objectStoreSecrets" + } + }, + "items": [ + { + "type": "http", + "name": "Create a secret", + "filename": "Create a secret.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/v2/admin/objectStoreSecrets", + "method": "POST", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "", + "enabled": true + }, + { + "name": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + }, + { + "name": "Authorization", + "value": "", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "json", + "json": "{\n \"name\": \"genai-data\",\n \"data\": {\n \"AWS_ACCESS_KEY_ID\": \"\",\n \"AWS_SECRET_ACCESS_KEY\": \"\"\n },\n \"type\": \"S3\",\n \"bucket\": \"\",\n \"endpoint\": \"https://s3.eu-central-1.amazonaws.com\",\n \"region\": \"\",\n \"pathPrefix\": \"\" \n }", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Create a secret based on the configuration in the request body\n", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "http", + "name": "Get a list of metadata of available secrets.", + "filename": "Get a list of metadata of available secrets.bru", + "seq": 2, + "request": { + "url": "{{baseUrl}}/admin/objectStoreSecrets?$top=&$skip=&$count=", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [ + { + "name": "$top", + "value": "", + "type": "query", + "enabled": true + }, + { + "name": "$skip", + "value": "", + "type": "query", + "enabled": true + }, + { + "name": "$count", + "value": "", + "type": "query", + "enabled": true + } + ], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Retrieve a list of metadata of the stored secrets.\n", + "auth": { + "mode": "oauth2", + "oauth2": { + "grantType": "authorization_code", + "callbackUrl": "", + "authorizationUrl": "", + "accessTokenUrl": "", + "refreshTokenUrl": "", + "clientId": "", + "clientSecret": "", + "scope": "", + "credentialsPlacement": "basic_auth_header", + "pkce": false, + "credentialsId": "credentials", + "tokenPlacement": "header", + "tokenHeaderPrefix": "Bearer", + "tokenQueryKey": "access_token", + "autoFetchToken": true, + "autoRefreshToken": false + } + } + } + }, + { + "type": "folder", + "name": "{objectStoreName}", + "filename": "{objectStoreName}", + "root": { + "meta": { + "name": "{objectStoreName}" + } + }, + "items": [ + { + "type": "http", + "name": "Delete object store secret", + "filename": "Delete object store secret.bru", + "seq": 2, + "request": { + "url": "{{baseUrl}}/admin/objectStoreSecrets/:objectStoreName", + "method": "DELETE", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [ + { + "name": "objectStoreName", + "value": "qKoZ-aHSe", + "type": "path", + "enabled": true + } + ], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Delete a secret with the name of objectStoreName if it exists.", + "auth": { + "mode": "oauth2", + "oauth2": { + "grantType": "authorization_code", + "callbackUrl": "", + "authorizationUrl": "", + "accessTokenUrl": "", + "refreshTokenUrl": "", + "clientId": "", + "clientSecret": "", + "scope": "", + "credentialsPlacement": "basic_auth_header", + "pkce": false, + "credentialsId": "credentials", + "tokenPlacement": "header", + "tokenHeaderPrefix": "Bearer", + "tokenQueryKey": "access_token", + "autoFetchToken": true, + "autoRefreshToken": false + } + } + } + }, + { + "type": "http", + "name": "Returns the of metadata of secrets which match the query parameter.", + "filename": "Returns the of metadata of secrets which match the query parameter.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/v2/admin/objectStoreSecrets", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "This retrieves the metadata of the stored secret which match the parameter objectStoreName.\nThe fetched secret is constructed like objectStoreName-object-store-secret\nThe base64 encoded field for the stored secret is not returned.\n", + "auth": { + "mode": "oauth2", + "oauth2": { + "grantType": "authorization_code", + "callbackUrl": "", + "authorizationUrl": "", + "accessTokenUrl": "", + "refreshTokenUrl": "", + "clientId": "", + "clientSecret": "", + "scope": "", + "credentialsPlacement": "basic_auth_header", + "pkce": false, + "credentialsId": "credentials", + "tokenPlacement": "header", + "tokenHeaderPrefix": "Bearer", + "tokenQueryKey": "access_token", + "autoFetchToken": true, + "autoRefreshToken": false + } + } + } + }, + { + "type": "http", + "name": "Update object store secret", + "filename": "Update object store secret.bru", + "seq": 3, + "request": { + "url": "{{baseUrl}}/admin/objectStoreSecrets/:objectStoreName", + "method": "PATCH", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "", + "enabled": true + }, + { + "name": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [ + { + "name": "objectStoreName", + "value": "qKoZ-aHSe", + "type": "path", + "enabled": true + } + ], + "body": { + "mode": "json", + "json": "{\n \"name\": \"\",\n \"type\": \"\",\n \"data\": {},\n \"bucket\": \"\",\n \"endpoint\": \"\",\n \"region\": \"\",\n \"pathPrefix\": \"\",\n \"verifyssl\": \"\",\n \"usehttps\": \"1\"\n}", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Update a secret with name of objectStoreName if it exists.\n", + "auth": { + "mode": "oauth2", + "oauth2": { + "grantType": "authorization_code", + "callbackUrl": "", + "authorizationUrl": "", + "accessTokenUrl": "", + "refreshTokenUrl": "", + "clientId": "", + "clientSecret": "", + "scope": "", + "credentialsPlacement": "basic_auth_header", + "pkce": false, + "credentialsId": "credentials", + "tokenPlacement": "header", + "tokenHeaderPrefix": "Bearer", + "tokenQueryKey": "access_token", + "autoFetchToken": true, + "autoRefreshToken": false + } + } + } + } + ] + } + ] + } + ] + }, + { + "type": "folder", + "name": "lm", + "filename": "lm", + "root": { + "meta": { + "name": "lm" + } + }, + "items": [ + { + "type": "folder", + "name": "configurations", + "filename": "configurations", + "root": { + "meta": { + "name": "configurations" + } + }, + "items": [ + { + "type": "http", + "name": "Create configuration Copy", + "filename": "Create configuration Copy.bru", + "seq": 3, + "request": { + "url": "{{baseUrl}}/v2/lm/configurations", + "method": "DELETE", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "json", + "json": "{\n \"id\": \"\"\n}", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Create a new configuration linked to a specific scenario and executable for use in an execution\nor deployment.\n", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "http", + "name": "Create configuration", + "filename": "Create configuration.bru", + "seq": 2, + "request": { + "url": "{{baseUrl}}/v2/lm/configurations", + "method": "POST", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "json", + "json": "{\n \"name\": \"genai-eval-conf\",\n \"scenarioId\": \"genai-evaluations\",\n \"executableId\": \"genai-evaluations-simplified\",\n \"inputArtifactBindings\": [\n {\n \"key\": \"datasetFolder\",\n \"artifactId\": \"\"\n }\n ],\n \"parameterBindings\": [\n {\n \"key\": \"repetitions\",\n \"value\": \"1\"\n },\n {\n \"key\": \"orchestrationDeploymentURL\",\n \"value\": \"\"\n\n },\n {\n \"key\": \"metrics\",\n \"value\": \"language_match\"\n },\n {\n \"key\": \"testDataset\",\n \"value\": \"{\\\"path\\\": \\\"testdata/global_customer_queries.csv\\\", \\\"type\\\": \\\"csv\\\"}\"\n },\n {\n \"key\": \"promptTemplate\",\n \"value\": \"\"\n },\n {\n \"key\": \"models\",\n \"value\": \"gpt-4.1:latest\"\n }\n ]\n}\n", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Create a new configuration linked to a specific scenario and executable for use in an execution\nor deployment.\n", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "http", + "name": "Get list of configurations", + "filename": "Get list of configurations.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/v2/lm/configurations", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Retrieve a list of configurations. Filter results by scenario ID or a list of executable IDs.\nSearch for configurations containing the search string as substring in the configuration name.\n", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "folder", + "name": "{configurationId}", + "filename": "{configurationId}", + "root": { + "meta": { + "name": "{configurationId}" + } + }, + "items": [ + { + "type": "http", + "name": "Get configuration by ID", + "filename": "Get configuration by ID.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/v2/lm/configurations", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Retrieve details for configuration with configurationId.", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + } + ] + }, + { + "type": "folder", + "name": "$count", + "filename": "$count", + "root": { + "meta": { + "name": "$count" + } + }, + "items": [ + { + "type": "http", + "name": "Get number of configurations", + "filename": "Get number of configurations.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/lm/configurations/$count?scenarioId=iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN&$search=}\"NI2Kn!V&searchCaseInsensitive=false&executableIds=T_jtbUJzwg0e.okSV667jeZejqVb,3e0cmfc4c-6YavNz92uztZE", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "", + "enabled": true + }, + { + "name": "Accept", + "value": "text/plain", + "enabled": true + } + ], + "params": [ + { + "name": "scenarioId", + "value": "iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN", + "type": "query", + "enabled": true + }, + { + "name": "$search", + "value": "}\"NI2Kn!V", + "type": "query", + "enabled": true + }, + { + "name": "searchCaseInsensitive", + "value": "false", + "type": "query", + "enabled": true + }, + { + "name": "executableIds", + "value": "T_jtbUJzwg0e.okSV667jeZejqVb,3e0cmfc4c-6YavNz92uztZE", + "type": "query", + "enabled": true + } + ], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Retrieve the number of available configurations that match the specified filter criteria.\nFilter criteria include a scenarioId or executableIdsList. Search by substring of configuration name is also possible.\n", + "auth": { + "mode": "oauth2", + "oauth2": { + "grantType": "authorization_code", + "callbackUrl": "", + "authorizationUrl": "", + "accessTokenUrl": "", + "refreshTokenUrl": "", + "clientId": "", + "clientSecret": "", + "scope": "", + "credentialsPlacement": "basic_auth_header", + "pkce": false, + "credentialsId": "credentials", + "tokenPlacement": "header", + "tokenHeaderPrefix": "Bearer", + "tokenQueryKey": "access_token", + "autoFetchToken": true, + "autoRefreshToken": false + } + } + } + } + ] + } + ] + }, + { + "type": "folder", + "name": "artifacts", + "filename": "artifacts", + "root": { + "meta": { + "name": "artifacts" + } + }, + "items": [ + { + "type": "http", + "name": "Get list of artifacts", + "filename": "Get list of artifacts.bru", + "seq": 2, + "request": { + "url": "{{baseUrl}}/v2/lm/artifacts", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [ + { + "name": "scenarioId", + "value": "iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN", + "type": "query", + "enabled": false + }, + { + "name": "executionId", + "value": "iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN", + "type": "query", + "enabled": false + }, + { + "name": "name", + "value": "[G7 ovyt8i", + "type": "query", + "enabled": false + }, + { + "name": "kind", + "value": "other", + "type": "query", + "enabled": false + }, + { + "name": "artifactLabelSelector", + "value": "ext.ai.sap.com/bXN1EAk=D*", + "type": "query", + "enabled": false + }, + { + "name": "$top", + "value": "10000", + "type": "query", + "enabled": false + }, + { + "name": "$skip", + "value": "", + "type": "query", + "enabled": false + }, + { + "name": "$search", + "value": "}\"NI2Kn!V", + "type": "query", + "enabled": false + }, + { + "name": "searchCaseInsensitive", + "value": "false", + "type": "query", + "enabled": false + }, + { + "name": "$expand", + "value": "scenario", + "type": "query", + "enabled": false + } + ], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Retrieve a list of artifacts that matches the specified filter criteria.\nFilter criteria include scenario ID, execution ID, an artifact name, artifact kind, or artifact labels.\nUse top/skip parameters to paginate the result list.\nSearch by substring of artifact name or description, if required.\n", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "http", + "name": "Register artifact", + "filename": "Register artifact.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/v2/lm/artifacts", + "method": "POST", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "json", + "json": "{\n \"name\": \"aiconfig\",\n \"kind\": \"dataset\",\n \"url\": \"ai://genai-data/genaiEvaluation/14af1af80b974edb8731632d17286343\",\n \"scenarioId\": \"genai-evaluations\"\n}\n", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Register an artifact for use in a configuration, for example a model or a dataset.", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "folder", + "name": "$count", + "filename": "$count", + "root": { + "meta": { + "name": "$count" + } + }, + "items": [ + { + "type": "http", + "name": "Get number of artifacts", + "filename": "Get number of artifacts.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/lm/artifacts/$count?scenarioId=iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN&executionId=iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN&name=[G7 ovyt8i&kind=other&$search=}\"NI2Kn!V&searchCaseInsensitive=false&artifactLabelSelector=ext.ai.sap.com/bXN1EAk=D*", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "", + "enabled": true + }, + { + "name": "Accept", + "value": "text/plain", + "enabled": true + } + ], + "params": [ + { + "name": "scenarioId", + "value": "iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN", + "type": "query", + "enabled": true + }, + { + "name": "executionId", + "value": "iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN", + "type": "query", + "enabled": true + }, + { + "name": "name", + "value": "[G7 ovyt8i", + "type": "query", + "enabled": true + }, + { + "name": "kind", + "value": "other", + "type": "query", + "enabled": true + }, + { + "name": "$search", + "value": "}\"NI2Kn!V", + "type": "query", + "enabled": true + }, + { + "name": "searchCaseInsensitive", + "value": "false", + "type": "query", + "enabled": true + }, + { + "name": "artifactLabelSelector", + "value": "ext.ai.sap.com/bXN1EAk=D*", + "type": "query", + "enabled": true + } + ], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Retrieve the number of available artifacts that match the specified filter criteria.\nFilter criteria include a scenarioId, executionId, an artifact name, artifact kind, or artifact labels.\nSearch by substring of artifact name or description is also possible.\n", + "auth": { + "mode": "oauth2", + "oauth2": { + "grantType": "authorization_code", + "callbackUrl": "", + "authorizationUrl": "", + "accessTokenUrl": "", + "refreshTokenUrl": "", + "clientId": "", + "clientSecret": "", + "scope": "", + "credentialsPlacement": "basic_auth_header", + "pkce": false, + "credentialsId": "credentials", + "tokenPlacement": "header", + "tokenHeaderPrefix": "Bearer", + "tokenQueryKey": "access_token", + "autoFetchToken": true, + "autoRefreshToken": false + } + } + } + } + ] + } + ] + }, + { + "type": "folder", + "name": "executions", + "filename": "executions", + "root": { + "meta": { + "name": "executions" + } + }, + "items": [ + { + "type": "http", + "name": "Create execution", + "filename": "Create execution.bru", + "seq": 2, + "request": { + "url": "{{baseUrl}}/v2/lm/executions", + "method": "POST", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "json", + "json": "{\n \"configurationId\": \"\"\n}", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Create an execution using the configuration specified by configurationId.", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "http", + "name": "Get list of executions", + "filename": "Get list of executions.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/v2/lm/executions/", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [ + { + "name": "scenarioId", + "value": "iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN", + "type": "query", + "enabled": false + }, + { + "name": "executionScheduleId", + "value": "iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN", + "type": "query", + "enabled": false + }, + { + "name": "status", + "value": "DEAD", + "type": "query", + "enabled": false + }, + { + "name": "$top", + "value": "10000", + "type": "query", + "enabled": false + }, + { + "name": "$skip", + "value": "", + "type": "query", + "enabled": false + }, + { + "name": "$select", + "value": "status", + "type": "query", + "enabled": false + } + ], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Retrieve a list of executions that match the specified filter criteria.\nFilter criteria include a list of executableIds, a scenarioId, a configurationId, or a execution status.\nWith top/skip parameters it is possible to paginate the result list.\nWith select parameter it is possible to select only status.\n", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "folder", + "name": "$count", + "filename": "$count", + "root": { + "meta": { + "name": "$count" + } + } + } + ] + }, + { + "type": "folder", + "name": "deployments", + "filename": "deployments", + "root": { + "meta": { + "name": "deployments" + } + }, + "items": [ + { + "type": "http", + "name": "Create deployment", + "filename": "Create deployment.bru", + "seq": 2, + "request": { + "url": "{{baseUrl}}/v2/lm/deployments", + "method": "POST", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "json", + "json": "{\n \"configurationId\": \"\"\n}", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Create a deployment using the configuration specified by configurationId after synchronously checking the\ncorrectness of the configuration.\n", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "http", + "name": "Get list of deployments", + "filename": "Get list of deployments.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/v2/lm/deployments", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Retrieve a list of deployments that match the specified filter criteria.\nFilter criteria include a list of executableIds, a scenarioId, a configurationId, or a deployment status.\nWith top/skip parameters it is possible to paginate the result list.\nWith select parameter it is possible to select only status.\n", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "folder", + "name": "$count", + "filename": "$count", + "root": { + "meta": { + "name": "$count" + } + }, + "items": [ + { + "type": "http", + "name": "Get number of deployments", + "filename": "Get number of deployments.bru", + "seq": 1, + "request": { + "url": "{{baseUrl}}/lm/deployments/$count?executableIds=T_jtbUJzwg0e.okSV667jeZejqVb,3e0cmfc4c-6YavNz92uztZE&configurationId=iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN&scenarioId=iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN&status=DEAD", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "", + "enabled": true + }, + { + "name": "Accept", + "value": "text/plain", + "enabled": true + } + ], + "params": [ + { + "name": "executableIds", + "value": "T_jtbUJzwg0e.okSV667jeZejqVb,3e0cmfc4c-6YavNz92uztZE", + "type": "query", + "enabled": true + }, + { + "name": "configurationId", + "value": "iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN", + "type": "query", + "enabled": true + }, + { + "name": "scenarioId", + "value": "iiwMZ8.BjeF0SgmlZJM11XXkDUxP7Sg5GQLKEEsaWb.om5wMy1gN3AtN", + "type": "query", + "enabled": true + }, + { + "name": "status", + "value": "DEAD", + "type": "query", + "enabled": true + } + ], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "Retrieve the number of available deployments. The number can be filtered by\nscenarioId, configurationId, executableIdsList or by deployment status.\n", + "auth": { + "mode": "oauth2", + "oauth2": { + "grantType": "authorization_code", + "callbackUrl": "", + "authorizationUrl": "", + "accessTokenUrl": "", + "refreshTokenUrl": "", + "clientId": "", + "clientSecret": "", + "scope": "", + "credentialsPlacement": "basic_auth_header", + "pkce": false, + "credentialsId": "credentials", + "tokenPlacement": "header", + "tokenHeaderPrefix": "Bearer", + "tokenQueryKey": "access_token", + "autoFetchToken": true, + "autoRefreshToken": false + } + } + } + } + ] + } + ] + }, + { + "type": "folder", + "name": "metrics", + "filename": "metrics", + "root": { + "meta": { + "name": "metrics" + } + }, + "items": [ + { + "type": "http", + "name": "Evaluation Metrics via Execution ID", + "filename": "Evaluation Metrics via Execution ID.bru", + "seq": 4, + "request": { + "url": "{{baseUrl}}/v2/lm/metrics?tagFilters=evaluation.ai.sap.com/child-of=", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [ + { + "name": "tagFilters", + "url": "{{baseUrl}}/v2/lm/metrics?tagFilters=evaluation.ai.sap.com/child-of=", + "value": "evaluation.ai.sap.com/child-of=", + "type": "query", + "enabled": true + } + ], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + }, + { + "type": "http", + "name": "Metrics by Run Name", + "filename": "Metrics by Run Name.bru", + "seq": 5, + "request": { + "url": "{{baseUrl}}/v2/lm/metrics?tagFilters=evaluation.ai.sap.com/run-name=run1", + "method": "GET", + "headers": [ + { + "name": "AI-Resource-Group", + "value": "{{resource_group}}", + "enabled": true + }, + { + "name": "Accept", + "value": "application/json", + "enabled": true + } + ], + "params": [ + { + "name": "tagFilters", + "value": "evaluation.ai.sap.com/run-name=run1", + "type": "query", + "enabled": true + } + ], + "body": { + "mode": "none", + "formUrlEncoded": [], + "multipartForm": [], + "file": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "docs": "", + "auth": { + "mode": "bearer", + "bearer": { + "token": "{{access_token}}" + } + } + } + } + ] + } + ] + } + ], + "activeEnvironmentUid": "lWUmIcEkGnkMxwNBILLmY", + "environments": [ + { + "variables": [ + { + "name": "ai_auth_url", + "value": "", + "enabled": true, + "secret": false, + "type": "text" + }, + { + "name": "ai_api_url", + "value": "", + "enabled": true, + "secret": false, + "type": "text" + }, + { + "name": "client_id", + "value": "", + "enabled": true, + "secret": false, + "type": "text" + }, + { + "name": "client_secret", + "value": "", + "enabled": true, + "secret": false, + "type": "text" + }, + { + "name": "resource_group", + "value": "", + "enabled": true, + "secret": false, + "type": "text" + }, + { + "name": "orchestration_service_url", + "value": "", + "enabled": true, + "secret": false, + "type": "text" + }, + { + "name": "access_token", + "value": "", + "enabled": true, + "secret": true, + "type": "text" + } + ], + "name": "intprod" + } + ], + "root": { + "request": { + "auth": { + "mode": "oauth2", + "oauth2": { + "grantType": "authorization_code", + "callbackUrl": "", + "authorizationUrl": "", + "accessTokenUrl": "", + "refreshTokenUrl": "", + "clientId": "", + "clientSecret": "", + "scope": "", + "state": "", + "pkce": false, + "credentialsPlacement": "basic_auth_header", + "credentialsId": "credentials", + "tokenPlacement": "header", + "tokenHeaderPrefix": "Bearer", + "tokenQueryKey": "access_token", + "autoFetchToken": true, + "autoRefreshToken": false + } + }, + "vars": { + "req": [ + { + "name": "region", + "value": "prod.eu-central-1.aws", + "enabled": true, + "local": false, + "uid": "oYVk4DuVpyYqqP2roBVjE" + }, + { + "name": "baseUrl", + "value": "", + "enabled": true, + "local": false, + "uid": "I4KjDm7FxpSRwUYzjwfPG" + }, + { + "name": "auth_url", + "value": "", + "enabled": true, + "local": false, + "uid": "zuftvyCURtA9XYErCYDgo" + }, + { + "name": "client_id", + "value": "", + "enabled": true, + "local": false, + "uid": "JfGEVKm71BYTgR8UkQUGv" + }, + { + "name": "client_secret", + "value": "", + "enabled": true, + "local": false, + "uid": "ls3RYTJ40baTl8eYmilGt" + }, + { + "name": "AWS_ACCESS_KEY_ID", + "value": "", + "enabled": true, + "local": false, + "uid": "2O0YTTAdmYltm5XiHMhP2" + }, + { + "name": "AWS_SECRET_ACCESS_KEY", + "value": "", + "enabled": true, + "local": false, + "uid": "8rc4RYyPcHXyTkAnnI981" + }, + { + "name": "BUCKET_NAME", + "value": "", + "enabled": true, + "local": false, + "uid": "HqFIe8Rvc14i41WIAGGkl" + }, + { + "name": "DATABASE_URL", + "value": "https://s3-eu-central-1.amazonaws.com", + "enabled": true, + "local": false, + "uid": "aWIwuJZH5XQ5Guu2D69Sq" + } + ] + } + }, + "docs": "Provides tools to manage your scenarios and workflows in SAP AI Core. Execute pipelines as a batch job, for example to pre-process or train your models, or perform batch inference. Serve inference requests of trained models. Deploy а trained machine learning model as a web service to serve inference requests with high performance. Register your own Docker registry, synchronize your AI content from your own git repository, and register your own object store for training data and trained models.\n", + "meta": { + "name": "AI Core" + } + }, + "brunoConfig": { + "version": "1", + "name": "AI Core", + "type": "collection", + "ignore": [ + "node_modules", + ".git" + ], + "size": 0.10747432708740234, + "filesCount": 151 + } +} diff --git a/tutorials/ai-core-genaihub-evaluation/img/image-br01.png b/tutorials/ai-core-genaihub-evaluation/img/image-br01.png new file mode 100644 index 0000000000..5424ea51d0 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image-br01.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image-br02.png b/tutorials/ai-core-genaihub-evaluation/img/image-br02.png new file mode 100644 index 0000000000..4ed9d9ab02 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image-br02.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image-br03.png b/tutorials/ai-core-genaihub-evaluation/img/image-br03.png new file mode 100644 index 0000000000..48b1474ce0 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image-br03.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image-br04.png b/tutorials/ai-core-genaihub-evaluation/img/image-br04.png new file mode 100644 index 0000000000..9f8a175e47 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image-br04.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image-br05.png b/tutorials/ai-core-genaihub-evaluation/img/image-br05.png new file mode 100644 index 0000000000..69a105ef01 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image-br05.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image-br06.png b/tutorials/ai-core-genaihub-evaluation/img/image-br06.png new file mode 100644 index 0000000000..81128b34bb Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image-br06.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_007.png b/tutorials/ai-core-genaihub-evaluation/img/image_007.png new file mode 100644 index 0000000000..0cdc4cf4a7 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_007.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_008.png b/tutorials/ai-core-genaihub-evaluation/img/image_008.png new file mode 100644 index 0000000000..2f12f021a4 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_008.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_009.png b/tutorials/ai-core-genaihub-evaluation/img/image_009.png new file mode 100644 index 0000000000..1c979c6b0a Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_009.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_1.png b/tutorials/ai-core-genaihub-evaluation/img/image_1.png new file mode 100644 index 0000000000..6db3eb05c3 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_1.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_10.png b/tutorials/ai-core-genaihub-evaluation/img/image_10.png new file mode 100644 index 0000000000..275de82544 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_10.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_19.png b/tutorials/ai-core-genaihub-evaluation/img/image_19.png new file mode 100644 index 0000000000..3e302e4c77 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_19.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_20.png b/tutorials/ai-core-genaihub-evaluation/img/image_20.png new file mode 100644 index 0000000000..ebf5c705ea Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_20.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_21.png b/tutorials/ai-core-genaihub-evaluation/img/image_21.png new file mode 100644 index 0000000000..dd9f9f22bb Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_21.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_22.png b/tutorials/ai-core-genaihub-evaluation/img/image_22.png new file mode 100644 index 0000000000..abcae67d60 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_22.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_23.png b/tutorials/ai-core-genaihub-evaluation/img/image_23.png new file mode 100644 index 0000000000..97b0bc60f0 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_23.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_24.png b/tutorials/ai-core-genaihub-evaluation/img/image_24.png new file mode 100644 index 0000000000..5471c2e38f Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_24.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_25.png b/tutorials/ai-core-genaihub-evaluation/img/image_25.png new file mode 100644 index 0000000000..8b9af206bd Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_25.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_26.png b/tutorials/ai-core-genaihub-evaluation/img/image_26.png new file mode 100644 index 0000000000..d2166f1b25 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_26.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_27.png b/tutorials/ai-core-genaihub-evaluation/img/image_27.png new file mode 100644 index 0000000000..c3472efdb8 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_27.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_29.png b/tutorials/ai-core-genaihub-evaluation/img/image_29.png new file mode 100644 index 0000000000..09c845eea1 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_29.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_31.png b/tutorials/ai-core-genaihub-evaluation/img/image_31.png new file mode 100644 index 0000000000..7a1a959fb0 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_31.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_32.png b/tutorials/ai-core-genaihub-evaluation/img/image_32.png new file mode 100644 index 0000000000..fe827f3460 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_32.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_33.png b/tutorials/ai-core-genaihub-evaluation/img/image_33.png new file mode 100644 index 0000000000..1ee321aa5e Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_33.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_34.png b/tutorials/ai-core-genaihub-evaluation/img/image_34.png new file mode 100644 index 0000000000..47498a7b07 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_34.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_40.png b/tutorials/ai-core-genaihub-evaluation/img/image_40.png new file mode 100644 index 0000000000..87af4a4e8f Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_40.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_41.png b/tutorials/ai-core-genaihub-evaluation/img/image_41.png new file mode 100644 index 0000000000..28e12a5463 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_41.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_43.png b/tutorials/ai-core-genaihub-evaluation/img/image_43.png new file mode 100644 index 0000000000..d594ffa7c3 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_43.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_44.png b/tutorials/ai-core-genaihub-evaluation/img/image_44.png new file mode 100644 index 0000000000..8b352c79ec Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_44.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_45.png b/tutorials/ai-core-genaihub-evaluation/img/image_45.png new file mode 100644 index 0000000000..7cf1a3f633 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_45.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_46.png b/tutorials/ai-core-genaihub-evaluation/img/image_46.png new file mode 100644 index 0000000000..eab460b4fd Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_46.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_47.png b/tutorials/ai-core-genaihub-evaluation/img/image_47.png new file mode 100644 index 0000000000..fc729b5ea1 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_47.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_48.png b/tutorials/ai-core-genaihub-evaluation/img/image_48.png new file mode 100644 index 0000000000..a7d8b132fb Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_48.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_49.png b/tutorials/ai-core-genaihub-evaluation/img/image_49.png new file mode 100644 index 0000000000..ec44bfad3e Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_49.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_5.png b/tutorials/ai-core-genaihub-evaluation/img/image_5.png new file mode 100644 index 0000000000..e30beaf9b8 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_5.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_50.png b/tutorials/ai-core-genaihub-evaluation/img/image_50.png new file mode 100644 index 0000000000..74fea1ca6d Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_50.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_6.png b/tutorials/ai-core-genaihub-evaluation/img/image_6.png new file mode 100644 index 0000000000..4a96b45b95 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_6.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_ail_or1.png b/tutorials/ai-core-genaihub-evaluation/img/image_ail_or1.png new file mode 100644 index 0000000000..060af6b829 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_ail_or1.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_ail_or2.png b/tutorials/ai-core-genaihub-evaluation/img/image_ail_or2.png new file mode 100644 index 0000000000..7ceaf72448 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_ail_or2.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_ail_or3.png b/tutorials/ai-core-genaihub-evaluation/img/image_ail_or3.png new file mode 100644 index 0000000000..0b60b1541d Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_ail_or3.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_br_dt.png b/tutorials/ai-core-genaihub-evaluation/img/image_br_dt.png new file mode 100644 index 0000000000..841683c510 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_br_dt.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_br_or1.png b/tutorials/ai-core-genaihub-evaluation/img/image_br_or1.png new file mode 100644 index 0000000000..8af37314e4 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_br_or1.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_br_pr.png b/tutorials/ai-core-genaihub-evaluation/img/image_br_pr.png new file mode 100644 index 0000000000..22d143968b Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_br_pr.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_py03.png b/tutorials/ai-core-genaihub-evaluation/img/image_py03.png new file mode 100644 index 0000000000..cace1aedb0 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_py03.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_py_con.png b/tutorials/ai-core-genaihub-evaluation/img/image_py_con.png new file mode 100644 index 0000000000..12bf2650b4 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_py_con.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_py_or1.png b/tutorials/ai-core-genaihub-evaluation/img/image_py_or1.png new file mode 100644 index 0000000000..0469ab08c5 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_py_or1.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/image_py_rk.png b/tutorials/ai-core-genaihub-evaluation/img/image_py_rk.png new file mode 100644 index 0000000000..d7e2b38c4b Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/img/image_py_rk.png differ diff --git a/tutorials/ai-core-genaihub-evaluation/img/requirements.txt b/tutorials/ai-core-genaihub-evaluation/img/requirements.txt new file mode 100644 index 0000000000..c63e2f2893 --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/img/requirements.txt @@ -0,0 +1,7 @@ +generative-ai-hub-sdk==4.4.3 +python-dotenv==1.0.1 +boto3==1.37.4 +pandas==2.2.3 +json2html==1.3.0 +numpy==1.26.4 +ipywidgets==8.1.0 diff --git a/tutorials/ai-core-genaihub-evaluation/requirements.txt b/tutorials/ai-core-genaihub-evaluation/requirements.txt new file mode 100644 index 0000000000..547492540e --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/requirements.txt @@ -0,0 +1,7 @@ +sap-ai-sdk-gen +python-dotenv==1.0.1 +boto3==1.37.4 +pandas==2.2.3 +json2html==1.3.0 +numpy==1.26.4 +ipywidgets==8.1.0 diff --git a/tutorials/ai-core-genaihub-evaluation/results-new/results.db b/tutorials/ai-core-genaihub-evaluation/results-new/results.db new file mode 100644 index 0000000000..24d338d4c1 Binary files /dev/null and b/tutorials/ai-core-genaihub-evaluation/results-new/results.db differ diff --git a/tutorials/ai-core-genaihub-evaluation/sample.env b/tutorials/ai-core-genaihub-evaluation/sample.env new file mode 100644 index 0000000000..0cf95eaef8 --- /dev/null +++ b/tutorials/ai-core-genaihub-evaluation/sample.env @@ -0,0 +1,12 @@ +# AICORE CREDENTIALS +AICORE_CLIENT_ID= +AICORE_CLIENT_SECRET=AICORE CLIENT SECRET> +AICORE_AUTH_URL= +AICORE_BASE_URL= +AICORE_RESOURCE_GROUP =default + +# AWS CREDENTIALS +AWS_ACCESS_KEY= +AWS_BUCKET_ID=> +AWS_REGION= +AWS_SECRET_ACCESS_KEY= \ No newline at end of file diff --git a/tutorials/ai-core-genaihub-prompt-optimization/ai-core-genaihub-prompt-optimization.md b/tutorials/ai-core-genaihub-prompt-optimization/ai-core-genaihub-prompt-optimization.md new file mode 100644 index 0000000000..446b664e5e --- /dev/null +++ b/tutorials/ai-core-genaihub-prompt-optimization/ai-core-genaihub-prompt-optimization.md @@ -0,0 +1,1133 @@ +--- +parser: v2 +auto_validation: true +time: 45 +primary_tag: software-product>sap-business-technology-platform +tags: [ tutorial>beginner, topic>artificial-intelligence, topic>machine-learning, software-product>sap-business-technology-platform ] +author_name: Smita Naik +author_profile: https://github.com/I321506 +--- + +# Prompt optimization + This tutorial demonstrates how to use Prompt Optimization in SAP AI Core to automatically refine prompt templates using labeled datasets and evaluation metrics. +The process optimizes a prompt for a specific model, stores metrics in the ML Tracking Service, and saves the optimized prompt and results back to the Prompt Registry and Object Store. + +## You will learn +- How to prepare datasets and object stores for prompt optimization. +- How to create and register prompt templates in the Prompt Registry. +- How to configure and run prompt optimization via AI Launchpad, Bruno, and the Python SDK. +- How to monitor executions, review metrics, and save optimized prompts for reuse. + +## Prerequisites +1. **BTP Account** + Set up your SAP Business Technology Platform (BTP) account. + [Create a BTP Account](https://developers.sap.com/group.btp-setup.html) +2. **For SAP Developers or Employees** + Internal SAP stakeholders should refer to the following documentation: [How to create BTP Account For Internal SAP Employee](https://me.sap.com/notes/3493139), [SAP AI Core Internal Documentation](https://help.sap.com/docs/sap-ai-core) +3. **For External Developers, Customers, or Partners** + Follow this tutorial to set up your environment and entitlements: [External Developer Setup Tutorial](https://developers.sap.com/tutorials/btp-cockpit-entitlements.html), [SAP AI Core External Documentation](https://help.sap.com/docs/sap-ai-core?version=CLOUD) +4. **Create BTP Instance and Service Key for SAP AI Core** + Follow the steps to create an instance and generate a service key for SAP AI Core: + [Create Service Key and Instance](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/create-service-key?version=CLOUD) +5. **AI Core Setup Guide** + Step-by-step guide to set up and get started with SAP AI Core: + [AI Core Setup Tutorial](https://developers.sap.com/tutorials/ai-core-setup.html) +6. An Extended SAP AI Core service plan is required, as the Generative AI Hub is not available in the Free or Standard tiers. For more details, refer to +[SAP AI Core Service Plans](https://help.sap.com/docs/sap-ai-core/sap-ai-core-service-guide/service-plans?version=CLOUD) +7. You've prepared a prompt template and your template is available in the prompt registry. For more information, see [Save a Template](https://help.sap.com/docs/AI_LAUNCHPAD/3f71b1e9d5124e26ace1aa1edb11e450/49d4248485644184ab3ca2ddf36119a6.html?locale=en-US&state=DRAFT&version=DEV) + +### Pre-Read +Before starting this tutorial, ensure that you: +- Understand the basics of Generative AI workflows in SAP AI Core. +- Are familiar with creating and managing prompt templates, artifacts, and object stores +- Have the required roles such as genai_manager or custom_evaluation. +- Have completed the Quick Start tutorial or equivalent setup for SAP AI Core and AI Launchpad access. + +### Architecture Overview + +- Prompt Optimization in SAP AI Core connects the Prompt Registry, Object Store, and ML Tracking Service to form an end-to-end optimization workflow. +- The dataset (for example, Test-Data.json) is stored in the Object Store and registered as an artifact. +- During execution, the system uses the selected prompt template, metric, and model to evaluate multiple prompt variants. +- Metrics are tracked in the ML Tracking Service, and both the optimized prompt and results are saved back to the registry and object store. +- This process runs as an execution and is model-specific, ensuring the optimized prompt aligns with the target model’s behavior. + +![img](img/image_arch.png) + +### Notebook Reference + +For hands-on execution and end-to-end reference, use the accompanying [Prompt Optimization Notebook](https://github.com/SAP-samples/aicore-genai-samples/blob/main/genai-sample-apps/prompt-optimizer/prompt-optimizer.ipynb). It includes complete Python code examples that align with each step of this tutorial — from dataset preparation and artifact registration to configuration creation, execution, and result retrieval. + +💡 Even though this tutorial provides stepwise code snippets for clarity, the notebook contains all required imports, object initializations, and helper functions to run the flow seamlessly in one place. + +**To use the notebook:** +- Download and open [notebook](https://github.com/SAP-samples/aicore-genai-samples/blob/main/genai-sample-apps/prompt-optimizer/prompt-optimizer.ipynb) in your preferred environment (e.g., VS Code, JupyterLab). +- Configure your environment variables such as AICORE_BASE_URL, AICORE_AUTH_TOKEN, and object store credentials . +- Execute each cell in order to reproduce the complete prompt optimization workflow demonstrated in this tutorial. + +### Environment Variables Setup + +[OPTION BEGIN [SAP AI Launchpad]] + +- Navigate to your SAP AI Core Launchpad. + +- In the Workspaces section, click on "Add" to create a new workspace. + - A workspace in SAP AI Core is a logical container that holds your resources (like models and pipelines) and provides the isolation needed for your projects. + +- When prompted, enter your AI Core credentials (such as Client ID, Client Secret, and Base URL). + - Note: If you're unsure about where to find these credentials, refer to this [guide](https://developers.sap.com/tutorials/ai-core-generative-ai.html#1c4f36d7-f345-4822-be00-c15f133ff7d8). + +- Once the workspace is successfully created, select your desired Resource Group to begin the evaluation process. + +Refer to the screenshot below for guidance: +![img](img/image_34.png) + +[OPTION END] + +[OPTION BEGIN [Python SDK]] + +- Open **Visual Studio Code or Jupyter Notebook**. Create a new file with the .ipynb extension (e.g., prompt_optimization.ipynb). +- Create a **.env** file in the root directory of your project. +- Add your **AI Core** and **AWS credentials** as shown below. + +```env +# AICORE CREDENTIALS +AICORE_CLIENT_ID= +AICORE_CLIENT_SECRET= +AICORE_AUTH_URL= +AICORE_BASE_URL= +AICORE_RESOURCE_GROUP= + +# AWS CREDENTIALS +AWS_ACCESS_KEY= +AWS_BUCKET_ID= +AWS_REGION= +AWS_SECRET_ACCESS_KEY= + +# ORCHESTRATION DEPLOYMENT URL +DEPLOYMENT_URL= +``` + +**Note:** Replace placeholders (e.g., CLIENT_ID, CLIENT_SECRET, etc) with your actual environment credentials. + +Refer to the below screenshot for clarity: +![img](img/image_1.png) + +#### Connect to AI Core Instance + +Once the environment variables are set and dependencies are installed, run the following code to connect to your instance: + +```PYTHON +# Loading the credentials from the env file +from gen_ai_hub.proxy.gen_ai_hub_proxy import GenAIHubProxyClient +from dotenv import load_dotenv +import os + +load_dotenv(override=True) + +# Fetching environment variables +AICORE_BASE_URL = os.getenv("AICORE_BASE_URL") +AICORE_RESOURCE_GROUP = os.getenv("AICORE_RESOURCE_GROUP") +AICORE_AUTH_URL = os.getenv("AICORE_AUTH_URL") +AICORE_CLIENT_ID = os.getenv("AICORE_CLIENT_ID") +AICORE_CLIENT_SECRET = os.getenv("AICORE_CLIENT_SECRET") + +AWS_ACCESS_KEY = os.getenv("AWS_ACCESS_KEY") +AWS_BUCKET_ID = os.getenv("AWS_BUCKET_ID") +AWS_REGION = os.getenv("AWS_REGION") +AWS_SECRET_ACCESS_KEY = os.getenv("AWS_SECRET_ACCESS_KEY") + +# Initializing the GenAIHubProxyClient +client = GenAIHubProxyClient( + base_url=AICORE_BASE_URL, + auth_url=AICORE_AUTH_URL, + client_id=AICORE_CLIENT_ID, + client_secret=AICORE_CLIENT_SECRET, + resource_group=AICORE_RESOURCE_GROUP +) +``` + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +- please follow the steps in the [Tutorial](https://developers.sap.com/tutorials/ai-core-orchestration-consumption.html) to set up your environment, refer step - **Set Up Your Environment and Configure Access** and proceed till generating the token + +[OPTION END] + +### Register Object Store Secret in AI Core + +The object store is used by Prompt Optimization to read datasets and store generated artifacts and results. +In most environments, a default object store is already registered. +If your workspace already shows an entry named default under Object Stores, you can skip this step. +Otherwise, follow the instructions below to register a new one. + +[OPTION BEGIN [SAP AI Launchpad]] + +- Open the **SAP AI Core Launchpad** and navigate to the **Administration** tab. +- Select the **Object Store** section from the left-hand menu. +- Click on **“Add”** to register a new object store secret. +- Fill in the required bucket details as shown in the screenshot below. + +![img](img/image_33.png) + +In the **Secret** field, use the following structure to provide your AWS credentials: + +```json +{ + "AWS_ACCESS_KEY_ID": "Enter Your value", + "AWS_SECRET_ACCESS_KEY": "Enter Your value" +} +``` +[OPTION END] + +[OPTION BEGIN [Python SDK]] + +If you’re running this tutorial in a Python environment and need to create a new S3-based object store, you can register it manually: + +```PYTHON +def _get_headers(): + headers = { + "Authorization": client.get_ai_core_token(), + "AI-Resource-Group": AICORE_RESOURCE_GROUP, + "Content-Type": "application/json", + } + return headers +``` + +Register your S3 bucket and credentials as a secret. + +```PYTHON +# Register S3 secret with AI Core which will be used an input source +import requests + +def register_oss_secret(): + headers = _get_headers() + + POST_SECRETS_ENDPOINT = '/v2/admin/objectStoreSecrets' + request_url = f"{AICORE_BASE_URL}{POST_SECRETS_ENDPOINT}" + + request_body = { + "name": "default", + "data": { + "AWS_ACCESS_KEY_ID": AWS_ACCESS_KEY, + "AWS_SECRET_ACCESS_KEY": AWS_SECRET_ACCESS_KEY + }, + "type": "S3", + "bucket": AWS_BUCKET_ID, + "endpoint": "s3-eu-central-1.amazonaws.com", + "region": AWS_REGION, + "pathPrefix": "" + } + try: + response = requests.post( + request_url, headers=headers, data=json.dumps(request_body), timeout=120 + ) + result = response.json() + print(result) + return result + except: + logging.error("Error occurred while attempting to create object store secret") + raise + +register_oss_secret() +``` + +After registration, verify that your store is visible under Object Stores in AI Launchpad or through the SDK call: + +```python +client.list_object_stores() +``` +[OPTION END] + +[OPTION BEGIN [Bruno]] + +Generic secrets securely store AWS S3 credentials required for document access + +• Expand **objectStoreSecrets** under admin and select create a secret request + +Use the below payload to create a secret for AWS S3 with NoAuthentication as authentication type. + +```CODE +{ + "name": "default", + "data": { + "AWS_ACCESS_KEY_ID": "", + "AWS_SECRET_ACCESS_KEY": "", + }, + "type": "S3", + "bucket": "", + "endpoint": "", + "region": "", + "pathPrefix": "" + } +``` +• Ensure that all values in the data dictionary are Base64-encoded as per AWS S3 credential requirements + +![img](img/image-br01.png) + +[OPTION END] + +### Prepare Dataset + +The dataset provides the examples used by the Prompt Optimization process to evaluate and refine your input prompt. +Each record should contain a sample input message and its corresponding expected structured JSON output, which represents the correct behavior you want the model to learn. + +**Dataset structure** + +Each record must include: + + - input – the user message or text prompt + + - answer – the expected model response (in valid JSON format) + +Example record from facility-train.json: + +```json +[ + { + "fields": { + "input": "Subject: Urgent Assistance Required for Specialized Cleaning Services\n\nDear ProCare + Facility Solutions Support Team. Could you please arrange for a specialized cleaning team to + visit our home at the earliest convenience? We would greatly appreciate it if this could be + prioritized since we want to host a large party this week.\n\nThank you for your prompt + attention to this matter. We look forward to your swift response and assistance.\n\nBest + regards,\n[Sender]" + }, + "answer": "{\"categories\": {\"routine_maintenance_requests\": false, + \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, + \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, + \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, + \"emergency_repair_services\": false, \"facility_management_issues\": false, + \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}" + }, + {...} +] +``` + +**Guidelines** + + - Verify that all answer values are valid JSON strings following the schema defined in your prompt. + +- Include diverse examples that represent various urgencies, sentiments, and categories. + +- Save the file as facility-train.json. + +- Ensure it’s available locally for upload in the next step. + +### Register Dataset Artifact + +The dataset used for optimization must be registered as an artifact in SAP AI Core. +Artifacts act as the link between your files stored in the object store and the services that use them during prompt optimization runs.Each artifact is uniquely identified by its name and associated with a scenario. + +In this step, you’ll create an artifact entry for your prepared dataset (facility-train.json). + +[OPTION BEGIN [SAP AI Launchpad]] + +1. In SAP AI Launchpad, go to the Workspaces app. + +2. Select the connection to your SAP AI Core runtime, and choose the resource group used for your Generative AI Hub deployment. + +3. In the side navigation, expand Generative AI Hub and choose Optimizations. + +4. Select the Artifacts tab and choose Add → Create. +A wizard appears to guide you through the process of uploading an artifact for optimizations. + +5. Complete the wizard fields with the following information: + + - Scenario: genai-optimizations + + - Name: facility-train + + - Description: (Optional) Dataset for facility prompt optimization + +6. Choose Add. + +7. Select how you want to add your artifact: + +**Option 1 – Upload File:** + + - Available to users with genai_manager or custom_evaluation roles only. + + - Select Upload File. + + - Add your object store (for example, default). + + - Specify a subpath, relative to the object store, e.g. datasets/. + + - Select your dataset file (facility-train.json). + + - Use the switch if you want to replace an existing file. + +**Option 2 – Use Existing URL:** + + - Available for users without upload privileges. + + - Select Existing URL. + + - Add your object store. + + - Specify the relative subpath for your file in the object store. + +8. (Optional) Choose Add Labels to include key-value tags that describe your artifact. + + - Use the ➕ icon to add more labels or the ✖ icon to delete labels. + + **Example:** + + - Key: prompt-optimization + + - Value: true + +9. Review all information and choose Add to complete the artifact registration. + +![img](img/image_ail01.png) + +[OPTION END] + +[OPTION BEGIN [Python SDK]] + +You can register the dataset as an artifact programmatically using the SAP Generative AI SDK: + +```python +from typing import List +import requests +import mimetypes +from urllib.parse import quote +import pathlib +import json + + +def validate_dataset(dataset: str | pathlib.Path | list, expected_keys: None | List[str] = None) -> bool: + if isinstance(dataset, (str, pathlib.Path)): + with open(dataset, "r") as f: + try: + dataset = json.load(f) + except json.JSONDecodeError as e: + raise ValueError(f"Invalid JSON in file: {e}") + if not isinstance(dataset, list): + raise ValueError("Dataset must be a list of dictionaries.") + +def upload_dataset(secret: str, + local_path: str | pathlib.Path, + remote_path: str, + scenario: str, + description: str | None = None, + overwrite: bool = False, + expected_keys: None | List[str] = None, + + allow_bucket_root: bool = False) -> str: + # Validate dataset + validate_dataset(local_path, expected_keys) + # check if secret exists + secrets = [r.name for r in client.ai_core_client.object_store_secrets.query().resources] + if secret not in secrets: + raise ValueError(f"Secret '{secret}' not found in object store secrets. Known secrets: {secrets}") + + # Check if local path exists + remote_path = remote_path.lstrip("/") + if "/" not in remote_path and not allow_bucket_root: + raise ValueError( + "Remote path must use subdirectories. Otherwise the whole bucket will be used as an input artifact. Set allow_bucket_root=True to allow this." + ) + + # URL-encode the path parameter + path = f"{secret}/" + remote_path.lstrip("/") + encoded_path = quote(path, safe="") + url = f"{client.ai_core_client.base_url}/lm/dataset/files/{encoded_path}" + params = {"overwrite": str(overwrite).lower()} + + # Prepare headers + headers = { + **client.request_header, + "Content-Type": "application/octet-stream", + } + # Guess MIME type + guessed_type, _ = mimetypes.guess_type(local_path) + if guessed_type: + headers["Content-Type"] = guessed_type + + with open(local_path, "rb") as f: + response = requests.put(url, params=params, headers=headers, data=f) + + # Handle response + if response.status_code == 201: + response = response.json() + elif response.status_code in (400, 409, 413): + # Return error details + raise requests.HTTPError(f"Upload failed ({response.status_code}): {response.text}") + else: + response.raise_for_status() + artifact_url = "/".join(response["url"].split("/")[:-1]) + for artifact in client.ai_core_client.artifact.query().resources: + if response["url"].startswith(artifact.url + "/"): + return artifact, response["url"].removeprefix(artifact.url).lstrip("/") + + # Create new artifact + path = response["url"].split("/")[-1] + new_artifact = client.ai_core_client.artifact.create( + name=f"{scenario}-prompt-optimization-data", + kind=Artifact.Kind.DATASET, + url=artifact_url, + scenario_id=scenario, + description="Datasets for prompt optimization" if description is None else description, + resource_group=headers[client.ai_core_client.rest_client.resource_group_header] + ) + return new_artifact, path + +artifact, dataset_path = upload_dataset( + secret=dataset_secret, + local_path=dataset_local_path, + remote_path=dataset_remote_path, + expected_keys=base_template.placeholders, + scenario=scenario, + overwrite=True +) + +print(f"Dataset uploaded to {artifact.url}/{dataset_path} -> Artifact ID: {artifact.id}") +``` + +![img](img/image_py01.png) + +After registration, the artifact will be visible in AI Launchpad → Workspaces → Artifacts, and can be reused in future prompt optimization runs + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +Before registering a dataset artifact in Bruno, you must upload your json file to the SAP AI Core object store using the Dataset API. +Bruno cannot upload files directly to S3; therefore, this step is required. + +**Prerequisites** + + - An object store secret must already exist in your resource group.Typically, this is the default secret named **default**. + + - The Dataset API currently supports: + + - S3 object stores only + + - json file uploads + +**Upload Your Dataset** + +Use the Dataset API – Upload File request in Bruno: + +```bash +PUT:{{ai_api_url}}/v2/lm/dataset/files/{{secretName}}/{{datasetPath}} +``` + +**Headers** + +```json +Authorization: Bearer {{token}} +AI-Resource-Group: {{resourceGroup}} +Content-Type: text/csv +``` + +**Body** + +Upload your .csv file directly as binary in Bruno’s Body + +Example Path Values: + + - secretName: default + + - datasetPath: dataset/facility-train.json + +![img](img/image_br_dt.png) + +**Note:** + +Save the ai://… URL — you will use this when creating the dataset artifact. + +**Register the Dataset Artifact** + +- Click on **Register artifact** under lm -> artifacts in bruno collection to register the artifact + +```CODE +{ + "name": "facility-train", + "kind": "dataset", + "url": "ai://default/datasets", + "scenarioId": "genai-optimizations" +} +``` +![img](img/image_br02.png) + +A successful response returns the artifact ID, which you’ll use later in the optimization configuration. + +[OPTION END] + +### Create and save the prompt template + +[OPTION BEGIN [SAP AI Launchpad]] + +Prompt templates define how the model interprets each dataset input. +In this step, you’ll create a structured prompt that guides the model to extract the correct fields (urgency, sentiment, and categories) from a facility-related message and return a well-formatted JSON response. +The template is registered in the Prompt Registry and later referenced by the optimization execution + +#### create the Prompt Template + +- In SAP AI Launchpad, go to the left-hand menu and select Generative AI Hub → Prompt Management. + +- click on Templates → create + +![img](img/image_007.png) + +#### Define the Prompt + +In the Message Blocks section: + +- Add a System and user role message: +```json +system: |- + You are a helpful assistant. + +user: |- + Giving the following message: + --- + {{?input}} + --- + Extract and return a JSON object with the following structure: + { + "urgency": "", + "sentiment": "", + "categories": { + "emergency_repair_services": , + "routine_maintenance_requests": , + "quality_and_safety_concerns": , + "specialized_cleaning_services": , + "general_inquiries": , + "sustainability_and_environmental_practices": , + "training_and_support_requests": , + "cleaning_services_scheduling": , + "customer_feedback_and_complaints": , + "facility_management_issues": + } + } + + Your response must: + - Contain only this JSON structure (no extra text). + - Be valid JSON (parsable without errors). + - Match the keys and value types exactly. +``` + +![img](img/image_008.png) + +#### Save the Template + +Click Save Template (top right): + +- Scenario → genai-optimizations + +- Name → facility-json-template + +- Version → 1.0.0 + +Click Save to persist the template. The template will appear under your Prompt Registry and can be referenced by name in optimization jobs. + +#### Verify the Template + +Go to Generative AI Hub → Prompt Management → Templates and confirm: + +- The template appears with the correct name, scenario, and version. + +- Managed By → shows how the template is stored. + +- Versioning is tracked automatically + +![img](img/image_ail02.png) + +[OPTION END] + +[OPTION BEGIN [Python SDK]] + +In your notebook or Python environment, you can define and register the same template programmatically using the SAP Generative AI SDK. + +```python +from gen_ai_hub.prompt_registry.client import PromptTemplateClient +from gen_ai_hub.prompt_registry.models.prompt_template import PromptTemplateSpec, PromptTemplate + +# Initialize Prompt Registry Client +prompt_registry_client = PromptTemplateClient(proxy_client=client) + +prompt_template_spec = PromptTemplateSpec( + template=[ + PromptTemplate( + role="system", + content=( + "You are a helpful assistant." + ) + ), + PromptTemplate( + role="user", + content=( + """Giving the following message: + --- + {{?input}} + --- + Extract and return a json with the follwoing keys and values: + - "urgency" as one of `high`, `medium`, `low` + - "sentiment" as one of `negative`, `neutral`, `positive` + - "categories" Create a dictionary with categories as keys and boolean values (True/False), where the value indicates whether the category is one of the best matching support category tags from: `emergency_repair_services`, `routine_maintenance_requests`, `quality_and_safety_concerns`, `specialized_cleaning_services`, `general_inquiries`, `sustainability_and_environmental_practices`, `training_and_support_requests`, `cleaning_services_scheduling`, `customer_feedback_and_complaints`, `facility_management_issues` + Your complete message should be a valid json string that can be read directly and only contain the keys mentioned in the list above. Never enclose it in ```json...```, no newlines, no unnessacary whitespaces.""" + ) + ) + ] +) + +# Create prompt template in registry +template = prompt_registry_client.create_prompt_template( + scenario="genai-optimizations", + name="facility-json-template", + version="1.0.0", + prompt_template_spec=prompt_template_spec +) + +print(f"✅ Created Prompt Template with ID: {template.id}") +``` +**Notes** + +- The placeholder {{?input}} will automatically be replaced by each record’s input field during optimization. + +- The resulting optimized prompt version will be saved back into the Prompt Registry. + +- Ensure you use the same template name (facility-json-template) in the optimization configuration. + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +In Bruno, you can create a prompt template by sending a POST request to the AI Core API: + +**Request: Create Prompt Template** + +**URL: ** + +```bash +{{api_url}}/v2/lm/promptTemplates +``` + +**Headers:** +``` +Authorization: Bearer {{access_token}} +Content-Type: application/json +``` + +**Body (JSON):** +```json +{ + "name": "facility-json-template", + "version": "1.0.0", + "scenario": "genai-optimizations", + "spec": { + "template": [ + { + "role": "system", + "content": "You are a helpful assistant." + }, + { + "role": "user", + "content": "Giving the following message:\n---\n{{?input}}\n---\nExtract and return a JSON object with the following keys and values:\n- \"urgency\" as one of `high`, `medium`, or `low`\n- \"sentiment\" as one of `negative`, `neutral`, or `positive`\n- \"categories\" should be a dictionary with category names as keys and boolean values (true/false), indicating whether each category applies. The categories are: `emergency_repair_services`, `routine_maintenance_requests`, `quality_and_safety_concerns`, `specialized_cleaning_services`, `general_inquiries`, `sustainability_and_environmental_practices`, `training_and_support_requests`, `cleaning_services_scheduling`, `customer_feedback_and_complaints`, `facility_management_issues`.\nYour complete message must be a valid JSON string that can be parsed directly and should only contain the keys listed above. Never enclose it in ```json``` or include extra whitespace or newlines." + } + ] + } +} +``` +![img](img/image_br_pr.png) + +[OPTION END] + +### Register an Optimization Configuration + +The optimization configuration defines how prompt optimization runs — it links the dataset artifact, prompt template, model, and metric into one executable setup. +When you run the optimization, SAP AI Core uses this configuration to iteratively tune your prompt so that the chosen metric (for example, json_exact_match) is maximized. + +[OPTION BEGIN [SAP AI Launchpad]] + +1. In SAP AI Launchpad, open the Workspaces app. + +2. Select your AI Core runtime connection and the resource group for your Generative AI Hub deployment. + +3. In the side navigation, expand Generative AI Hub → Optimizations. + +4. Choose Create to launch the configuration wizard + +5. On the General Information screen, provide: + + - Scenario: genai-optimizations + + - Name: facility-prompt-optimization + + - Description: Configuration for facility prompt optimization + +6. On the Configuration Details page: + + - Dataset: facility-train + + - Prompt Template: facility-json-template + + - Reference Model: select one of the supported base models (e.g., gpt-4o-2024-08-06). + + - Target Models: list the models to optimize for (e.g., gemini-2.5-pro--latest). + + - Metric: json_exact_match + + - Optimization Objective: maximize + +7. Review your inputs and click Create. + +The configuration will appear in the Optimizations → Configurations list. + +![img](img/image_ail03.png) + +![img](img/image_ail04.png) + +![img](img/image_ail05.png) + +![img](img/image_ail06.png) + +![img](img/image_ail07.png) + +![img](img/image_ail08.png) + +[OPTION END] + +[OPTION BEGIN [Python SDK]] + +You can register the same configuration programmatically in your notebook: + +```Python +old_new_name_mapping = { + "gemini-2.5-pro:001": "gemini-2.5-pro--001", + "gpt-4o:2024-08-06": "openai/gpt-4o-2024-08-06" +} + +old_new_name_mapping.update({old_new_name_mapping[k]: k for k, v in old_new_name_mapping.items()}) + + +def create_config(metric: str, + reference_model: str, + targets: dict, + dataset_path: str, + scenario: str, + prompt: PromptTemplateSpec) -> str: + assert metric in SUPPORTED_METRICS, f"Unsupported metric: {metric}. Supported metrics: {SUPPORTED_METRICS}" + assert reference_model in SUPPORTED_MODELS, f"Unsupported reference model: {reference_model}. Supported models: {SUPPORTED_MODELS}" + assert all(model in SUPPORTED_MODELS for model in targets.keys()), f"Unsupported target models: {targets}. Supported models: {SUPPORTED_MODELS}" + input_parameters = [ + ParameterBinding(key="dataset", value=dataset_path), + ParameterBinding(key="optimizationMetric", value=metric), + ParameterBinding(key="basePrompt", value=f'{scenario}/{prompt["name"]}:{prompt["version"]}'), + ParameterBinding(key="baseModel", value=reference_model), + ParameterBinding(key="targetModels", value=','.join(targets.keys())), + ParameterBinding(key="targetPromptMapping", value=",".join([f"{old_new_name_mapping[k]}={v}" for k, v in targets.items()])) + ] + existing_configs = client.ai_core_client.configuration.query(scenario_id='genai-optimizations', executable_ids=['genai-optimizations']) + params = {par.key: par.value for par in input_parameters} + for conf in existing_configs.resources: + if {par.key: par.value for par in conf.parameter_bindings} == params: + return conf.id + + input_artifacts = [InputArtifactBinding(key="prompt-data", artifact_id=artifact.id)] + + response = client.ai_core_client.configuration.create( + name = "prompt-optimization-configuration", # custom name of configuration + scenario_id = "genai-optimizations", # value from workflow + executable_id = "genai-optimizations", # value from workflow + resource_group = resource_group, + parameter_bindings = input_parameters, + input_artifact_bindings = input_artifacts + ) + + return response.id + +# Create the configuration +configuration_id = create_config( + metric=metric, + reference_model=reference_model, + targets=targets, + dataset_path=dataset_path, + scenario=scenario, + prompt=prompt +) +print("Optimization Configuration ID:", configuration_id) +``` +![img](img/image_py02.png) + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +In Bruno, you can create a configuration by sending a POST request to the AI Core API: + +**URL:** + +```json +{{base_url}}/v2/lm/configurations +``` +**Headers:** + +```json +Authorization: Bearer {{access_token}} +Content-Type: application/json +Accept: application/json +ai-resource-group: {{resource_group}} +``` + +**Body (JSON):** + +```json +{ + "name": "prompt-optimization-configuration", + "scenarioId": "genai-optimizations", + "executableId": "genai-optimizations", + "description": "Configuration for facility prompt optimization", + "parameterBindings": [ + { "key": "dataset", "value": "facility-train.json" }, + { "key": "optimizationMetric", "value": "JSON_Match" }, + { "key": "basePrompt", "value": "genai-optimizations/evaluate-base:0.0.1" }, + { "key": "baseModel", "value": "gpt-4o:2024-08-06" }, + { "key": "targetModels", "value": "gemini-2.5-pro:001" }, + { "key": "targetPromptMapping", "value": "gemini-2.5-pro:001=evaluate-base-gemini-2_5-pro:0.0.1" } + ], + "inputArtifactBindings": [ + { "key": "prompt-data", "artifactId": "" } + ] +} +``` +💡 Save the returned id — it represents your configuration and will be used in the next step to run the prompt optimization execution. + +![img](img/image_br03.png) + +[OPTION END] + +⚠️ Note: Model availability and versions (for example, gpt-4o:2024-08-06, gemini-2.5-pro:latest) may vary across SAP AI Core tenants. Always verify available models in Generative AI Hub → Models before use. +For the latest updates, refer to [SAP Note 3437766](https://me.sap.com/notes/3437766) – Model Availability and Support for Generative AI Hub +. + +### Run the Prompt Optimization Execution + +After registering the optimization configuration, the next step is to execute the optimization run. +This execution launches the prompt optimization workflow in SAP AI Core, which iteratively refines your prompt using the specified dataset and metric. +When the execution completes, the optimized prompt and results will be stored automatically in the prompt registry and object store. + +[OPTION BEGIN [SAP AI Launchpad]] + +Once you complete Review your inputs and click Create in the Register an Optimization Configuration step, the Optimization job starts automatically. + +After the job reaches Completed status, you can inspect logs, review evaluation metrics, and view the optimized prompt details. + +[OPTION END] + +[OPTION BEGIN [Python SDK]] + +In your notebook, execute the optimization programmatically using the SDK: + +```Python +response = client.ai_core_client.execution.create( + configuration_id = configuration_id, # Change this value. + resource_group = resource_group +) + +execution_id = response.id +print('Execution started with ID:', execution_id) +``` +![img](img/image_br04.png) + +When the execution completes, the optimized prompt is stored in the Prompt Registry and the metrics are stored in the ML Tracking Service. + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +You can also trigger the optimization execution using Bruno by sending the following API request. + +**URL:** + +```bash +{{base_url}}/v2/lm/executions +``` + +**Headers:** + +``` +Authorization: Bearer {{access_token}} +Content-Type: application/json +Accept: application/json +ai-resource-group: {{resource_group}} +``` + +**Body (JSON):** + +```json +{ + "configurationId": "" +} +``` + +![img](img/image_br05.png) + +[OPTION END] + +### Monitor and View Optimization Progress + +After triggering the prompt optimization execution, you can monitor the progress and verify its status in real time. +Monitoring helps ensure that your run completes successfully and allows you to access intermediate and final optimization results. + +[OPTION BEGIN [SAP AI Launchpad]] + +- Navigate to Generative AI Hub → ML operations in your connected workspace. + +- Open the Executions tab to view all recent prompt optimization runs. + +- Each execution displays: + + - Execution ID – unique identifier for the run. + + - Status – shows Pending, Running, Succeeded, or Failed. + + - Start/End Time – indicates when the job started and finished. + +- Select a specific execution to open the Logs tab. + + - Review live logs to check model mapping, prompt upload, and metric evaluation progress. + + - A “completed” message indicates the optimization finished successfully. + +Once the execution succeeds, proceed to view the generated optimized prompt and metric results in the following step. + +![img](img/image_ail10.png) + +[OPTION END] + +[OPTION BEGIN [Python SDK]] + +Use the SDK to programmatically monitor the status of your optimization execution. + +```Python +# Query latest executions +executions = client.ai_core_client.execution.query(scenario_id="genai-optimizations") + +for e in executions.resources: + print(f"Execution ID: {e.id}, Status: {e.status}, Created At: {e.created_at}") + +# Get detailed information about a specific execution +execution_id = execution_id +execution_details = client.ai_core_client.execution.get(execution_id) +print(execution_details) +``` +![img](img/image_py04.png) + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +Use the GET executions request to fetch all executions under your resource group: + +**URL** +```bash +GET {{baseurl}}/v2/lm/executions +``` +**Headers:** + +```json +Authorization: Bearer {{access_token}} +ai-resource-group: {{resource_group}} +``` +The response will include the latest execution details such as: + +```json +{ + "id": "", + "status": "COMPLETED", + "scenarioId": "genai-optimizations", + "configurationId": "", + "targetStatus": "COMPLETED", + "submissionTime": "2025-11-06T06:48:53Z", + "startTime": "...", + "completionTime": "...", +} +``` +These messages confirm a successful optimization. + +![img](img/image_br06.png) + +[OPTION END] + +### Review Optimization Results + +Once the prompt optimization execution completes successfully, the system generates an optimized version of your prompt and stores it in the Prompt Registry. +You can review the optimization results, inspect metrics, and compare the base and optimized prompts to understand how performance has improved. + +[OPTION BEGIN [SAP AI Launchpad]] + +- Navigate to Generative AI Hub → ML Operations → Executions. + +- Select your completed execution (status: completed). + +- Under the Artifacts, review the linked optimized prompt and result files stored in the Object Store. + +- Next, go to Prompt Management under Generative AI Hub and search for the newly created optimized prompt. + + Example: evaluate-base-gemini-2_5-pro:0.0.1 + +- You can open the prompt entry to review the prompt structure, version, and metadata, including the metric used during optimization. + +- To view detailed metric scores, navigate to the Optimization under Generative AI Hub → Runs, click on any Run name which was executed recently. + +![img](img/image_ail11.png) + +[OPTION END] + +[OPTION BEGIN [Python SDK]] + +Use the SDK to programmatically fetch and analyze your optimization results. + +```Python +result = fetch_results(execution_id) +print_result(result) +``` + +![img](img/image_py03.png) + +[OPTION END] + +[OPTION BEGIN [Bruno]] + +Use the GET executions by ID request to review the output of your specific optimization execution: + +**URL** +```bash +GET {{baseUrl}}/v2/lm/metrics?tagFilters=evaluation.ai.sap.com/child-of={evaluation-id} +``` +**Headers:** +```json +Authorization: Bearer {{access_token}} +ai-resource-group: {{resource_group}} +``` +![img](img/image_br07.png) + +You can then retrieve the optimized prompt directly from the Prompt Templates endpoint: + +**URL** +```bash +GET {{baseurl}}/v2/lm/promptTemplates +``` +**Headers:** + +```json +Authorization: Bearer {{access_token}} +ai-resource-group: {{resource_group}} +``` + +Look for the prompt name corresponding to your optimization output, for example: + +```json +"name": "evaluate-base-gemini-2_5-pro", +"version": "0.0.1" +``` + +![img](img/image_br08.png) + +[OPTION END] + diff --git a/tutorials/ai-core-genaihub-prompt-optimization/facility-synth-train/facility-train.json b/tutorials/ai-core-genaihub-prompt-optimization/facility-synth-train/facility-train.json new file mode 100644 index 0000000000..cdd4835977 --- /dev/null +++ b/tutorials/ai-core-genaihub-prompt-optimization/facility-synth-train/facility-train.json @@ -0,0 +1 @@ +[{"fields": {"input": "Subject: Urgent Assistance Required for Specialized Cleaning Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and my family and I have been availing your services for our home for the past year. We have always appreciated the high standards and professionalism your team brings to maintaining our living environment.\n\nHowever, we are currently facing an urgent issue that requires immediate attention. We recently hosted a large gathering at our home, and despite our best efforts, there are several areas that now require specialized cleaning. Specifically, we need deep cleaning for our carpets and upholstery, as well as thorough window washing. The situation is quite pressing as we have more guests arriving soon, and we want to ensure our home is in pristine condition to welcome them.\n\nWe have tried some basic cleaning ourselves, but the results have not been satisfactory. Given the high standards we have come to expect from ProCare, we are confident that your team can handle this situation efficiently and effectively.\n\nCould you please arrange for a specialized cleaning team to visit our home at the earliest convenience? We would greatly appreciate it if this could be prioritized due to the urgency of the situation.\n\nThank you for your prompt attention to this matter. We look forward to your swift response and assistance.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Specialized Cleaning Services\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is Alex, and I've been a client of ProCare Facility Solutions for a few months now. I must say, your services have been quite satisfactory so far, especially the routine maintenance and cleaning schedules.\n\nI am reaching out to inquire about your specialized cleaning services. Specifically, I am interested in deep cleaning and carpet maintenance for my residential property. While the regular cleaning has been great, I feel that a more thorough cleaning would really help maintain the pristine condition of my home.\n\nI haven't taken any steps yet to address this, as I wanted to get more information from your team first. Could you please provide me with details on how these specialized services work, the scheduling options available, and any additional costs involved?\n\nLooking forward to your response.\n\nBest regards,\nAlex"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Guidance Needed for Routine Plumbing Maintenance\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is Dr. Samuel Thompson, and I have been a satisfied client of ProCare Facility Solutions for the past two years. Your commitment to quality and sustainability has always resonated deeply with my values, and I am grateful for the exceptional service your team consistently provides.\n\nI am writing to seek your assistance with a minor plumbing issue that has recently come to my attention. While it is not an urgent matter, I believe addressing it sooner rather than later would be beneficial. Specifically, there seems to be a small leak in the plumbing system of my office building. Although it has not caused any significant disruption, I would appreciate your expert guidance on how to proceed.\n\nIn an effort to mitigate the issue, I have already inspected the area and ensured that the immediate surroundings are dry and safe. However, given the importance of maintaining a well-functioning facility, I would like to request a professional assessment and any necessary routine maintenance at your earliest convenience.\n\nYour expertise and dedication to excellence have always been a source of reassurance for me, and I am confident that your team will handle this matter with the same level of care and professionalism that I have come to expect.\n\nThank you for your attention to this matter. I look forward to your prompt response and guidance.\n\nWarm regards,\n\nDr. Samuel Thompson"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent HVAC Repair Needed\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been a delighted customer of ProCare Facility Solutions for the past year. Your services have always been stellar, and I truly appreciate the dedication and professionalism your team brings to maintaining our residential complex.\n\nHowever, I\u2019m reaching out with an urgent issue that needs immediate attention. Our HVAC system has been acting up for the past two days, and it\u2019s starting to affect the comfort of our living space. Given the current weather, this is becoming quite unbearable. I\u2019ve tried resetting the system and checking the filters, but nothing seems to work.\n\nCould you please send someone over as soon as possible to diagnose and fix the problem? Your prompt assistance would be greatly appreciated, as we rely heavily on a well-functioning HVAC system, especially during these times.\n\nThank you so much for your help and understanding. I look forward to your swift response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Immediate Attention Required: Serious Safety Concerns\n\nHi ProCare Support Team,\n\nI'm really upset and need your help right away. My name is Jamie, and I live in one of the residential complexes you manage. I've always thought you guys were the best at keeping everything clean and safe, but something really bad happened, and I'm not sure what to do.\n\nYesterday, I noticed some weird smells and noises coming from the HVAC system in my apartment. It was so bad that I couldn't sleep, and I'm worried it might be dangerous. I tried calling your emergency repair line, but no one picked up, and I left a message that hasn't been returned yet. This is really frustrating because I thought you guys were supposed to be on top of things like this.\n\nI need someone to come and check it out immediately. I'm really scared something might go wrong, and I don't want to wait any longer. Please send someone over as soon as possible to fix this. I don't feel safe in my own home right now, and that's just not okay.\n\nThanks,\nJamie"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Assistance Needed for HVAC Maintenance in Apartment\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I reside in the apartment next door to a fellow resident who often provides a lovely backdrop of piano music to my writing sessions. I have been a resident here for a few years and have always appreciated the meticulous care your team provides to our building.\n\nRecently, I've encountered an issue with the HVAC system in my apartment. The unit seems to be malfunctioning, as it is not maintaining a consistent temperature. This has made it quite uncomfortable, especially during my extended writing sessions. While it's not an immediate crisis, it is becoming increasingly inconvenient.\n\nI have tried adjusting the thermostat and even reset the unit, but the problem persists. Given the importance of a comfortable environment for both my work and well-being, I would greatly appreciate it if your team could look into this matter at your earliest convenience.\n\nThank you for your attention to this routine maintenance request. I look forward to your prompt assistance.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent Assistance Needed for Mold Remediation\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been a dedicated audio engineer for over two decades. I\u2019ve always appreciated the meticulous care and attention to detail that ProCare Facility Solutions brings to maintaining our studio environment.\n\nRecently, we\u2019ve encountered a situation that requires your specialized cleaning services urgently. Our recording studio has experienced an unexpected issue with mold growth in the soundproofing materials. Given the sensitive nature of our equipment and the potential health risks, we need this addressed as soon as possible to ensure the safety and functionality of our space.\n\nWe\u2019ve taken some initial steps to mitigate the problem, such as increasing ventilation and isolating the affected areas, but it\u2019s clear that professional intervention is necessary. Your team\u2019s expertise in handling such specialized cleaning tasks is exactly what we need right now.\n\nCould you please arrange for a team to visit our studio at the earliest convenience? We\u2019re looking for a thorough deep cleaning and mold remediation to ensure that our environment remains pristine and safe for our ongoing projects.\n\nThank you for your prompt attention to this matter. I\u2019m confident that with ProCare\u2019s support, we\u2019ll have our studio back to its optimal condition in no time.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Facility Management Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a first-time author currently working on improving the readability of my manuscript. While my primary focus is on writing, I am also responsible for managing a small residential property where I live and work.\n\nI am reaching out to inquire about your services. Specifically, I am interested in understanding how your team can assist in maintaining a clean and efficient environment, which is crucial for my productivity and well-being. Given that this is my first time managing such responsibilities, I would appreciate any guidance or recommendations you can provide.\n\nSo far, I have tried to handle basic maintenance and cleaning tasks on my own, but I find it challenging to keep up with everything while focusing on my writing. I am particularly interested in your customized maintenance plans and eco-friendly cleaning services, as these align with my values and needs.\n\nCould you please provide more information on how your services can be tailored to a small residential property like mine? Additionally, I would like to know about the process for setting up a consultation or initial assessment.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent Assistance Needed for HVAC System Issue\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been a satisfied client of ProCare Facility Solutions for the past year. Your team has always provided exceptional service, and I truly appreciate the dedication and professionalism you bring to maintaining my property.\n\nHowever, I\u2019m currently facing an urgent issue that requires immediate attention. Over the past few days, I\u2019ve noticed a significant drop in the efficiency of the HVAC system in my home. Despite the routine maintenance checks, the system seems to be struggling to maintain a consistent temperature, which is crucial for my training and recovery as a professional athlete.\n\nI\u2019ve already tried adjusting the thermostat and checking the filters, but the problem persists. Given the high stakes of my athletic performance, I need this issue resolved as quickly as possible to ensure my living environment remains optimal for my needs.\n\nCould you please arrange for an emergency repair at the earliest convenience? Your prompt assistance in this matter would be greatly appreciated, as it directly impacts my daily routine and overall well-being.\n\nThank you for your understanding and swift action. I look forward to hearing from you soon.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Facility Management Services\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been working closely with Mike Lee on various digital marketing campaigns for ProCare Facility Solutions. I wanted to reach out with a few questions regarding your facility management services.\n\nWe are currently exploring options to enhance the efficiency and sustainability of our office building's operations. Given ProCare's reputation for excellence in facility management, I believe your services could be a great fit for our needs. Could you provide more details on how your comprehensive oversight and management of facility operations work? Specifically, I am interested in understanding the coordination of space utilization and the implementation of best practices for energy efficiency and environmental impact reduction.\n\nAdditionally, I would appreciate it if you could share any case studies or examples of similar projects you have successfully managed. This information will help us make an informed decision and potentially move forward with your services.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Assistance Needed for Facility Management Issue\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is Dr. Emily Carter, and I am a transplant surgeon at the City Medical Center. We have been utilizing ProCare Facility Solutions for our facility management needs for the past two years, and I must say, your services have significantly contributed to maintaining a safe and efficient environment for our patients and staff.\n\nRecently, we have encountered an issue with the coordination of space utilization in our surgical wing. Specifically, there seems to be a recurring problem with the allocation of operating rooms, which has led to some scheduling conflicts and minor delays in our procedures. While this has not yet impacted patient care, it is a concern that we would like to address promptly to prevent any future complications.\n\nWe have attempted to manage the situation internally by adjusting our scheduling protocols and communicating with your on-site team. However, the issue persists, and we believe that a more comprehensive review and adjustment of the space utilization plan might be necessary.\n\nCould you please assist us in resolving this matter? We would greatly appreciate it if your team could conduct a thorough assessment and provide recommendations to optimize the use of our surgical spaces. Your expertise and support have always been invaluable to us, and we are confident that with your help, we can find an effective solution.\n\nThank you for your attention to this matter. We look forward to your prompt response and continued partnership in ensuring the best possible environment for our medical team and patients.\n\nWarm regards,\n\nDr. Emily Carter\nCity Medical Center"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Follow-Up on HVAC Maintenance Issue\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. [Sender], a retired professor and a long-time resident of [Residential Complex Name]. I have been utilizing your maintenance services for some time now and generally appreciate the professionalism and thoroughness your team brings to the table.\n\nHowever, I would like to bring to your attention a recent issue I encountered with the routine maintenance of the HVAC system in my apartment. While the technician was courteous and seemed knowledgeable, the problem with the system persists. Despite the service visit, the HVAC unit continues to make an unusual noise, which is quite disruptive.\n\nI have not taken any further steps beyond the initial service call, as I wanted to first communicate my concerns directly with your support team. I would appreciate it if you could arrange for a follow-up visit to address this issue more comprehensively.\n\nThank you for your attention to this matter. I look forward to your prompt response and resolution.\n\nBest regards,\nDr. [Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry About Service Quality and Safety\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I recently came across your services while looking for facility management solutions. I\u2019m not very familiar with the technical aspects, but I wanted to reach out regarding some concerns I have about the quality and safety of your services.\n\nI\u2019ve been considering your company for managing the maintenance and cleaning of my residential property. However, I\u2019ve read some reviews and heard from a few acquaintances that there might be issues related to the quality and safety standards of your services. This has made me a bit hesitant to proceed.\n\nI haven\u2019t taken any steps yet to address these concerns, as I thought it would be best to get in touch with you directly. Could you please provide more information on how you ensure the quality and safety of your services? Any details about your protocols, certifications, or customer satisfaction rates would be really helpful.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Assistance Required for Facility Management Issue\n\nDear ProCare Support Team,\n\nTere! I hope this message finds you well. My name is Jaan, and I have been a loyal customer of ProCare Facility Solutions for quite some time now. As someone who has driven countless miles on the Tugimaantee 17, I know the importance of smooth operations and well-maintained environments, and I have always appreciated the exceptional service your team provides.\n\nHowever, I am currently facing a pressing issue with the facility management at my residential complex. The coordination of space utilization and security measures seems to have gone awry, causing significant inconvenience to the residents. The situation has escalated to a point where immediate intervention is required to restore order and ensure the safety and efficiency of our living environment.\n\nI have already tried to address the issue by speaking with the on-site management team, but unfortunately, the problem persists. Given the urgency of the situation, I am reaching out to you for swift and effective assistance. Your expertise and experience in facility management are highly valued, and I am confident that your intervention will help resolve this matter promptly.\n\nPlease let me know the next steps we can take to address this issue. I am available at your earliest convenience to discuss further details and provide any additional information you may need.\n\nThank you for your prompt attention to this matter. I look forward to your swift response and resolution.\n\nParimate soovidega,\n\nJaan\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Request for Eco-Friendly Deep Cleaning Services\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been a client of ProCare Facility Solutions for a while now. As someone who\u2019s spent years in the fast lane, both on and off the track, I appreciate the importance of precision and attention to detail, which is why I\u2019ve always trusted your services.\n\nI\u2019m reaching out today because I need some specialized cleaning services for my property. Specifically, I\u2019m looking for a deep cleaning of my garage and workshop area. These spaces have accumulated quite a bit of grime and dust over time, and I\u2019d like to get them back to a pristine condition. Given the nature of the work I do there, it\u2019s crucial that the cleaning is thorough and uses eco-friendly products.\n\nI haven\u2019t taken any steps to address this issue yet, as I wanted to consult with the experts first. I\u2019m hoping you can provide a customized cleaning plan that fits my needs and schedule.\n\nCould you please let me know the next steps and any details you need from my end to get this sorted? I\u2019m looking forward to your assistance in making my workspace spotless again.\n\nThanks in advance for your help.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Scheduling Cleaning Services for Optimal Facility Maintenance\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a consultant specializing in optimizing facility management practices for businesses. I have had the pleasure of working with several clients who have benefited immensely from ProCare Facility Solutions' exceptional services.\n\nI am reaching out to discuss the scheduling of cleaning services for one of my clients, who is keen on maintaining a pristine environment in their commercial property. They have been very impressed with the quality and eco-friendliness of your cleaning solutions and are eager to establish a regular cleaning schedule that aligns with their operational needs.\n\nTo provide some context, we are looking to implement a cleaning routine that includes daily maintenance for high-traffic areas, weekly deep cleaning sessions, and monthly specialized services such as window washing and carpet maintenance. This approach will ensure that the facility remains in top condition, promoting a healthy and productive environment for all occupants.\n\nWe have reviewed the various options available and believe that a customized plan tailored to the specific requirements of the facility would be most effective. I would appreciate your assistance in coordinating a meeting to discuss the details and finalize the schedule.\n\nThank you for your attention to this matter. I look forward to your prompt response and am confident that, with your expertise, we can develop a cleaning schedule that meets and exceeds my client's expectations.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Scheduling Cleaning Services\n\nHey ProCare Team,\n\nHope you\u2019re all doing well! I\u2019m a big fan of your services and have been relying on you guys to keep my place spotless for a while now. You\u2019ve always done a fantastic job, and I really appreciate it.\n\nI wanted to touch base about scheduling my next round of cleaning services. I\u2019m looking to set up a regular cleaning schedule, maybe something like a bi-weekly or monthly plan. My place isn\u2019t too big, so I think that should work out just fine.\n\nI haven\u2019t taken any steps yet to set this up, so I thought I\u2019d reach out to you directly. Could you help me get this sorted? I\u2019m pretty flexible with dates and times, so whatever works best for your team should be good for me.\n\nThanks a bunch for your help! Looking forward to hearing from you soon.\n\nBest,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Scheduled Maintenance Request for Minor Plumbing Issue\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been availing your excellent facility management services for my residential property for the past year. I must say, your team's dedication to maintaining a pristine and efficient environment has been truly commendable.\n\nI am writing to bring to your attention a minor issue that has recently arisen with the plumbing system in my home. While it is not an urgent matter, I believe it would be prudent to address it sooner rather than later to prevent any potential complications. Specifically, there seems to be a small leak in one of the bathroom faucets, which, although not severe, has been persistent over the past few days.\n\nI have attempted to tighten the faucet myself, but the issue persists. Given your team's expertise, I am confident that this can be resolved efficiently with your assistance. Could you kindly arrange for a technician to visit at their earliest convenience to inspect and repair the faucet as part of the routine maintenance?\n\nThank you for your attention to this matter. I appreciate your continued support and look forward to your prompt response.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Immediate Attention Required for Electrical Safety Concern\n\nDear [Receiver],\n\nI hope this message finds you well. My name is [Sender], and I am currently a resident at [Residential Property Name], where ProCare Facility Solutions has been providing exceptional facility management and maintenance services. I have always been impressed with the quality and professionalism of your team.\n\nHowever, I am writing to bring to your immediate attention a critical safety concern that requires urgent resolution. Over the past few days, I have noticed a significant issue with the electrical system in my apartment. There have been frequent power surges and flickering lights, which I believe could pose a serious safety hazard.\n\nGiven the potential risks associated with electrical malfunctions, I have taken the precaution of unplugging all non-essential devices and avoiding the use of high-power appliances. Despite these measures, the problem persists, and I am deeply concerned about the safety of my living environment.\n\nI kindly request that a qualified technician be dispatched as soon as possible to assess and rectify the issue. Ensuring the safety and well-being of residents is paramount, and I trust that ProCare Facility Solutions will address this matter with the urgency it deserves.\n\nThank you for your prompt attention to this critical issue. I look forward to your swift response and resolution.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry on Sustainability Practices and Career Guidance\n\nHi ProCare Support Team,\n\nI hope this message finds you well! My name is [Sender], and I'm a high school student with a keen interest in cloud computing and sustainability. I recently came across ProCare Facility Solutions and was really impressed by your commitment to environmentally friendly practices.\n\nI'm reaching out because I'm eager to learn more about the sustainability and environmental practices you implement in your facility management and cleaning services. Specifically, I'm interested in how these practices can be integrated into a career in cloud computing. I believe that understanding these aspects will help me align my future career with my passion for sustainability.\n\nSo far, I've done some research on my own and have read through the information available on your website. However, I would love to get more detailed insights or any additional resources you might have. Are there any specific programs or initiatives that ProCare Facility Solutions is particularly proud of? Additionally, any advice on how I can incorporate these practices into my future career would be greatly appreciated.\n\nThank you so much for your time and assistance. I'm really looking forward to learning from your expertise and applying it to my future endeavors.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Attention Required for Cleaning Schedule Issue\n\nHi [Receiver],\n\nI'm reaching out because I'm beyond frustrated with the cleaning services scheduling. My name is [Sender], and I've been using ProCare Facility Solutions for my office building for the past year. Frankly, I'm not impressed right now.\n\nThe cleaning crew was supposed to be here yesterday for the weekly cleaning, but no one showed up. This isn't the first time this has happened, and it's becoming a serious problem. I don't have time to keep chasing this up, and it's unacceptable for a company that claims to be \"premier\" in facility management.\n\nI've already called your support line twice, and all I got were empty promises that someone would get back to me. Well, no one has, and my office is still a mess. I need this resolved immediately. Send a cleaning crew today, or I'll have to consider other options.\n\nSort this out.\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Urgent: Ongoing Maintenance Issues at Our Facility\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am the community manager for [Community Name]. I have been overseeing our facility's operations and maintenance for quite some time now, and I must say, the recent experiences with your maintenance services have been less than satisfactory.\n\nWe have been facing several recurring issues with our HVAC and plumbing systems that have not been adequately addressed despite multiple service requests. The lack of timely and effective solutions is causing significant inconvenience to our residents and staff, and it is becoming increasingly difficult to manage the situation.\n\nTo give you a clearer picture, we have had technicians visit our facility on three separate occasions over the past month. Each time, the problem was either temporarily fixed or not resolved at all. This has led to a lot of frustration among our community members, and it is reflecting poorly on our management.\n\nI am reaching out to request a more permanent and effective solution to these ongoing maintenance issues. We need a thorough inspection and a comprehensive plan to address the root causes of these problems. It is crucial for us to ensure a safe and comfortable environment for everyone in our community.\n\nI trust that you understand the urgency of this matter and will prioritize our request accordingly. We have always valued the quality of service provided by ProCare Facility Solutions, and we hope to see a swift resolution to these issues.\n\nThank you for your attention to this matter. I look forward to your prompt response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Concerns About Sustainability Practices\n\nDear ProCare Support Team,\n\nI hope this message finds you well, though I must admit, my recent experiences with your services have left me quite disheartened. As an art student deeply invested in the preservation of our environment, I was initially drawn to ProCare Facility Solutions because of your advertised commitment to sustainability. However, my recent observations have led me to question the authenticity of these claims.\n\nI have been a client for several months now, utilizing your cleaning services for my studio space. While the cleaning itself has been satisfactory, I have noticed a troubling lack of transparency regarding the eco-friendly products and practices you claim to use. On multiple occasions, I have seen your staff using what appear to be conventional, chemical-laden cleaning agents, which is quite disconcerting given your stated focus on environmentally friendly practices.\n\nI have attempted to address this issue by speaking directly with the cleaning staff, but their responses have been vague and unconvincing. This lack of clarity and apparent disregard for genuine sustainability is not only disappointing but also undermines the trust I placed in your company.\n\nI am reaching out to request a detailed explanation of the specific eco-friendly products and practices you employ. Additionally, I would appreciate information on how you ensure compliance with these practices across all your teams. It is crucial for me to understand whether your commitment to sustainability is more than just a marketing ploy.\n\nThank you for your attention to this matter. I look forward to your prompt and thorough response.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Immediate Training Support Needed for In-House Maintenance Team\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been working with ProCare Facility Solutions for the past three years, managing our commercial property portfolio. I must say, your services have always been top-notch, and I truly appreciate the dedication and expertise your team brings to the table.\n\nHowever, we\u2019re currently facing a pressing issue that requires your immediate attention. Our in-house maintenance team is in urgent need of comprehensive training on the latest facility management best practices. We\u2019ve recently expanded our operations, and the new team members are struggling to keep up with the standards we\u2019ve come to expect from ProCare.\n\nI\u2019ve already tried to address this by conducting a few internal training sessions, but it\u2019s clear that we need professional guidance to ensure everyone is up to speed. We need a detailed training program that covers everything from routine maintenance to emergency repair protocols.\n\nCould you please arrange for a training session at the earliest convenience? Given the urgency of the situation, we would appreciate it if this could be prioritized. Your prompt assistance in this matter would be greatly valued and would help us maintain the high standards we strive for.\n\nThank you for your attention to this matter. Looking forward to your swift response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Request for Training and Support on Facility Management Best Practices\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is Dr. Alex Turner, and I am a wildlife ecologist who has been utilizing your facility management services for our research center. We have been quite satisfied with the overall maintenance and cleaning services provided by ProCare Facility Solutions.\n\nI am reaching out to request some additional training and support for our in-house maintenance team. As our research activities expand, we find ourselves needing to better understand the best practices in facility management, particularly in areas related to energy efficiency and environmental impact reduction. This knowledge is crucial for us to maintain our facility in a way that aligns with our ecological research goals.\n\nSo far, we have tried to implement some basic practices based on general guidelines, but we believe that a more structured training program from your experts would be highly beneficial. We are looking for comprehensive training sessions that can be scheduled at a convenient time for our team.\n\nCould you please provide us with information on the available training programs and how we can arrange for these sessions? Additionally, any resources or documentation that could help us in the interim would be greatly appreciated.\n\nThank you for your attention to this matter. We look forward to your guidance and support.\n\nBest regards,\n\nDr. Alex Turner \nWildlife Ecologist \n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I manage a small equestrian facility that has been benefiting from your services for the past year. I\u2019m reaching out today regarding a routine maintenance request for our HVAC system.\n\nWe\u2019ve noticed that the system isn\u2019t performing as efficiently as it used to, and with the changing seasons, it\u2019s crucial for us to maintain a stable environment for our horses. I believe it\u2019s time for a scheduled check-up to ensure everything is running smoothly.\n\nSo far, we\u2019ve tried basic troubleshooting like cleaning the filters and checking the thermostat settings, but the issue persists. Could you please arrange for a technician to come by and perform the necessary maintenance? We\u2019re flexible with timing but would appreciate it if this could be addressed within the next week or so.\n\nThank you for your attention to this matter. Looking forward to your prompt response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Facility Management Coordination\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. Alex Thompson, and I have been thoroughly impressed with the exceptional services provided by ProCare Facility Solutions for our residential complex. Your team's dedication to maintaining a pristine and efficient environment has not gone unnoticed.\n\nI am reaching out to discuss a minor issue we have encountered with the coordination of space utilization within our facility. While the overall management has been stellar, we have noticed a slight misalignment in the scheduling of common area usage, which occasionally leads to overlapping bookings. This is not an urgent matter, but I believe addressing it could further enhance the seamless experience we have come to expect from your services.\n\nTo provide some context, we have already attempted to manually adjust the schedules to avoid conflicts, but a more systematic approach might be beneficial. We are confident that with your expertise, a more efficient solution can be implemented.\n\nCould you please assist us in reviewing the current scheduling system and suggest any improvements or adjustments that could be made? Your guidance and support in this matter would be greatly appreciated.\n\nThank you for your attention to this matter. I look forward to your response and continuing our positive relationship with ProCare Facility Solutions.\n\nBest regards,\n\nDr. Alex Thompson"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: A Green Inquiry from a Bill Maher Enthusiast\n\nHey ProCare Support Team,\n\nHope this email finds you all in good spirits and with a dash of humor! I'm [Sender], a long-time admirer of your top-notch facility solutions. You guys are like the unsung heroes of the maintenance world, keeping everything running smoothly while the rest of us focus on our daily grind.\n\nSo, here's the deal. As a die-hard fan of Bill Maher's satirical take on the world, I can't help but appreciate the importance of sustainability and environmental practices. It's like the punchline to a joke that actually matters. I've been super impressed with your commitment to eco-friendly cleaning products and energy-efficient practices. Kudos to you for that!\n\nHowever, I've been wondering if there's more we can do to up our green game. Are there any additional initiatives or practices that you guys are planning to roll out soon? Or maybe some tips and tricks that we can implement on our end to further reduce our carbon footprint? I'm all ears and ready to take notes!\n\nI haven't really taken any steps yet, just thought I'd reach out to the experts first. After all, why reinvent the wheel when you have a team of pros at your disposal, right?\n\nLooking forward to hearing from you and getting some insights on how we can make our facility even more environmentally friendly. Keep up the fantastic work, and thanks for being the rockstars that you are!\n\nBest,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a college student majoring in East Asian Studies with a focus on contemporary Japanese culture and media. I live in a residential complex managed by ProCare Facility Solutions.\n\nI am writing to request routine maintenance for the HVAC system in my apartment. While everything is functioning adequately, I believe it would be beneficial to have a check-up to ensure everything continues to run smoothly, especially as we transition into the colder months.\n\nI haven't taken any steps to address this issue myself, as I trust your team\u2019s expertise in handling such matters. Could you please schedule a maintenance visit at your earliest convenience?\n\nThank you for your attention to this matter. I appreciate the quality service ProCare consistently provides.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry About Specialized Cleaning Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am the owner of a small bed and breakfast. I have been very pleased with the general cleaning services your team has provided over the past year. Your attention to detail and commitment to quality have truly made a difference in maintaining the welcoming atmosphere of my establishment.\n\nI am writing to inquire about your specialized cleaning services, particularly deep cleaning and carpet maintenance. While our regular cleaning schedule has been effective, I believe that a more thorough cleaning would greatly benefit our property, especially as we prepare for the upcoming holiday season.\n\nI have not yet taken any steps to address this need, as I wanted to consult with your team first to ensure we proceed in the best possible manner. Could you please provide more information on the specialized cleaning services you offer, including any recommendations for a property like ours?\n\nThank you for your time and assistance. I look forward to hearing from you soon.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Request for Deep Cleaning and Carpet Maintenance\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been utilizing your services for my residential property for the past year. I must say, I have been quite satisfied with the quality and professionalism your team consistently delivers.\n\nRecently, I have encountered a situation that requires specialized cleaning services. Specifically, I need a thorough deep cleaning of my home, including window washing and carpet maintenance. Given the importance of maintaining a pristine environment, I believe your expertise in this area would be invaluable.\n\nCould you please provide me with information on the availability of your specialized cleaning services and any necessary preparations I should make before your team arrives? I would appreciate it if we could schedule this service at your earliest convenience, though I understand that it may not be immediate.\n\nThank you for your attention to this matter. I look forward to your prompt response and continued excellent service.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Hey ProCare Support Team,\n\nHope you all are doing great! My name is Alex, and I've been using your awesome services for my apartment complex for a few months now. I must say, you guys are doing a fantastic job keeping everything spick and span.\n\nI wanted to reach out because I've been thinking a lot about how we can make our building more eco-friendly. I know you guys are big on sustainability, which is one of the reasons I chose ProCare in the first place. I was wondering if you could share some tips or maybe even offer some additional services that could help us reduce our environmental impact even more.\n\nI haven't really done much on my own yet, just some basic recycling and switching to LED bulbs, but I feel like there's so much more we could be doing. Any advice or guidance you could provide would be super helpful.\n\nThanks a ton for your help and for all the great work you do!\n\nBest,\nAlex"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Seeking Advice on Ensuring a Safe Environment for My Cats\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Margaret, and I have been a satisfied customer of ProCare Facility Solutions for the past year. I truly appreciate the excellent service your team provides in maintaining my home, which has always been a safe and clean environment for me and my beloved cats.\n\nI am writing to seek your advice on a matter that has been on my mind lately. As an elderly woman with several cats, their health and safety are of utmost importance to me. I have noticed that while your cleaning services are impeccable, I am concerned about the potential impact of certain cleaning products on my cats' health. They are very sensitive, and I want to ensure that their environment remains as safe as possible.\n\nI have not encountered any specific issues so far, but I would like to be proactive in addressing any potential risks. Could you please provide me with information on the cleaning products used in my home and whether they are pet-friendly? Additionally, if there are any alternative products or practices that could further enhance the safety of my home for my cats, I would greatly appreciate your recommendations.\n\nThank you for your attention to this matter. I look forward to your guidance and continuing to enjoy the excellent service provided by ProCare Facility Solutions.\n\nWarm regards,\n\nMargaret\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry on Sustainability and Environmental Practices\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a client of ProCare Facility Solutions for the past year, primarily utilizing your comprehensive facility management and maintenance services for my commercial property.\n\nI am reaching out to inquire about the sustainability and environmental practices that ProCare Facility Solutions implements. As someone who deeply appreciates the intricate world-building and thought-provoking themes in Orson Scott Card's works, I find myself equally fascinated by the real-world application of sustainable practices and their long-term impact on our environment.\n\nWhile I am generally satisfied with the services provided, I am keen to understand more about the specific eco-friendly products and practices your team employs. Additionally, I would like to know how these practices align with current environmental standards and what measures are taken to ensure continuous improvement in this area.\n\nI have not encountered any immediate issues or concerns, but I believe that having a deeper understanding of your sustainability efforts will not only enhance my appreciation of your services but also allow me to better communicate these benefits to my stakeholders.\n\nCould you please provide detailed information on your sustainability initiatives and any relevant documentation or resources that outline your environmental practices? I am particularly interested in any recent updates or future plans you may have in this regard.\n\nThank you for your time and assistance. I look forward to your response and continuing our partnership in maintaining a safe, efficient, and environmentally conscious facility.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Specialized Cleaning Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], a retired pilot of the Royal New Zealand Air Force. I have recently moved into a new residential property and have been considering your specialized cleaning services to maintain the pristine condition of my home.\n\nI am particularly interested in your deep cleaning and carpet maintenance services. While I have no immediate concerns, I would like to understand more about the process, the products used, and the scheduling options available. Ensuring a clean and healthy living environment is important to me, and I appreciate your commitment to eco-friendly practices.\n\nI have not taken any steps yet, as I wanted to gather more information before proceeding. Could you please provide me with details on how to get started, any available packages, and the associated costs?\n\nThank you for your assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About Training Programs for Facility Management\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a film producer currently overseeing a project that involves extensive use of special effects. Given the nature of our work, safety and feasibility are paramount concerns for me.\n\nI have been considering the implementation of more robust facility management practices to ensure that our working environment remains safe and efficient. I came across your comprehensive training programs on facility management best practices and was intrigued by the potential benefits they could offer to our team.\n\nCould you provide more details about the training programs you offer, particularly those that focus on safety and risk management? Additionally, I would appreciate information on how these programs can be tailored to meet the specific needs of a film production environment, where the use of special effects can introduce unique challenges.\n\nI have not yet taken any steps to address this matter, as I wanted to gather more information from your team first. Your expertise and guidance would be invaluable in helping us create a safer and more efficient working environment.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent Assistance Required for Cleaning Services Scheduling\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am currently managing a commercial property that has been utilizing your services for the past year. I am reaching out to you with an urgent request regarding the scheduling of our cleaning services.\n\nWe have recently encountered a significant issue with our current cleaning schedule. Due to an upcoming event at our facility, we require an immediate adjustment to our cleaning timetable to ensure the premises are in pristine condition. Specifically, we need a deep cleaning service, including window washing and carpet maintenance, to be conducted within the next 48 hours.\n\nI have already attempted to adjust the schedule through your online portal, but it appears that the system is not allowing changes on such short notice. Given the urgency of our situation, I am seeking your immediate assistance to expedite this request.\n\nCould you please prioritize this matter and confirm the availability of your team to accommodate our needs? Your prompt response and support in this matter would be greatly appreciated.\n\nThank you for your attention to this urgent request. I look forward to your swift resolution.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Scheduled Maintenance Request for HVAC System\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been a delighted customer of ProCare Facility Solutions for the past year. Your team has always done a fantastic job maintaining our residential complex, and I truly appreciate the dedication and professionalism you bring to your work.\n\nI\u2019m reaching out because we\u2019ve encountered an issue with our HVAC system. It\u2019s not an immediate crisis, but it\u2019s definitely something that needs attention soon. The system has been making unusual noises and isn\u2019t cooling as efficiently as it used to. Given the importance of a comfortable environment for my vocal practice sessions, I\u2019d love to get this sorted out before it becomes a bigger problem.\n\nI\u2019ve tried adjusting the thermostat and checking the filters, but the issue persists. I\u2019m hoping you can schedule a routine maintenance visit to diagnose and repair the system at your earliest convenience. Your prompt assistance would be greatly appreciated, as always.\n\nThank you so much for your help and for continuing to provide such excellent service. Looking forward to hearing from you soon.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent Inquiry Regarding Facility Management Services\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is Alex, and I\u2019ve been a huge fan of ProCare Facility Solutions for quite some time now. Your commitment to quality and sustainability has always resonated with me, and I\u2019ve had nothing but positive experiences with your services.\n\nI\u2019m reaching out today because I need some urgent assistance regarding your facility management services. I\u2019m currently overseeing a new residential complex that\u2019s in dire need of comprehensive facility management. We\u2019re looking to implement best practices for energy efficiency and environmental impact reduction, and I believe ProCare is the perfect partner for this.\n\nI\u2019ve already reviewed your service offerings and am particularly interested in the coordination of space utilization and sustainability efforts. However, I need more detailed information on how quickly we can get started and what the initial steps would be. Time is of the essence, as we\u2019re aiming to have everything in place within the next few weeks.\n\nCould you please provide me with a detailed plan or guide on how we can proceed? Any immediate steps we can take to expedite the process would be greatly appreciated. I\u2019m confident that with your expertise, we can create a safe, efficient, and impeccably maintained environment for our residents.\n\nThank you so much for your prompt attention to this matter. I look forward to your swift response and working together to make this project a success.\n\nBest regards,\n\nAlex [Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Immediate Assistance Required for HVAC System Issue\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a front-end developer residing in one of the residential complexes managed by ProCare Facility Solutions. I have always appreciated the meticulous attention to detail and the high standards of service your team provides.\n\nHowever, I am currently facing a significant issue that requires urgent attention. Over the past few days, there has been a noticeable decline in the efficiency of the HVAC system in my building. The temperature regulation is inconsistent, and there have been instances where the system has completely shut down, causing considerable discomfort.\n\nGiven the critical nature of this issue, I have already attempted to troubleshoot by checking the thermostat settings and ensuring that the air filters are clean. Unfortunately, these steps have not resolved the problem, and the situation seems to be deteriorating.\n\nI would greatly appreciate it if your team could prioritize this matter and send a technician to inspect and repair the HVAC system as soon as possible. The current state of the system is affecting not only my comfort but also my ability to work efficiently from home.\n\nThank you for your prompt attention to this matter. I look forward to your swift response and resolution.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry Regarding HVAC System Maintenance\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is Dr. Alex Thompson, and I am currently managing the facility operations for our research center. We have been utilizing ProCare Facility Solutions for our maintenance needs for the past two years, and I must commend your team for their consistent and reliable service.\n\nI am writing to bring to your attention a minor issue we have encountered with our HVAC system. While the system is still operational, we have noticed a slight decrease in its efficiency over the past few weeks. Given the critical nature of maintaining optimal environmental conditions for our research equipment, I believe it is prudent to address this matter sooner rather than later.\n\nTo provide some context, we have already performed basic troubleshooting steps, such as checking the filters and ensuring that the thermostat settings are correct. However, the issue persists, and we would appreciate your expertise in diagnosing and resolving the problem.\n\nCould you please arrange for a technician to visit our facility at your earliest convenience to conduct a thorough inspection and perform any necessary maintenance? While this is not an urgent matter, we would prefer to have it addressed within the next couple of weeks to prevent any potential disruptions to our research activities.\n\nThank you for your attention to this matter. I look forward to your prompt response and continued support.\n\nBest regards,\n\nDr. Alex Thompson\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Scheduled Maintenance Request for Kitchen Sink Plumbing\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am currently residing in one of the residential properties managed by ProCare Facility Solutions. I have always appreciated the high level of service and attention to detail your team provides.\n\nI am writing to bring to your attention a minor issue that has arisen in my apartment. Specifically, there seems to be a small leak in the kitchen sink plumbing. While it is not causing any immediate problems, I believe it would be best to address it before it potentially worsens.\n\nI have not taken any steps to fix the issue myself, as I trust your team\u2019s expertise in handling such matters. Could you please arrange for a technician to come by and take a look at the earliest convenience? I understand that this is not an urgent matter, so I am flexible with scheduling the visit.\n\nThank you for your attention to this matter. I look forward to your prompt response and assistance.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Immediate Assistance Required for HVAC System Disruption\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is Dr. [Sender], and I am a psychiatrist specializing in mental health. I have been collaborating with ProCare Facility Solutions for the past year to ensure that our facility remains a conducive environment for both our staff and patients.\n\nI am writing to bring to your immediate attention a pressing issue we are currently facing with the facility management at our clinic. Over the past week, we have experienced significant disruptions in our HVAC system, which has resulted in uncomfortable temperatures within the building. This situation is particularly concerning given the nature of our work, where a stable and comfortable environment is crucial for both therapeutic sessions and the overall well-being of our patients.\n\nWe have attempted to address the issue internally by adjusting the thermostat settings and conducting basic troubleshooting, but these measures have not resolved the problem. Given the urgency of maintaining a stable environment for our patients, I am reaching out to request your immediate assistance in resolving this matter.\n\nCould you please arrange for a technician to visit our facility at the earliest convenience to diagnose and fix the HVAC system? Additionally, any interim measures that can be taken to mitigate the discomfort would be greatly appreciated.\n\nThank you for your prompt attention to this matter. I look forward to your swift response and resolution.\n\nBest regards,\n\nDr. [Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Training Programs on Sustainable Facility Management\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am an influential blogger dedicated to raising awareness about the harmful effects of oil and gas operations on our environment. I have been following your company\u2019s commitment to sustainability and eco-friendly practices with great interest.\n\nI am reaching out to inquire about your training programs on facility management best practices, particularly those that focus on sustainability and reducing environmental impact. As someone who advocates for greener solutions, I am keen to learn more about how your training can help in promoting and implementing sustainable facility management practices.\n\nI have not yet taken any steps to enroll in your training programs, as I wanted to first understand the scope and content of what you offer. Specifically, I am interested in any modules or sessions that address energy efficiency, waste reduction, and the use of eco-friendly products.\n\nCould you please provide me with more information on the available training programs, including schedules, content outlines, and any prerequisites? Additionally, I would appreciate any guidance on how to get started with these programs.\n\nThank you for your time and assistance. I look forward to your response and to potentially collaborating with ProCare Facility Solutions to further our shared goal of promoting sustainability.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About ProCare Facility Solutions Services\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a health policy advisor working within the European Parliament. I have recently come across your company, ProCare Facility Solutions, and I am thoroughly impressed by the range of services you offer, particularly your commitment to sustainability and quality.\n\nAs part of my role, I am involved in crafting legislation and advising on public health matters, and I am always on the lookout for exemplary service providers who prioritize environmental impact reduction and energy efficiency. Your comprehensive facility management and maintenance services seem to align perfectly with the values we promote.\n\nI am reaching out to gather more information about your services, specifically regarding your customized maintenance plans and eco-friendly cleaning practices. Could you provide more details on how these services are tailored to meet the unique needs of different facilities? Additionally, I would appreciate any information on the training programs you offer for in-house maintenance teams and cleaning staff.\n\nI have not yet taken any steps to engage your services, as I wanted to first understand the full scope of what you offer and how it might benefit the facilities we oversee. Your prompt response would be greatly appreciated, though there is no immediate urgency.\n\nThank you for your time and assistance. I look forward to learning more about how ProCare Facility Solutions can support our efforts in maintaining safe, efficient, and sustainable environments.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent: Immediate Attention Needed for Cleaning Schedule Issues\n\nHi [Receiver],\n\nI hope this message finds you well, though I can't say the same for my experience with ProCare Facility Solutions lately. I'm [Sender], and I've been using your services for a while now, but I'm starting to question my decision.\n\nI've been trying to get a consistent cleaning schedule set up for my property, but it's been a nightmare. The communication has been spotty at best, and the few times I've managed to get through, the scheduling has been all over the place. It's frustrating to say the least, especially when I'm trying to maintain a clean and healthy environment.\n\nI've already tried calling and emailing multiple times, but it seems like my concerns are falling on deaf ears. I even tried to use your online scheduling tool, but it was more trouble than it was worth.\n\nI need someone to take this seriously and help me get a reliable cleaning schedule in place. It's not too much to ask for a service I'm paying for, is it?\n\nLooking forward to a prompt resolution.\n\nBest,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Immediate Attention Required for Safety Concerns\n\nHey ProCare Support Team,\n\nHope this message finds you well. My name is [Sender], and I've been a client of ProCare Facility Solutions for a while now, enjoying the seamless maintenance and cleaning services you provide. But today, I need to bring something to your attention that can't wait.\n\nIn the rhythm of daily life, we often overlook the small things, but this one stands out like a discordant note in a smooth melody. Recently, I've noticed some issues with the safety protocols in our building. Specifically, the emergency exits seem to be blocked by cleaning equipment, and the fire alarms haven't been tested in a while. This is a serious concern that needs immediate action.\n\nI've tried to address this with the on-site team, but the problem persists. It's like a verse that keeps repeating, unresolved. I need your expertise to ensure that our facility remains safe and compliant with all safety regulations.\n\nPlease send someone over to inspect and rectify these issues as soon as possible. Your prompt attention to this matter would be greatly appreciated.\n\nLooking forward to a swift resolution.\n\nBest,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry on Eco-Friendly Practices\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I've been a client of ProCare Facility Solutions for a few months now. I must say, your services have been quite impressive, especially the way you handle facility management and maintenance.\n\nAs a huge fan of the show \"Wisdom of the Crowd,\" I\u2019ve always been fascinated by how small changes can lead to significant impacts. This got me thinking about the eco-friendly practices that ProCare implements. I\u2019m particularly interested in understanding more about the sustainable cleaning products and methods you use.\n\nI haven\u2019t encountered any issues per se, but I\u2019m curious about the specifics of your sustainability efforts. For instance, what kind of products do you use, and how do they contribute to a healthier environment? Additionally, are there any new initiatives or technologies you\u2019re planning to adopt to further enhance your environmental impact?\n\nI haven\u2019t taken any steps to resolve this query as it\u2019s more of an informational request. I would appreciate it if you could provide me with some detailed insights or direct me to any resources that could help me understand your practices better.\n\nThank you for your time and assistance. Looking forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry on Sustainability Practices\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a client of ProCare Facility Solutions for the past year, primarily utilizing your maintenance and cleaning services for my studio and gallery space. As an artist who has found solace and purpose in painting, especially after overcoming significant personal challenges, I deeply value the environment in which I create and exhibit my work.\n\nI am reaching out to inquire about the sustainability and environmental practices that ProCare Facility Solutions implements. While I am generally satisfied with the services provided, I am particularly interested in understanding more about the eco-friendly products and practices you use. Given the nature of my work and my commitment to advocacy through art, it is important to me that the spaces I maintain are not only clean but also environmentally responsible.\n\nI have reviewed some information on your website, but I would appreciate more detailed insights into how your sustainability efforts are integrated into your daily operations. Specifically, I am curious about the types of eco-friendly cleaning products used, any certifications they might have, and how your team ensures minimal environmental impact during maintenance activities.\n\nI have not encountered any specific issues, but I believe that having a deeper understanding of your practices will help me align my own efforts with those of ProCare Facility Solutions. Any additional information or resources you could provide would be greatly appreciated.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Clarification Needed on Your Services\n\nHi [Receiver],\n\nI'm reaching out because I need some straightforward answers about your services. I'm a web developer, not someone who has time for all the marketing fluff.\n\nI've been looking into ProCare Facility Solutions for some facility management and maintenance needs for my office space. However, your website is filled with a lot of jargon and not enough clear information. I need to know exactly what you offer without all the buzzwords.\n\nI've already gone through your website and read the descriptions, but it's still not clear to me what sets you apart from other companies. Can you provide a simple, no-nonsense breakdown of your services and how they can specifically benefit a small office like mine?\n\nLooking forward to a clear and concise response.\n\nThanks,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"negative\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Assistance Required for Facility Management Issue\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am currently residing in one of the residential complexes managed by ProCare Facility Solutions. I am reaching out to you with an urgent matter that requires immediate attention.\n\nOver the past few days, I have noticed significant issues with the facility management in my building. Specifically, there have been recurring problems with the HVAC system, which has resulted in inconsistent heating and cooling. This has made it quite challenging to maintain a comfortable living environment, especially given the current weather conditions.\n\nI have already attempted to address this issue by contacting the building's maintenance staff directly, but unfortunately, the problem persists. Given the urgency of the situation, I am requesting that a qualified technician be dispatched as soon as possible to resolve this matter.\n\nYour prompt assistance in this regard would be greatly appreciated, as it is crucial for me to have a stable and comfortable living environment to focus on my studies.\n\nThank you for your understanding and swift action.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Your Services\n\nDear ProCare Facility Solutions Team,\n\nI hope this message finds you well. My name is [Sender], and I am a painter who finds inspiration in the surreal and the dreamlike. I recently came across your company and was intrigued by the comprehensive range of services you offer.\n\nAs someone who spends a lot of time in my studio, I understand the importance of a well-maintained and clean environment. I am particularly interested in your cleaning services and how they might help create a more inspiring and efficient workspace for my creative endeavors.\n\nCould you provide more details about your specialized cleaning services, particularly deep cleaning and eco-friendly practices? I am curious to know how these services could be tailored to fit the unique needs of an artist's studio.\n\nI haven't taken any steps yet to engage your services, as I wanted to gather more information first. Your expertise and commitment to quality are quite appealing, and I am eager to learn more about how ProCare Facility Solutions can support my artistic journey.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry on Sustainability and Environmental Practices\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a sports agent who has been utilizing your facility management services for my clients' residential and commercial properties. I have always appreciated the high standards of maintenance and cleanliness your team provides, which is crucial for maintaining peak physical condition for my clients.\n\nI am reaching out to inquire about the sustainability and environmental practices implemented by ProCare Facility Solutions. Given the increasing importance of eco-friendly practices in our industry, I am keen to understand how your services align with these values. Specifically, I would like to know more about the eco-friendly cleaning products you use and any initiatives you have in place to reduce the carbon footprint of the facilities you manage.\n\nWhile I have not encountered any specific issues, I believe it is essential to stay informed about the environmental impact of the services we utilize. This information will not only help me make informed decisions but also ensure that we are contributing positively to the environment.\n\nCould you please provide detailed information on your sustainability practices and any certifications or recognitions you have received in this area? Additionally, if there are any upcoming initiatives or changes in your environmental policies, I would appreciate being informed.\n\nThank you for your attention to this matter. I look forward to your prompt response.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am the owner of a small business that has been utilizing ProCare Facility Solutions for our maintenance needs for the past two years. Your services have always been reliable, and I appreciate the peace of mind that comes with knowing our facility is in good hands.\n\nI am writing to request routine maintenance for our HVAC system. While there are no immediate issues, I believe it is prudent to ensure everything is functioning optimally, especially as we approach the colder months. Regular upkeep is crucial for us, not only to maintain a comfortable environment for our employees and customers but also to stay compliant with various regulations.\n\nSo far, we have been following the maintenance schedule provided by your team, and it has served us well. However, I would like to ensure that we are not missing any critical checks or updates that might be necessary at this time.\n\nCould you please arrange for a technician to perform a thorough inspection and any required maintenance on our HVAC system? I would appreciate it if this could be scheduled at your earliest convenience, though there is no immediate rush.\n\nThank you for your attention to this matter. I look forward to your prompt response and continued excellent service.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Quality and Safety Standards\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am currently a student with a keen interest in software engineering, particularly in the realm of operating systems. I have been following ProCare Facility Solutions for some time now, and I am impressed by your commitment to quality and sustainability.\n\nI am writing to you today with a few questions regarding the quality and safety standards of your services. While I understand that your team adheres to high standards, I am curious about the specific protocols and measures you have in place to ensure the safety and well-being of both your staff and clients, especially in the context of your cleaning services.\n\nTo provide some context, I have been researching various facility management companies for a project, and I am particularly interested in how companies like yours maintain a balance between efficiency and safety. I have reviewed the information available on your website, but I would appreciate more detailed insights into your safety protocols, especially any recent updates or changes.\n\nI haven't taken any specific steps to address this inquiry beyond reviewing your online resources, as I believe direct communication with your support team would provide the most accurate and comprehensive information.\n\nCould you please provide me with more details on your quality and safety measures? Any additional information or resources you could share would be greatly appreciated.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About Maintenance and Cleaning Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a culinary instructor specializing in Indian cuisine. I organize cooking classes and events, and I am exploring options to ensure that the facilities I use are maintained to the highest standards.\n\nI have heard positive things about ProCare Facility Solutions and am particularly interested in your maintenance services. Could you provide more details on how your services can be tailored to meet the needs of a culinary teaching environment? Specifically, I am looking for information on your routine maintenance plans and any specialized cleaning services that might be beneficial for a kitchen setting.\n\nI have not yet taken any steps to engage your services, as I wanted to gather more information first. Your assistance in providing detailed information about your offerings would be greatly appreciated.\n\nThank you for your time and support. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Scheduling Cleaning Services for Upcoming Semester\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. [Sender], and I am an engineering professor at [University/Institution]. I have been consistently impressed with the quality of your services, which have significantly contributed to maintaining a conducive learning environment for our students and staff.\n\nAs we prepare for the upcoming semester, I would like to discuss the scheduling of cleaning services for our engineering department. Given the importance of project management skills in technical fields, it is crucial that our facilities remain in top condition to support various hands-on projects and research activities.\n\nI have reviewed our current cleaning schedule and believe that a few adjustments could further enhance the efficiency and cleanliness of our labs and classrooms. Specifically, I am interested in exploring options for more frequent deep cleaning sessions and specialized cleaning for our high-traffic areas, including the use of eco-friendly products.\n\nWhile this request is not urgent, I would appreciate your assistance in coordinating these changes at your earliest convenience. I have not yet taken any steps to modify our existing schedule, as I wanted to consult with your team first to ensure we implement the best possible plan.\n\nThank you for your continued support and dedication to excellence. I look forward to working with you to maintain our facilities at the highest standard.\n\nBest regards,\n\nDr. [Sender] \n[University/Institution] \n[Contact Information]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Scheduling Cleaning Services for My Shop\n\nHey ProCare Team,\n\nHope y'all are doing well. My name's Hank, and I run a small auto repair shop here in town. I've been hearing good things about your cleaning services and figured it's time to give y'all a shout.\n\nMy shop's been getting a bit too dusty and greasy for my liking, and I reckon it's high time for a proper clean-up. I'm looking to set up a regular cleaning schedule\u2014maybe something weekly or bi-weekly. I want to make sure the place stays spick and span, especially the waiting area where my customers hang out.\n\nI haven't tried any other cleaning services yet, but I thought I'd start with the best. Could you let me know what my options are and how soon we can get this rolling? I'm not in a huge rush, but I'd like to get it sorted out sooner rather than later.\n\nThanks a bunch for your help. Looking forward to hearing from you.\n\nBest,\nHank\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Attention Required: Emergency Repair Needed\n\nHey ProCare Support Team,\n\nThis is [Sender], and I have to say, I'm not impressed. I've been using your services for a while now, and I expected better. Right now, I'm dealing with a major issue that needs your immediate attention.\n\nThe HVAC system in my building has completely failed, and it's causing a lot of problems. The temperature is unbearable, and it's affecting everyone here. This isn't just an inconvenience; it's a serious problem that needs to be fixed right away. I've tried resetting the system and checking the circuit breakers, but nothing has worked.\n\nI need your team to come out and fix this immediately. This kind of failure is unacceptable, and I expect a prompt response. If this isn't resolved quickly, I might have to reconsider using your services in the future.\n\nLooking forward to your swift action.\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Immediate Attention Required for Sustainability Practices\n\nDear ProCare Support Team,\n\nI hope this message finds you well, though I must admit, I am quite frustrated as I write this. My name is [Sender], and I have been utilizing your services for my dairy farm's facility management for the past year. While I initially chose ProCare Facility Solutions for your reputed expertise and commitment to quality, recent experiences have left me questioning that decision.\n\nAs a dairy farmer who deeply values sustainable practices, I was particularly drawn to your promise of implementing best practices for energy efficiency and environmental impact reduction. However, I have noticed a significant lack of follow-through in this area. Despite multiple assurances, there has been no visible effort to incorporate eco-friendly solutions into the maintenance and cleaning services provided to my farm.\n\nI have already reached out to your team on two separate occasions to address this issue, but the responses have been unsatisfactory and vague at best. I was assured that someone would look into it, yet here we are, with no tangible progress or updates.\n\nI am requesting immediate and concrete action to rectify this situation. Specifically, I need a detailed plan outlining how ProCare intends to integrate sustainable practices into the services provided to my farm. This includes the use of eco-friendly cleaning products, energy-efficient maintenance solutions, and any other measures that align with your advertised commitment to sustainability.\n\nI trust that you will treat this matter with the urgency it deserves and provide a satisfactory resolution promptly. Failure to do so will force me to reconsider my association with ProCare Facility Solutions.\n\nLooking forward to your prompt response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Assistance Needed for Routine HVAC Maintenance at Residential Complex\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a single parent and police officer residing in one of the residential complexes managed by ProCare Facility Solutions. I have always appreciated the high level of service and attention to detail your team provides, which is why I am reaching out with confidence today.\n\nRecently, I have encountered an issue with the HVAC system in my apartment. The system has been malfunctioning intermittently, causing significant discomfort for my family, especially during these fluctuating weather conditions. Given my demanding job and the importance of maintaining a comfortable home environment for my children, I am seeking your assistance to address this matter promptly.\n\nI have already tried resetting the system and checked the thermostat settings, but the problem persists. I believe it may require a more thorough inspection and possibly some routine maintenance by your skilled team.\n\nCould you please arrange for a technician to visit and assess the situation at the earliest convenience? While this is not an immediate emergency, it is crucial for us to have a reliable HVAC system, especially considering the current weather patterns.\n\nThank you for your attention to this matter. I am confident that your team will handle this with the same professionalism and efficiency that I have come to expect from ProCare Facility Solutions.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Feedback on Recent Service and Minor Safety Concern\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a satisfied client of ProCare Facility Solutions for the past two years. Your team has consistently provided exceptional service, and I truly appreciate the dedication and professionalism you bring to maintaining my property.\n\nRecently, I noticed a minor issue that I believe warrants your attention. During the last routine maintenance visit, I observed that the emergency exit signs in the building's common areas were not as visible as they should be. While this is not an immediate concern, I think it\u2019s important to address it to ensure the continued safety and quality of our environment.\n\nI haven't taken any steps to resolve this myself, as I trust your expertise in handling such matters. Could you please arrange for someone to inspect and, if necessary, improve the visibility of these signs at your earliest convenience?\n\nThank you for your attention to this matter and for your ongoing commitment to excellence. I look forward to your prompt response and continued outstanding service.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Request for Comprehensive Plumbing Assessment\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been using your services for my home for quite some time now. I appreciate the quality of work your team consistently delivers.\n\nI am writing to bring to your attention a recurring issue with the plumbing system in my house. Given the age of the plumbing, I frequently encounter problems that require repairs. While I understand that older systems can be problematic, I am concerned about the long-term safety and reliability of the plumbing in my home.\n\nIn the past, I have had your team come out for repairs, and while the immediate issues were resolved, new problems seem to arise shortly after. I have not taken any additional steps beyond calling for repairs, as I trust your expertise in handling these matters.\n\nI would like to request a more comprehensive assessment of the plumbing system to identify any underlying issues that might be causing these frequent problems. A detailed inspection and a tailored maintenance plan would be greatly appreciated to ensure the safety and reliability of the plumbing in my home.\n\nThank you for your attention to this matter. I look forward to your prompt response and assistance.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent Attention Needed for HVAC Maintenance Issue\n\nDear ProCare Support Team,\n\nI hope this message finds you well, though I must admit, my current experience with your services has been far from satisfactory. My name is [Sender], and I have been a client of ProCare Facility Solutions for the past year, relying on your team to maintain my residential property. Unfortunately, I am compelled to reach out due to a persistent issue that has not been addressed adequately.\n\nFor the past two weeks, I have been experiencing significant problems with the HVAC system in my home. Despite following the recommended maintenance schedule and even reaching out to your team for a routine check-up, the issue remains unresolved. The system is not functioning correctly, leading to uncomfortable living conditions, which is particularly distressing given the current weather conditions.\n\nI have already contacted your support team twice, and while I appreciate the initial prompt response, the follow-up has been lacking. The technician who visited assured me that the problem was fixed, but it has since reoccurred, causing me considerable inconvenience and frustration.\n\nI am requesting immediate assistance to resolve this matter once and for all. It is disheartening to feel neglected, especially when I have placed my trust in your company to ensure my home remains a safe and comfortable environment. I urge you to prioritize this issue and provide a permanent solution at the earliest convenience.\n\nThank you for your attention to this matter. I look forward to a swift and effective resolution.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Urgent: Immediate Attention Required for Quality and Safety Concerns\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a product owner who has been relying on your facility management services for our commercial properties for the past year. Unfortunately, I am writing to express my dissatisfaction with the recent quality and safety standards observed at our facilities.\n\nOver the past few weeks, I have noticed a significant decline in the overall maintenance and cleanliness of our office spaces. Specifically, there have been recurring issues with the HVAC system, which has led to uncomfortable working conditions for our employees. Additionally, the cleaning services have not been up to the mark, with several areas being neglected and not meeting the expected hygiene standards.\n\nI have already reached out to your support team on a couple of occasions to address these concerns, but the responses have been slow and the issues remain unresolved. This lack of prompt action is quite disappointing, especially considering the premium we pay for your services.\n\nI am requesting an immediate and thorough review of the current maintenance and cleaning protocols in place at our facilities. It is crucial that these issues are addressed promptly to ensure a safe and efficient working environment for our team. I would appreciate it if you could escalate this matter to the appropriate department and provide a detailed plan of action to rectify these problems.\n\nThank you for your urgent attention to this matter. I look forward to your prompt response and a swift resolution to these concerns.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Urgent Assistance Needed for HVAC System\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I've been a loyal customer of ProCare Facility Solutions for a few years now. Your team has always done a fantastic job keeping my property in top shape, and I truly appreciate the dedication and expertise you bring to the table.\n\nI'm reaching out today because I'm facing an urgent issue with the HVAC system in my home. As a music enthusiast and vinyl collector, I spend a lot of time in my dedicated music room, and maintaining the right temperature and humidity levels is crucial for preserving my collection. Unfortunately, the HVAC system seems to have malfunctioned, and it's causing significant discomfort and potential risk to my vinyl records.\n\nI've tried resetting the system and checking the thermostat, but nothing seems to be working. Given the importance of this issue, I would greatly appreciate it if you could send someone over as soon as possible to diagnose and fix the problem. Your prompt assistance with this emergency repair would mean the world to me and help ensure that my cherished collection remains in pristine condition.\n\nThank you so much for your attention to this matter. I look forward to your swift response and resolution.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Your Eco-Friendly Practices\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a mother of a 10-year-old daughter who has recently started Irish dance. We live in a residential complex where your team provides cleaning and maintenance services.\n\nI am writing to inquire about the eco-friendly practices your company employs. As someone who is conscious about the environment and wants to set a good example for my daughter, I am keen to understand how your services align with sustainable practices. Specifically, I am interested in the types of cleaning products you use and any measures you take to reduce the carbon footprint of your operations.\n\nI have noticed that the cleaning staff is very diligent and thorough, which I appreciate. However, I would like to know more about the environmental impact of the products and methods used. Are there any certifications or standards that your company adheres to in this regard?\n\nI haven't taken any steps to address this concern previously, as I wanted to gather more information first. Your prompt response would be greatly appreciated, as it will help me make informed decisions about the services we use.\n\nThank you for your attention to this matter. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Attention Required for Urgent HVAC Repair\n\nDear ProCare Support Team,\n\nI hope this message finds you well, though I must admit I am quite frustrated as I write this. My name is [Sender], and I am the president of the local bar association. We have been utilizing your services for our office building for some time now, and I have generally been satisfied with the quality of your work. However, recent events have left me quite disappointed.\n\nWe are currently facing a significant issue with our HVAC system, which has been malfunctioning for the past two days. This is causing considerable discomfort for our staff and visitors, and it is unacceptable given the high standards we expect from ProCare Facility Solutions. The temperature in our offices has become unbearable, and this is severely impacting our daily operations.\n\nI have already attempted to reach out to your support team via phone and email, but I have yet to receive a satisfactory response or any indication that this issue is being addressed with the urgency it requires. Given the critical nature of our work and the importance of maintaining a conducive environment, this delay is simply not acceptable.\n\nI am requesting immediate assistance to resolve this HVAC issue. We need a technician on-site as soon as possible to diagnose and fix the problem. This matter cannot wait any longer, and I expect prompt action from your team.\n\nAdditionally, I would like to express my dissatisfaction with the lack of timely response to this urgent matter. It is crucial that such emergency repair needs are addressed swiftly to avoid further inconvenience.\n\nThank you for your immediate attention to this urgent matter. I look forward to a swift resolution.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for Theater Facility\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a theater producer who has been working closely with your team to ensure our facility remains in top condition. I have always admired the innovative methods your team employs, which have significantly contributed to the smooth operation of our workshops and classes.\n\nI am writing to request routine maintenance for our theater facility. Specifically, we have noticed that the HVAC system is not performing optimally, and there are minor plumbing issues in the restrooms that need attention. These issues are not urgent but do require timely intervention to prevent any disruption to our scheduled activities.\n\nWe have not taken any steps to address these issues internally, as we prefer to rely on your expertise to ensure everything is handled correctly and efficiently.\n\nCould you please arrange for a maintenance visit at your earliest convenience? We would appreciate it if the visit could be scheduled within the next week to ensure everything is in order before our next major event.\n\nThank you for your attention to this matter. We look forward to your prompt response and continued excellent service.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Minor Facility Management Issue\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been thoroughly enjoying the exceptional facility management services provided by ProCare Facility Solutions for our office building over the past year. Your team's dedication to maintaining a seamless and efficient environment has truly been commendable.\n\nI am writing to bring a minor issue to your attention regarding the coordination of space utilization in our office. While the overall management has been excellent, we have noticed a slight inconsistency in the allocation of meeting rooms, which occasionally leads to double bookings. This is not a pressing concern, but addressing it would certainly enhance our experience further.\n\nWe have tried to manage the bookings internally by adjusting our schedules and communicating with the team, but the issue persists intermittently. I believe a review of the current system or a minor adjustment could resolve this smoothly.\n\nCould you please look into this matter at your earliest convenience? Your expertise and prompt attention to even the smallest details have always been appreciated, and I am confident this will be no exception.\n\nThank you for your continued support and for making our work environment so pleasant.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a satisfied client of ProCare Facility Solutions for the past two years. Your team has always provided exceptional service, and I truly appreciate the dedication and professionalism you bring to maintaining our facility.\n\nRecently, I noticed a minor issue with our HVAC system. While it is still functioning, it seems to be making a slight noise that wasn't there before. It's not causing any immediate problems, but I thought it would be best to address it before it potentially becomes a bigger issue.\n\nI haven't taken any steps to resolve this on my own, as I trust your expertise in handling such matters. Could you please arrange for a technician to come by and take a look at the system at your earliest convenience? I understand this isn't an urgent matter, so scheduling it at a time that works best for your team would be perfectly fine.\n\nThank you for your attention to this matter. I look forward to your prompt response and continued excellent service.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Assistance Needed with Facility Management\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been using ProCare Facility Solutions for managing my home in Wisconsin. As a single parent going through a challenging divorce, I am striving to bring some tranquility and balance back into my life.\n\nRecently, I have noticed a few issues with the facility management services at my residence. Specifically, there seems to be a lack of coordination in space utilization and some inconsistencies in the implementation of energy efficiency practices. While these issues are not urgent, they are affecting the overall harmony and efficiency of my home environment.\n\nI haven't taken any specific steps to address these concerns yet, as I wanted to reach out to your team first for guidance. Could you please assist me in resolving these issues? I am looking for a more streamlined approach to space management and better adherence to energy-saving practices.\n\nThank you for your attention to this matter. I appreciate your support and look forward to your assistance in bringing back the balance and tranquility I seek.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Feedback on Recent Service Experience\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a public relations officer with the [Government Department]. We have been utilizing your facility management and maintenance services for our office building for the past year, and I must say, the experience has been largely positive.\n\nHowever, I wanted to share some feedback regarding a recent interaction that, while not urgent, I believe could help improve your already commendable services. We recently had a scheduled maintenance visit for our HVAC system, and while the technician was professional and thorough, the process seemed to involve a bit more paperwork and procedural steps than necessary. This has been a point of satirical critique within our department, as it mirrors the very bureaucracy we often get lampooned for.\n\nI understand that thoroughness is key to ensuring quality service, and I appreciate the attention to detail. However, streamlining some of these processes could enhance efficiency and reduce the time spent on administrative tasks. I have not taken any steps to address this internally, as I believe your team is best equipped to evaluate and implement any necessary changes.\n\nCould you please look into this and consider if there are ways to simplify the procedural aspects of your maintenance services? Your support in this matter would be greatly appreciated, and I am confident that any improvements will only add to the excellent service we have come to expect from ProCare Facility Solutions.\n\nThank you for your attention to this matter. I look forward to your response and continued collaboration.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Sustainability and Environmental Practices\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am part of the Human Resources department at [TARP Recipient Institution]. We have been utilizing your facility management services for our office building for some time now, and overall, we are quite satisfied with the quality and professionalism your team consistently delivers.\n\nI am reaching out to inquire about the sustainability and environmental practices that ProCare Facility Solutions implements as part of your service offerings. As an institution that places a high value on environmental responsibility, we are keen to understand more about the specific measures and initiatives your company undertakes to promote sustainability.\n\nCould you please provide detailed information on the eco-friendly products and practices you use, particularly in your cleaning services? Additionally, we are interested in learning about any energy efficiency programs or environmental impact reduction strategies you have in place for facility management and maintenance services.\n\nWe have not encountered any issues so far, but we are looking to ensure that our partnership aligns with our institution's sustainability goals. Any documentation or resources you could share would be greatly appreciated.\n\nThank you for your attention to this matter. I look forward to your response.\n\nBest regards,\n\n[Sender] \nHuman Resources Department \n[TARP Recipient Institution]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Hey ProCare Team,\n\nHope you\u2019re all doing well! My name\u2019s Jake, and I\u2019ve been using your services for a while now. Gotta say, you guys have been doing a stellar job keeping my place in top shape. I never thought I\u2019d be the type to care about this stuff, but here we are.\n\nSo, I\u2019ve got a bit of a situation. My sister and I have been spending more time at home lately, and we\u2019ve turned one of the rooms into a mini-library. It\u2019s been great, but I\u2019ve noticed the air quality in there isn\u2019t the best. I\u2019m guessing it\u2019s something to do with the HVAC system. It\u2019s not a huge deal, but it\u2019s definitely something I\u2019d like to get sorted out sooner rather than later.\n\nI haven\u2019t tried fixing it myself because, let\u2019s be honest, I\u2019d probably make it worse. I did check the filters, and they seem fine, but beyond that, I\u2019m out of my depth. Could you guys send someone over to take a look and maybe give the system a bit of a tune-up?\n\nThanks a ton for your help. Looking forward to hearing back from you soon.\n\nBest,\nJake"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Scheduling Cleaning Services for My Studio\n\nHi ProCare Support Team,\n\nI hope this message finds you well! My name is [Sender], and I\u2019m a concept artist who has been enjoying the pristine environment your team helps maintain. Your services have been a game-changer for my creative space, and I truly appreciate the dedication and professionalism you bring to the table.\n\nI\u2019m reaching out to discuss scheduling the next round of cleaning services for my studio. The space has been a whirlwind of creativity lately, and while it\u2019s not urgent, I\u2019d love to get a date on the calendar for a thorough cleaning. Your team\u2019s attention to detail always leaves my workspace feeling fresh and inspiring, which is crucial for my work.\n\nI haven\u2019t taken any steps yet to schedule this, as I wanted to touch base with you first to see what dates might be available. Ideally, I\u2019m looking for a slot sometime in the next couple of weeks, but I\u2019m flexible and happy to work around your schedule.\n\nCould you please assist me in setting up a convenient time for the cleaning? I\u2019m looking forward to continuing our collaboration and keeping my studio in top shape.\n\nThank you so much for your help!\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Assistance Needed for Facility Management Training\n\nHi ProCare Support Team,\n\nHope you're all doing well! My name is Alex, and I've recently started managing a residential complex here in the city. I've been really impressed with the quality of your services and the positive impact they've had on our property.\n\nAs someone who's more familiar with the fast-paced world of motorbike racing, I'm still getting the hang of facility management. I\u2019ve been particularly interested in your training programs and would love to get some guidance on best practices for managing our facility more efficiently.\n\nI've gone through some of the basic materials available on your website, but I feel like I could benefit from a more structured training session. Could you please provide me with more information on the available training programs and how I can enroll? Also, any tips on developing an in-house maintenance team would be greatly appreciated.\n\nLooking forward to your response and thank you in advance for your help!\n\nBest regards,\nAlex"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Facility Management Services\n\nDear ProCare Facility Solutions Support Team,\n\nGreetings and blessings to you all. My name is Reverend Johnathan Smith, and I am the head pastor at Grace Community Church. We have been blessed to work with your esteemed company for the past year, and I must say, your services have been a godsend in maintaining our church facilities.\n\nI am writing to inquire about your facility management services, particularly in the context of our church's needs. We are looking to ensure that our environment remains not only clean and efficient but also a sanctuary where our congregation can gather in peace and safety. Your commitment to quality and sustainability aligns perfectly with our values, and we are eager to explore how we can further enhance our facility management practices.\n\nWhile we have been very satisfied with the routine maintenance and cleaning services provided, we are now considering a more comprehensive oversight of our facility operations. Specifically, we are interested in learning more about your space utilization and energy efficiency strategies. We believe that with your expertise, we can create an even more welcoming and sustainable environment for our community.\n\nWe have not yet taken any steps towards this new initiative, as we wanted to first seek your guidance and recommendations. Your support and advice have always been invaluable to us, and we trust that you will provide the best solutions tailored to our needs.\n\nCould you please provide us with more information on your facility management services and how we can integrate them into our current setup? Additionally, we would appreciate any insights on the best practices for energy efficiency and environmental impact reduction that you could share with us.\n\nThank you for your continued support and dedication to excellence. We look forward to your response and to further strengthening our partnership with ProCare Facility Solutions.\n\nBlessings,\n\nReverend Johnathan Smith\nGrace Community Church"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About Facility Management Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am reaching out to you with some questions about your facility management services. I recently came across your company and am very interested in the comprehensive solutions you offer for both residential and commercial properties.\n\nI am currently in the process of managing a small residential complex and am exploring options to improve our facility management and maintenance routines. Your services, particularly the routine and preventative maintenance for building systems, caught my attention. However, as someone who is relatively new to this field, I find myself a bit overwhelmed and unsure about where to start.\n\nCould you please provide more detailed information on how your facility management services work, especially for someone like me who is just getting started? Additionally, I would appreciate any guidance or recommendations you might have for a novice in this area. \n\nI am also interested in learning more about your training programs and support for developing in-house maintenance teams. Any information on how to enroll in these programs would be greatly appreciated.\n\nI have not taken any specific steps yet, as I wanted to gather more information before making any decisions. Your expertise and advice would be incredibly valuable to me at this stage.\n\nThank you very much for your time and assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry on Enhancing Sustainability Practices\n\nHi ProCare Support Team,\n\nI hope this message finds you well! My name is [Sender], and I\u2019m an entrepreneur working on some exciting projects in the entertainment industry. I\u2019ve been really impressed with the comprehensive services ProCare Facility Solutions offers, especially your commitment to sustainability and environmental practices.\n\nAs someone who is passionate about creating open-source platforms that revolutionize our industry, I\u2019m always on the lookout for ways to integrate more sustainable practices into our operations. I\u2019m particularly interested in how ProCare can help us enhance our environmental impact reduction efforts and energy efficiency.\n\nI\u2019ve been exploring various options and have already implemented some basic eco-friendly measures, but I believe there\u2019s a lot more we can do. I\u2019d love to hear more about the specific strategies and technologies you recommend for a business like ours. Additionally, any insights on how we can better coordinate our sustainability efforts would be incredibly valuable.\n\nCould you please provide more details on your sustainability services and perhaps suggest a tailored plan that aligns with our goals? I\u2019m eager to collaborate and take our environmental practices to the next level.\n\nThank you so much for your time and assistance. I\u2019m looking forward to your response and working together to create a greener future.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been using ProCare Facility Solutions for the maintenance of my design studio for the past year. Your services have always been top-notch, and I truly appreciate the peace of mind that comes with knowing my workspace is in good hands.\n\nI\u2019m writing to request a routine maintenance check for the HVAC system in my studio. It\u2019s been a while since the last inspection, and I want to ensure everything is running smoothly, especially with the change in seasons. There\u2019s no immediate issue, but I believe in staying ahead of potential problems.\n\nI haven\u2019t taken any steps yet, as I trust your team\u2019s expertise to handle this efficiently. Could you please schedule a visit at your earliest convenience? I\u2019m flexible with timing, so any slot that works for your team should be fine.\n\nThank you for your attention to this matter. Looking forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Eco-Friendly Cleaning Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a government official currently working on initiatives to promote the use of eco-friendly products, particularly in the realm of cleaning services. I have recently come across your company and am impressed by your commitment to sustainability and the use of eco-friendly cleaning products.\n\nI am reaching out to inquire about the scheduling of your specialized cleaning services that utilize eco-friendly dyes and products. As part of our regulatory efforts, we are looking to partner with organizations that can provide exemplary services while adhering to environmentally friendly practices.\n\nCould you please provide me with more information on how we can schedule these services for a few government buildings we are looking to maintain? Additionally, I would appreciate any details on the frequency and flexibility of your cleaning schedules, as well as any specific protocols you follow to ensure the use of eco-friendly products.\n\nI have not taken any prior steps regarding this matter, as I wanted to first understand the options available through your esteemed company. Your assistance in this regard would be greatly appreciated.\n\nThank you for your time and attention. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent Request for Specialized Cleaning Services\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I manage a bustling bar in the heart of the city. We've been relying on ProCare Facility Solutions for our regular cleaning needs for quite some time now, and I must say, your team has always done a commendable job.\n\nHowever, I'm reaching out today with an urgent request. Last night, we hosted a large event, and despite our best efforts, the place is in dire need of a deep clean. The carpets are stained, the windows are smudged, and there's an overall need for a thorough, specialized cleaning to get everything back to its pristine condition.\n\nGiven the high traffic and the nature of our business, it's crucial that we address this immediately to maintain our standards and ensure a welcoming environment for our patrons. I've already tried to handle some of the cleaning myself, but it's clear that we need professional intervention to get the job done right.\n\nCould you please arrange for a specialized cleaning team to come in as soon as possible? We need this taken care of urgently to avoid any disruption to our operations. Your prompt assistance would be greatly appreciated.\n\nThank you for your attention to this matter. I look forward to your swift response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Frustration with Specialized Cleaning Services\n\nHi [Receiver],\n\nI hope this message finds you well, though I must admit I'm not in the best of moods as I write this. My name is [Sender], and I've been working with ProCare Facility Solutions for a while now, primarily utilizing your specialized cleaning services for our office space.\n\nLately, I've been grappling with a dilemma regarding the balance between open-source and proprietary software for my projects, and it's been quite a headache. However, what\u2019s adding to my frustration is the inconsistency in the cleaning services we've been receiving. Despite having a set schedule, there have been multiple instances where the quality of cleaning has noticeably declined. This is particularly concerning given the importance of maintaining a pristine environment for our team.\n\nI've tried addressing this issue by speaking with your on-site staff, but the results have been less than satisfactory. It's disheartening to see that despite these efforts, the problem persists.\n\nI would appreciate it if you could look into this matter and provide a more reliable solution. Perhaps a review of the current cleaning protocols or a reassessment of the team assigned to our facility could help. I\u2019m really hoping for a resolution that ensures consistent and high-quality cleaning services moving forward.\n\nThank you for your attention to this matter. I look forward to your prompt response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Hey ProCare Support Team,\n\nHope you're all doing well and not buried under a mountain of facility management queries! My name's Alex, and I've been a happy camper with ProCare Facility Solutions for a while now. You guys have been the unsung heroes keeping my office space spick and span, and I can't thank you enough for that.\n\nSo, here's the deal: I've got a bit of a head-scratcher for you. We're looking to ramp up our sustainability efforts in the office, and I was wondering if you could shed some light on the best practices for energy efficiency and environmental impact reduction. I know you folks are the wizards of eco-friendly solutions, and I could really use some of that magic right now.\n\nI've poked around your website and read through some of the materials you have, but I think I need a bit more guidance to get things rolling. Maybe a checklist or a step-by-step guide? Anything that can help us make our office greener without turning it into a jungle (though a few more plants wouldn't hurt!).\n\nLooking forward to your expert advice and maybe a few laughs along the way. Thanks a ton in advance!\n\nBest,\nAlex"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About ProCare Facility Solutions Services\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I recently retired after a fulfilling career in the entertainment industry, where I had the pleasure of shaping PR strategies for some of the most renowned companies. I have always appreciated the importance of a well-maintained environment, both in professional and personal settings.\n\nI am reaching out to you with a few inquiries regarding the comprehensive services offered by ProCare Facility Solutions. Having heard commendable things about your expertise and commitment to quality, I am considering engaging your services for a residential property I own. Specifically, I am interested in learning more about your facility management and maintenance services, as well as the training programs you offer for in-house staff.\n\nTo provide some context, I have a luxury apartment complex that requires meticulous upkeep and efficient management. While I have a basic understanding of the services you provide, I would appreciate more detailed information on how your customized maintenance plans and eco-friendly cleaning practices could benefit my property. Additionally, I am keen to understand the scope and structure of your training programs, as I believe in empowering my team with the best practices in facility management.\n\nI have not yet taken any steps towards engaging a facility management service, as I wanted to ensure I gather all necessary information before making a decision. Your prompt and detailed response would be greatly appreciated, as it will help me make an informed choice.\n\nThank you for your time and assistance. I look forward to hearing from you soon and potentially working together to maintain a pristine and efficient environment for my residents.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Request for Facility Review and Maintenance\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am the administrator at [School Name], where we have been utilizing ProCare Facility Solutions for our facility management and maintenance needs. We have always appreciated the high standards of service your team provides, which aligns with our commitment to ensuring a safe and conducive learning environment for our students.\n\nRecently, we have encountered some issues that I believe need your attention. Specifically, there have been several instances where the quality and safety of our facilities have not met the expected standards. For example, we have noticed that the HVAC system in the main building has been inconsistent, leading to uncomfortable temperatures in classrooms. Additionally, there have been a few minor plumbing issues that, while not urgent, could potentially escalate if not addressed promptly.\n\nWe have taken some initial steps to mitigate these issues, such as adjusting the HVAC settings and performing basic plumbing checks. However, these measures have only provided temporary relief, and we believe a more thorough inspection and maintenance are required to ensure long-term solutions.\n\nGiven the importance of maintaining a safe and comfortable environment for our students and staff, we kindly request that your team conduct a comprehensive review of our facility's systems. We would appreciate it if you could schedule a visit within the next week to address these concerns.\n\nThank you for your attention to this matter. We look forward to your prompt response and continued support in maintaining the high standards we have come to expect from ProCare Facility Solutions.\n\nBest regards,\n\n[Sender] \n[School Name] \n[Contact Information]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry About Facility Management Services for Residential Property\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a home healthcare nurse providing dedicated support to elderly expats in Spain. I have recently come across your company and am interested in learning more about your facility management services, particularly for residential properties.\n\nAs part of my role, I often assist my clients with various aspects of their daily lives, including ensuring their living environments are safe and well-maintained. I believe that your comprehensive facility management and maintenance services could greatly benefit the elderly individuals I care for, helping to create a more comfortable and secure living space for them.\n\nCould you please provide me with more information about your residential facility management services? Specifically, I am interested in understanding how your customized maintenance plans work and what kind of support you offer for routine and preventative maintenance.\n\nI have not yet taken any steps to engage your services, as I wanted to gather more information first. Your prompt response would be greatly appreciated, as I am looking to make an informed decision on behalf of my clients.\n\nThank you for your time and assistance. I look forward to hearing from you soon.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Attention Required for Specialized Cleaning Service Issue\n\nHi ProCare Support Team,\n\nI hope this message finds you well, though I must admit, I'm not in the best of spirits as I write this. My name is [Sender], and I've been a loyal customer of ProCare Facility Solutions for quite some time now. I've always appreciated your commitment to quality and sustainability, but my recent experience has left me feeling quite disheartened.\n\nI recently scheduled a specialized cleaning service for my property, which was supposed to include deep cleaning and carpet maintenance. However, the service I received was far from satisfactory. The carpets were still stained, and the overall cleanliness of the space was not up to the high standards I have come to expect from ProCare. This is particularly frustrating given the urgency of the situation; I have an important event coming up, and I trusted your team to ensure everything would be spotless.\n\nI've already tried reaching out via phone and email, but I haven't received a response yet. This lack of communication is adding to my frustration, and I need this issue resolved immediately. I am requesting an urgent follow-up and a re-scheduling of the specialized cleaning service to rectify the situation. I expect this to be done at no additional cost, given the inconvenience and the subpar service initially provided.\n\nPlease get back to me as soon as possible to confirm the new appointment and ensure that this time, the service meets the high standards ProCare is known for.\n\nThank you for your prompt attention to this matter.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Urgent: Quality and Safety Concerns at Commercial Property\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been overseeing the forum discussions related to facility management and maintenance for quite some time. I have always appreciated the comprehensive services that ProCare Facility Solutions offers, particularly your commitment to quality and sustainability.\n\nHowever, I have recently encountered some serious concerns regarding the quality and safety standards of the cleaning services provided at one of our commercial properties. Specifically, there have been multiple reports from our staff about inconsistent cleaning practices and potential safety hazards, such as improperly stored cleaning supplies and inadequate signage during maintenance activities.\n\nTo address these issues, I have already conducted a preliminary review and spoken with the on-site cleaning team to understand their procedures better. Despite these efforts, the concerns persist, and I believe a more thorough investigation and immediate intervention from your end are necessary.\n\nI would appreciate it if you could look into this matter urgently and provide guidance on how we can ensure that the quality and safety standards are consistently met. Additionally, any recommendations for immediate corrective actions would be highly valuable.\n\nThank you for your prompt attention to this matter. I look forward to your swift response and assistance in resolving these critical concerns.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Embracing Sustainability Together \ud83c\udf3f\n\nDear ProCare Support Team,\n\nI hope this message finds you well and thriving! My name is [Sender], and I\u2019ve been a delighted client of ProCare Facility Solutions for the past year. As a novelist who spends countless hours crafting tales of love and passion, I deeply appreciate the serene and pristine environment your services provide. It\u2019s like you\u2019ve created the perfect backdrop for my stories to come to life!\n\nRecently, I\u2019ve been reflecting on the importance of sustainability and how it aligns with the values I hold dear. I\u2019m a firm believer in soulmates, and I think our planet is the ultimate soulmate we must cherish and protect. I\u2019ve noticed that ProCare already incorporates eco-friendly cleaning products and practices, which is fantastic! However, I\u2019m curious to learn more about the specific measures you\u2019re taking to further enhance sustainability and reduce environmental impact.\n\nCould you please provide more details on your current sustainability initiatives and any future plans you might have in this area? Additionally, I\u2019d love to know if there are any ways I can contribute or support these efforts as a client.\n\nThank you so much for your time and dedication. I\u2019m looking forward to continuing this beautiful partnership and doing our part to make the world a better place, one clean and efficient facility at a time.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent HVAC System Repair Needed\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am the curator at [Museum Name]. We have been utilizing ProCare Facility Solutions for our maintenance needs for the past year, and I have always appreciated the professionalism and quality of your services.\n\nI am writing to inform you of an urgent issue we are currently facing with our HVAC system. Over the past few days, we have noticed irregularities in the temperature control within our exhibit halls. This is particularly concerning as we have several sensitive classical art pieces that require a stable climate to ensure their preservation.\n\nWe have attempted to adjust the settings manually and have conducted a basic inspection of the system, but the problem persists. Given the importance of maintaining an optimal environment for our collections, I would appreciate it if you could send a technician to address this issue immediately.\n\nThank you for your prompt attention to this matter. I look forward to your swift response and resolution.\n\nBest regards,\n\n[Sender] \n[Museum Name] \n[Contact Information]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Immediate Attention Required for HVAC Emergency\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a resident of [Residential Complex Name] in Maine for the past five years. I have generally been satisfied with the services provided by ProCare Facility Solutions, but I am writing to express a concern that requires your immediate attention.\n\nOver the past week, I have noticed a significant issue with the HVAC system in my apartment. Despite setting the thermostat to a comfortable temperature, the system fails to maintain the desired climate, leading to considerable discomfort. Given the current weather conditions, this is not just an inconvenience but a pressing matter that needs to be addressed promptly.\n\nI have already attempted to troubleshoot the problem by resetting the thermostat and checking the air filters, but these efforts have not resolved the issue. I also reached out to your customer service line two days ago and was assured that a technician would be dispatched, but I have yet to see any action taken.\n\nI am requesting that a qualified technician be sent to my residence as soon as possible to diagnose and fix the HVAC system. This matter is urgent, and I would appreciate a swift resolution to avoid further discomfort.\n\nAdditionally, I would like to provide feedback on the delay in response to my initial request. Timely service is crucial, especially for urgent maintenance issues, and I hope this can be improved in the future.\n\nThank you for your prompt attention to this matter. I look forward to your immediate response and resolution.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Urgent Concerns Regarding Sustainability Practices\n\nDear ProCare Support Team,\n\nI hope this message finds you well, though I must admit, my current sentiment is far from positive. My name is [Sender], and I have been utilizing your services for my residential property for the past year. As someone who deeply values the intricate layers of environmental consciousness, much like the conceptual depth found in Megan Cutler's novels, I am disheartened by recent observations regarding your sustainability practices.\n\nDespite your claims of prioritizing environmentally friendly methods, I have noticed several inconsistencies that suggest otherwise. For instance, the cleaning products used in my home do not appear to be eco-friendly, as they emit strong chemical odors and lack any certification labels. Additionally, the waste management practices seem haphazard, with recyclables often mixed with general waste.\n\nI have attempted to address these issues by speaking with your on-site staff, but their responses have been dismissive at best. This lack of accountability is not only frustrating but also undermines the trust I placed in your company\u2019s commitment to sustainability.\n\nI am seeking immediate clarification and rectification of these practices. Specifically, I would like a detailed explanation of the eco-friendly products and methods you claim to use, as well as a revised waste management plan that aligns with sustainable practices.\n\nYour prompt attention to this matter would be greatly appreciated, as it is crucial for me to ensure that my living environment aligns with my values of environmental stewardship.\n\nThank you for your understanding and cooperation.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: A Quick Query from a Curious Customer\n\nHi ProCare Support Team,\n\nHope this email finds you well and not knee-deep in cleaning supplies or tangled in HVAC systems! My name is [Sender], and I\u2019ve been enjoying the sparkling services of ProCare Facility Solutions for a while now. You folks really know how to keep things shipshape!\n\nI\u2019ve got a bit of a head-scratcher for you. I\u2019m curious about the eco-friendly cleaning products you use. I\u2019ve been telling my friends about how green and clean my place is, and they\u2019re all ears. Could you provide a bit more detail on the types of products you use and any certifications they might have? I\u2019d love to pass on the good word and maybe even convert a few more eco-warriors to your cause.\n\nI haven\u2019t done much digging myself, apart from a quick glance at your website, which, by the way, is as spotless as my windows after your team\u2019s visit. So, I thought I\u2019d go straight to the source for the juicy details.\n\nLooking forward to your response, and keep up the fantastic work!\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Scheduling Deep Cleaning Services\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is Alex, and I've been using ProCare Facility Solutions for a while now to keep my office space in top shape. I must say, your services have been quite impressive so far.\n\nI'm reaching out today because I need to schedule a cleaning service for our office. We usually have a weekly cleaning routine, but I think it's time for a deep clean, especially with the change in seasons. The carpets could use some attention, and the windows haven't been washed in a while.\n\nI haven't taken any steps yet to schedule this, so I thought I'd start by contacting you directly. Could you please help me set up a time for this deep cleaning? Ideally, we'd like to have it done sometime next week, but we're flexible with the exact day and time.\n\nThanks in advance for your assistance. Looking forward to hearing from you soon.\n\nBest,\nAlex"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent HVAC Repair Needed\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a satisfied customer of ProCare Facility Solutions for the past two years. Your team has always provided exceptional service, and I truly appreciate the dedication and professionalism you bring to maintaining our residential complex.\n\nI am writing to you with a high-priority concern regarding our HVAC system. Over the past few days, we have noticed that the system is not functioning as efficiently as it should. The temperature regulation has become inconsistent, and there are unusual noises coming from the unit. Given the current weather conditions, this issue is causing significant discomfort for my family, especially for my young children.\n\nI have already checked the thermostat settings and ensured that the air filters are clean, but the problem persists. Given the urgency of the situation, I kindly request that a technician be dispatched as soon as possible to diagnose and repair the issue. Your prompt attention to this matter would be greatly appreciated, as it directly impacts the comfort and well-being of my family.\n\nThank you for your understanding and swift response. I look forward to hearing from you soon.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Seeking Guidance on Facility Management Training Programs\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a client of ProCare Facility Solutions for the past year, benefiting greatly from your exceptional maintenance and cleaning services. Your team's dedication to creating a pristine and efficient environment has allowed me to focus on my writing, which often delves into the intricate dance between human endeavors and the relentless march of technology.\n\nRecently, I have been contemplating the idea of developing an in-house maintenance team to better manage the unique needs of my historical property. The charm of my residence, with its vintage architecture and timeless elegance, requires a delicate touch that I believe could be best achieved through a dedicated team trained in the best practices of facility management.\n\nI am particularly interested in your comprehensive training programs and would love to learn more about how they can be tailored to suit the specific requirements of my property. Could you provide me with detailed information on the available training modules, schedules, and any prerequisites? Additionally, I would appreciate guidance on how to seamlessly integrate these practices into our current maintenance routine.\n\nIn preparation for this transition, I have already begun to outline the key areas that need attention and have identified a few potential team members who are eager to undergo training. However, I believe that your expertise and structured programs will be instrumental in ensuring that we achieve the highest standards of care and efficiency.\n\nThank you for your continued support and for helping me maintain a harmonious balance between the historical essence of my home and the modern conveniences that make life more comfortable. I look forward to your response and to embarking on this new journey with ProCare Facility Solutions.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Feedback on Recent Maintenance Service\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been utilizing your facility management and maintenance services for my residential property for the past year. Overall, I have been quite satisfied with the quality and professionalism of your team.\n\nHowever, I wanted to bring to your attention a recent issue I encountered with the maintenance service. Last week, I scheduled a routine HVAC maintenance check, but the technician arrived late and seemed somewhat rushed. While the job was completed, I noticed that the system is still making an unusual noise, which was not present before the maintenance.\n\nI have not taken any further steps to address this issue yet, as I wanted to first reach out to your support team for guidance. Could you please advise on the next steps to resolve this matter? I would appreciate it if a follow-up visit could be arranged to ensure that everything is functioning correctly.\n\nThank you for your attention to this matter. I look forward to your prompt response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Request for Training and Support on Facility Management Best Practices\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a first responder dedicated to educating the public on fire safety and prevention, particularly during firework displays. I have been utilizing ProCare Facility Solutions for our facility management needs and have been quite satisfied with the services provided thus far.\n\nI am reaching out to request some additional training and support on facility management best practices. Given the nature of my work, it is crucial that our facilities are maintained to the highest standards to ensure safety and efficiency. While I have a basic understanding of the necessary protocols, I believe that further training would be beneficial for both myself and my team.\n\nTo date, I have reviewed the materials available on your website and have implemented several of the recommended practices. However, I feel that a more comprehensive training program would greatly enhance our ability to manage our facilities effectively.\n\nCould you please provide information on any upcoming training sessions or support resources that we could access? Additionally, if there are any specific materials or guides that you recommend, I would appreciate your guidance.\n\nThank you for your attention to this matter. I look forward to your response and any assistance you can provide.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Assistance Required for HVAC System Failure\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am an editor at a popular entertainment magazine. We have been utilizing ProCare Facility Solutions for our office maintenance needs for the past year, and I must say, your services have always been top-notch.\n\nHowever, we are currently facing a critical issue that requires your immediate attention. Our HVAC system has completely failed, and with the summer heat, this has created an extremely uncomfortable working environment for our staff. Given the nature of our work, a comfortable and conducive environment is essential for productivity.\n\nWe have tried basic troubleshooting steps, such as resetting the system and checking the circuit breakers, but nothing seems to be working. This issue is beyond our in-house capabilities and needs professional intervention.\n\nCould you please dispatch a technician as soon as possible to address this urgent repair? We are in dire need of a swift resolution to ensure our operations can continue smoothly.\n\nThank you for your prompt attention to this matter. I look forward to your quick response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Request for Specialized Cleaning Services\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been a satisfied customer of ProCare Facility Solutions for the past year. Your team has always done a fantastic job maintaining our office space, and I truly appreciate the dedication and professionalism you bring to your work.\n\nRecently, we\u2019ve noticed that our carpets and windows could use some extra attention. While the regular cleaning schedule has been great, I believe a specialized deep cleaning would really help in maintaining the pristine environment we strive for. Given the importance of first impressions in our line of work, having spotless carpets and gleaming windows is crucial.\n\nI haven\u2019t taken any steps yet to address this, as I wanted to reach out to the experts first. Could you please assist us in scheduling a deep cleaning service at your earliest convenience? We\u2019re flexible with timing, but ideally, we\u2019d like to have this done within the next couple of weeks.\n\nThank you so much for your continued support and for always going above and beyond. Looking forward to hearing from you soon.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Hey [Receiver],\n\nHope this note finds you well. I'm reaching out to you from the lyrical side of life, where words flow like rivers and rhythms never miss a beat. Name's [Sender], and I've been vibing with ProCare Facility Solutions for a minute now, keeping my creative space spotless and serene.\n\nLately, I've been needing to sync up on a cleaning schedule. My studio's been seeing more action than usual, and it's time to get those deep cleans and window washes back on track. I know y'all got the skills to keep it pristine, just like the verses I pen.\n\nI haven't taken any steps yet, just been letting the dust settle, but it's time to get proactive. Could you help me set up a regular cleaning schedule? Maybe something weekly or bi-weekly, whatever fits best with your flow.\n\nLooking forward to hearing back and getting this sorted. Appreciate the help, as always.\n\nPeace and respect,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Facility Management Practices\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been utilizing your facility management services for my commercial property for the past year. While I appreciate the efforts your team puts into maintaining our space, I have some concerns that I would like to address.\n\nSpecifically, I am curious about the methodologies and practices your team employs in managing our facility. Given the increasing scrutiny on environmental sustainability and ethical business practices, I find it essential to understand how your services align with these principles. For instance, how do you ensure that the energy efficiency measures you implement are genuinely effective and not just superficial? Additionally, what steps are taken to guarantee that the materials and products used in maintenance and cleaning are ethically sourced and environmentally friendly?\n\nI have not encountered any immediate issues that require urgent attention, but I believe it is crucial to have a transparent understanding of these aspects to ensure that we are making informed decisions about our facility management. I have reviewed the information available on your website, but I would appreciate more detailed insights or documentation that can provide clarity on these points.\n\nCould you please provide me with a comprehensive overview of your facility management practices, particularly focusing on sustainability and ethical considerations? Any additional information or resources you can share would be greatly appreciated.\n\nThank you for your attention to this matter. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry on Eco-Friendly Practices\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a satisfied client of ProCare Facility Solutions for several years now. As a philologist, I have always appreciated the meticulous attention to detail and the commitment to excellence that your team brings to facility management and maintenance.\n\nI am writing to you today with a friendly query regarding your eco-friendly measures. As someone who values the preservation of our environment, I am keen to understand more about the specific sustainable practices ProCare employs in its cleaning and maintenance services. I have always admired the way your team seamlessly integrates environmental consciousness into your operations, and I am curious to learn more about the latest initiatives or technologies you might be using to further reduce environmental impact.\n\nWhile I have not encountered any pressing issues, I believe that staying informed about these practices can only enhance my appreciation for the services you provide. I have perused your website and found some information, but I would love to delve deeper into the specifics, especially any recent advancements or future plans you might have in this area.\n\nCould you kindly provide me with more detailed insights or direct me to any resources or contacts within your team who could assist me with this information? I am particularly interested in understanding how your sustainability efforts align with the latest industry standards and what unique approaches ProCare is taking to lead in this domain.\n\nThank you for your time and assistance. I look forward to your response and continuing our positive and productive relationship.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Action Required: Environmental Practices Falling Short\n\nHey ProCare Support Team,\n\nI hope this email finds you well, though I can't say the same for my current experience with your services. I'm Alex, a comedy podcaster who relies on a clean and efficient environment to keep the creative juices flowing. Unfortunately, things have taken a nosedive lately, and I'm not laughing.\n\nI've been a client for a while now, and I chose ProCare Facility Solutions because of your commitment to sustainability and eco-friendly practices. But lately, it feels like those promises are just empty words. The cleaning crew has been using products that smell like a chemical factory, and I've noticed a significant increase in waste and energy consumption around my studio. This is not what I signed up for, and it's definitely not helping my carbon footprint.\n\nI've tried addressing this with your team before, but the responses have been slow and unhelpful. I even provided specific feedback and requested a switch to more eco-friendly products, but nothing has changed. This is incredibly frustrating, and it's affecting my work environment and my peace of mind.\n\nI need immediate action on this. Please ensure that your team switches to the promised eco-friendly products and takes concrete steps to reduce waste and energy usage in my facility. This isn't just about keeping my studio clean; it's about staying true to the values you advertise.\n\nLooking forward to a swift resolution. Please don't make me regret choosing ProCare.\n\nBest,\nAlex"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Your Services\n\nDear ProCare Support Team,\n\nI hope this message finds you well, though I must admit, my enthusiasm is somewhat dampened. My name is Dr. Sheldon Cooper, and I have recently been contemplating the utilization of your facility management services for my residential property. However, I find myself in a bit of a quandary.\n\nDespite your claims of expertise and experience, I am skeptical about the actual efficacy of your services. The descriptions on your website are rather vague and lack the empirical data I would expect from a company purporting to be a leader in facility management. For instance, your energy efficiency practices\u2014what specific technologies and methodologies are you employing? Are there any peer-reviewed studies or data sets that validate your claims?\n\nI have perused your website and various promotional materials, but they seem to be more fluff than substance. I have not yet engaged your services, as I am hesitant to commit without a more rigorous understanding of what exactly you offer and how it aligns with my high standards for efficiency and sustainability.\n\nCould you provide me with detailed information, preferably in the form of technical documentation or case studies, that elucidates the specifics of your services? I am particularly interested in your maintenance plans and the eco-friendly cleaning products you use. A comprehensive breakdown of your methodologies would be greatly appreciated.\n\nThank you for your time and attention to this matter. I look forward to your prompt and detailed response, which I hope will assuage my concerns.\n\nBest regards,\n\nDr. Sheldon Cooper"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"negative\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Request for Training and Support\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am the Creative Director responsible for overseeing the overall image and branding of an influencer. We've been working with ProCare Facility Solutions for a while now, and I must say, your services have been nothing short of exceptional. The attention to detail and commitment to quality truly stand out.\n\nI'm reaching out today with a request for some additional training and support. As our team continues to grow, we are looking to develop an in-house maintenance team and cleaning staff. We believe that having a well-trained team will help us maintain the high standards we've come to expect from ProCare.\n\nWhile there is no immediate rush, we would love to get started on this as soon as it fits into your schedule. We haven't taken any steps yet, as we wanted to ensure we are aligned with your best practices from the get-go.\n\nCould you please provide us with information on the training programs you offer and how we can get started? Any guidance or resources you can share would be greatly appreciated.\n\nThank you for your continued support and for helping us maintain such a pristine environment. Looking forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Request for Specialized Cleaning Services\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is Dr. Emily Carter, and I have been a loyal client of ProCare Facility Solutions for the past three years. As a pediatrician who strongly believes in the importance of a clean and healthy environment for children, I have always appreciated the exceptional services your team provides.\n\nI am reaching out today with a request for specialized cleaning services at my pediatric clinic. We recently had a small renovation, and while the general cleaning has been taken care of, I believe a more thorough, specialized cleaning is necessary to ensure the clinic is in pristine condition for our young patients. Specifically, I am looking for deep cleaning of the carpets, window washing, and a detailed sanitization of all surfaces using eco-friendly products.\n\nIn the past, I have always been impressed with the quality and attention to detail your team brings to every task. I have already scheduled a routine cleaning, but I feel that the current situation requires a more focused approach to maintain the high standards we strive for in our clinic.\n\nCould you please assist me in arranging these specialized cleaning services at your earliest convenience? I understand that scheduling might take some time, but I am confident that your team will be able to accommodate our needs in a timely manner.\n\nThank you for your continued support and dedication to maintaining a healthy environment for our community. I look forward to hearing from you soon.\n\nWarm regards,\n\nDr. Emily Carter"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a satisfied client of ProCare Facility Solutions for the past two years. I am reaching out to request routine maintenance for the HVAC system in my residential property.\n\nAs an avid collector of Baccara memorabilia, I often host exchanges and gatherings in my home. It is crucial that the environment remains comfortable and well-maintained to ensure the preservation of my collection and the comfort of my guests. Recently, I have noticed that the HVAC system is not performing as efficiently as it used to, and I believe it is time for a routine check-up and maintenance.\n\nI have not taken any steps to address this issue myself, as I trust the expertise of your team to handle it professionally. Could you please schedule a maintenance visit at your earliest convenience? I would appreciate it if the visit could be arranged within the next week or two, as I have an upcoming event that I would like to prepare for.\n\nThank you for your attention to this matter. I look forward to your prompt response and the continued excellent service from ProCare Facility Solutions.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Sustainability and Energy Efficiency Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a climate scientist who has recently transitioned into a role that involves overseeing the sustainability efforts of our organization. I was a student of Professor Temi E. Ologunorisa, and his teachings have greatly influenced my career path and my current focus on environmental impact reduction.\n\nI am reaching out to inquire about your services, particularly those related to energy efficiency and sustainability. Our organization is looking to implement best practices in these areas, and I believe ProCare Facility Solutions could be a valuable partner in this endeavor.\n\nCould you provide more detailed information on how your team approaches energy efficiency and environmental impact reduction? Additionally, I would appreciate any case studies or examples of similar projects you have successfully managed.\n\nI have reviewed the information available on your website, but I would like to gain a deeper understanding of how your services can be customized to meet our specific needs. Any additional insights or resources you can share would be greatly appreciated.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a satisfied customer of ProCare Facility Solutions for the past few years. I am writing to request routine maintenance for the HVAC system in my residential property.\n\nAs a golf enthusiast, I spend a lot of time outdoors, but I also value a comfortable indoor environment when I return home. Lately, I've noticed that the HVAC system isn't performing as efficiently as it used to. The airflow seems weaker, and the temperature control is not as consistent. I believe it might be time for a routine check-up to ensure everything is running smoothly.\n\nI haven't taken any steps to address this issue yet, as I trust your team to handle it with the expertise and professionalism I've come to expect from ProCare. Could you please schedule a maintenance visit at your earliest convenience? I would appreciate it if the technician could also check the filters and any other components that might need attention.\n\nThank you for your assistance. I look forward to your prompt response and to having my HVAC system back in top shape.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Request for Routine Maintenance of HVAC System\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a representative from the Ministry of Finance. We have been utilizing your facility management services for our office building for the past year and have generally been satisfied with the level of service provided.\n\nHowever, I am writing to bring to your attention an issue we are currently facing with our HVAC system. Over the past few days, we have noticed irregularities in the system's performance, including inconsistent temperatures and unusual noises. This has caused some discomfort among our staff and has the potential to disrupt our daily operations if not addressed promptly.\n\nWe have attempted to troubleshoot the issue internally by checking the thermostat settings and ensuring that the air filters are clean, but these measures have not resolved the problem. Given the importance of maintaining a comfortable working environment, we would appreciate your assistance in diagnosing and repairing the HVAC system at your earliest convenience.\n\nCould you please arrange for a technician to visit our premises and assess the situation as part of our scheduled maintenance plan? We understand that this may not be an immediate emergency, but we would like to have the issue resolved as soon as possible to prevent any further inconvenience.\n\nThank you for your attention to this matter. We look forward to your prompt response and assistance.\n\nBest regards,\n\n[Sender] \nMinistry of Finance"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Immediate Attention Needed for Cleaning Services at Our Pub\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is Alex, and I manage The Tipsy Tavern, a popular pub in downtown. We've been relying on ProCare Facility Solutions for our cleaning services for the past year, and overall, we've been quite satisfied with the quality of your work.\n\nHowever, I need to bring a pressing issue to your attention. Since the pandemic, we've been extra cautious about maintaining a clean and safe environment for our patrons. Despite your team's regular cleaning schedule, we've noticed a persistent issue with lingering odors and a general lack of freshness in the air, especially during peak hours. This is becoming a significant concern for us, as it affects our customers' experience and could potentially impact our business.\n\nWe've tried increasing ventilation and even added some air purifiers, but the problem persists. Given the current situation, it's crucial for us to ensure that our pub not only looks clean but also feels and smells clean to our customers.\n\nCould you please arrange for an immediate deep cleaning session and possibly review our current cleaning plan? We need to address this issue urgently to maintain the high standards our patrons expect and deserve.\n\nThank you for your prompt attention to this matter. Looking forward to your swift response and a quick resolution.\n\nBest regards,\n\nAlex\nManager, The Tipsy Tavern"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Sustainability and Environmental Practices\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. Anil Shetty, and I am a professor specializing in Tulu language and script studies. I have been utilizing your facility management services for my residential property for the past year and have been quite satisfied with the quality and professionalism your team consistently demonstrates.\n\nI am writing to inquire about the sustainability and environmental practices implemented by ProCare Facility Solutions. As someone deeply invested in preserving cultural heritage, I am equally passionate about environmental conservation and sustainability. I would like to understand more about the specific measures your company takes to ensure eco-friendly practices, particularly in the areas of energy efficiency, waste management, and the use of sustainable materials.\n\nWhile I have noticed the use of eco-friendly cleaning products, I am keen to learn about any additional initiatives or programs you have in place to reduce the environmental impact of your operations. Additionally, I am interested in any opportunities for clients to participate in or support these sustainability efforts.\n\nI have reviewed the information available on your website but would appreciate more detailed insights or any relevant documentation you could provide. Your assistance in this matter would be greatly valued as I consider ways to further align my personal and professional life with sustainable practices.\n\nThank you for your attention to this inquiry. I look forward to your response and any guidance you can offer.\n\nBest regards,\n\nDr. Anil Shetty"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Help Needed with Special Cleanings!\n\nDear ProCare Support Team,\n\nHello! I am writing to you with a bit of a pickle. My name is Boris, and I am a happy customer of your ProCare Facility Solutions for my small office building. You guys do a great job, but now I have a special request that needs your magic touch.\n\nSo, here\u2019s the thing. We had a big party last week, and let\u2019s just say, the office now looks like a tornado had a dance-off with a hurricane. There are stains on the carpet that look like modern art, and the windows are so smudged, I can\u2019t tell if it\u2019s day or night outside. I tried to clean some of it myself, but I think I made it worse. The carpet now looks like a zebra, and the windows... well, let\u2019s not talk about the windows.\n\nI need your specialized cleaning services to come and rescue my poor office. I know you guys are the best at this, so I\u2019m not too worried, but I do need it done soon-ish. Not like yesterday, but maybe in the next few days? My boss is starting to give me the stink eye, and I don\u2019t think it\u2019s because of the smelly carpet.\n\nPlease let me know when you can send your cleaning wizards over. I\u2019ll make sure to stay out of their way and not touch anything this time. Thank you so much for your help!\n\nBest regards,\nBoris"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Assistance Needed for Routine Maintenance\n\nDear ProCare Support Team,\n\nGreetings to you all. My name is Jan van der Meer, a long-time resident of our quaint little town and a humble customer of your esteemed services. I hope this message finds you well.\n\nI am writing to bring to your attention a small issue that has cropped up in my home. It seems that the faucet in my kitchen has developed a minor leak. While it is not causing any immediate distress, I thought it best to inform you before it becomes a more significant problem.\n\nI have tried to tighten the faucet myself, but my old hands are not as steady as they used to be. I would greatly appreciate it if one of your skilled technicians could come by at their earliest convenience to take a look and fix it.\n\nThank you for your attention to this matter. I look forward to your prompt assistance.\n\nWarm regards,\n\nJan van der Meer"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent Cleaning Schedule Adjustment Needed\n\nHi [Receiver],\n\nI hope this message finds you well. My name is [Sender], and I manage several high-profile football players. I\u2019ve been using ProCare Facility Solutions for a while now, and I\u2019ve always appreciated the quality of your services.\n\nHowever, I\u2019m currently facing an issue that requires immediate attention. I need to adjust the cleaning schedule for one of my properties. The current schedule is not working out, and it\u2019s crucial that we make changes as soon as possible. The property in question is a luxury apartment where confidentiality is paramount, and the current cleaning times are causing some disruptions.\n\nI\u2019ve tried to resolve this by speaking with the on-site team, but we haven\u2019t been able to find a suitable solution. I need your support to rearrange the cleaning times to better fit the needs of the residents and ensure their privacy is maintained.\n\nCould you please assist me in rescheduling the cleaning services at the earliest? Your prompt attention to this matter would be greatly appreciated.\n\nThank you for your understanding and cooperation.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Maintenance Request for Dormitory Freezer\n\nHi ProCare Support Team,\n\nI hope this message finds you well! My name is Alex, and I'm a student living in one of the dormitories managed by your team. I just wanted to reach out and say how much I appreciate the excellent maintenance and cleaning services you provide. It really makes a difference in our daily lives.\n\nI wanted to bring a small issue to your attention. The chest freezer in our dormitory's common area seems to be malfunctioning. It's not a major problem, but it doesn't seem to be freezing items as effectively as it used to. I know it's not an urgent matter, but I thought it would be good to get it checked out before it becomes a bigger issue.\n\nI haven't taken any steps to fix it myself, as I don't have the expertise or tools to handle such repairs. I would really appreciate it if someone from your team could come by and take a look at it when convenient.\n\nThanks so much for your help and for all the great work you do!\n\nBest regards,\nAlex\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry About Facility Management Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a graduate student specializing in computational modeling. I am currently exploring various facility management solutions for a project that involves optimizing the maintenance and operational efficiency of residential and commercial properties.\n\nI have been researching your services and am particularly interested in your comprehensive facility management and maintenance offerings. However, I have a few questions regarding the customization of these services to fit specific project requirements, especially in terms of integrating advanced computational models for predictive maintenance and energy efficiency.\n\nCould you provide more detailed information on how your team collaborates with clients to tailor these services? Additionally, I would like to know if there are any case studies or examples of similar projects you have worked on that you could share.\n\nI have reviewed the information available on your website, but I believe a more detailed discussion would be beneficial. I am looking forward to your response and any additional insights you can provide.\n\nThank you for your time and assistance.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Service Quality and Safety\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a machine learning engineer currently working on developing algorithms for predicting economic trends. I have been utilizing ProCare Facility Solutions for the maintenance and cleaning services at our office building for the past year.\n\nI am writing to discuss a few observations related to the quality and safety standards of the services provided. While I understand that maintaining high standards consistently can be challenging, I have noticed some areas that might benefit from a review. Specifically, there have been occasional lapses in the thoroughness of the cleaning services, and I am concerned about the potential impact on the overall safety and hygiene of our workspace.\n\nTo address these concerns, I have already spoken with the on-site cleaning staff and provided feedback on the specific areas that need attention. However, I believe a more comprehensive review of the cleaning protocols and safety measures might be beneficial.\n\nCould you please assist in arranging a detailed inspection or review of the current practices? Additionally, any insights or recommendations on how we can ensure consistent quality and safety would be greatly appreciated.\n\nThank you for your attention to this matter. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry About Deep Cleaning Services\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am the Game Design Director at [Company Name]. We've been utilizing your facility management services for our office space, and I must say, the experience has been nothing short of excellent. Your team's dedication to maintaining a pristine environment has allowed us to focus on our creative projects without any distractions.\n\nI am reaching out to inquire about scheduling a deep cleaning session for our office, particularly focusing on areas that require more attention, such as carpets and windows. Given the nature of our work, it's crucial for us to maintain a clean and healthy environment, and I believe your eco-friendly cleaning products and practices align perfectly with our values.\n\nWhile this isn't an urgent request, we would like to schedule this cleaning in the coming weeks. Could you please provide more details on the available slots and any specific preparations we need to make beforehand?\n\nThank you for your continued support and excellent service. Looking forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About HVAC Maintenance Best Practices\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is Alex, and I'm a novice electrician currently learning the ropes of working with HVAC units. I've recently started gaining hands-on experience and have been exploring various aspects of facility maintenance.\n\nI wanted to reach out to you with a few general inquiries regarding best practices for maintaining HVAC systems. Given your expertise in facility management and maintenance, I believe your insights would be incredibly valuable to me as I continue to develop my skills.\n\nSo far, I've been following basic maintenance routines like checking filters and ensuring proper airflow, but I would love to know if there are any specific tips or advanced techniques that I should be aware of. Additionally, are there any common pitfalls or mistakes that I should avoid while working with HVAC units?\n\nI haven't encountered any major issues yet, but I want to make sure I'm on the right track and doing everything correctly from the start. Any guidance or resources you could provide would be greatly appreciated. Also, if there are any training programs or support resources available for someone in my position, I would be very interested in learning more about them.\n\nThank you for your time and assistance. I look forward to hearing from you soon.\n\nBest regards, \nAlex"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About Facility Management Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. Samuel Cohen, and I am a professor of Jewish history with a keen interest in the portrayal of Jewish culture and history in cinema. I have recently come across your company and am thoroughly impressed by the comprehensive range of services you offer, particularly in facility management and maintenance.\n\nI am reaching out with a general inquiry regarding your facility management services. As someone who values the importance of a well-maintained environment, I am curious to learn more about how your team ensures the seamless operation of residential properties, especially in terms of sustainability and energy efficiency. Your commitment to eco-friendly practices is particularly commendable and aligns with my own values.\n\nWhile I have not encountered any specific issues, I am interested in understanding the process and benefits of implementing your customized maintenance plans for a residential complex. Additionally, I would appreciate any information on the training programs you offer for developing in-house maintenance teams, as this could be highly beneficial for our community.\n\nThank you for your time and assistance. I look forward to your response and am excited about the possibility of collaborating with ProCare Facility Solutions to enhance the living environment in our residential complex.\n\nWarm regards,\n\nDr. Samuel Cohen"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Assistance Required for Facility Management Issue\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. Emily Hart, and I have been a client of ProCare Facility Solutions for the past two years, utilizing your comprehensive facility management services for my family therapy practice.\n\nI am writing to bring to your attention an issue we have been experiencing with the management of our office space. Specifically, there seems to be a recurring problem with the coordination of space utilization, which has been causing some disruptions to our daily operations. While I deeply respect the expertise and experience your team brings to the table, I believe that addressing this issue promptly will help us maintain a smooth and efficient working environment.\n\nTo provide some context, we have noticed that the allocation of rooms for therapy sessions has been inconsistent, leading to double bookings and confusion among staff and clients. We have tried to manage this internally by adjusting our schedules and communicating with your on-site team, but the problem persists.\n\nGiven the importance of a well-organized space for the therapeutic process, I kindly request your assistance in resolving this matter. Perhaps a review of the current space utilization plan and the implementation of a more streamlined system could be beneficial. Your guidance and support in this regard would be greatly appreciated.\n\nThank you for your attention to this matter. I look forward to your prompt response and a resolution that will allow us to continue providing the best possible care to our clients.\n\nWarm regards,\n\nDr. Emily Hart\nFamily Therapist"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry on Sustainability Practices\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], a mime artist who has had the privilege of performing on stages around the world. I have recently engaged your services for the maintenance and cleaning of my studio and residence.\n\nI am writing to inquire about the sustainability and environmental practices that ProCare Facility Solutions employs. As someone who deeply values the preservation of our environment, I am keen to understand how your services align with eco-friendly principles. Specifically, I am interested in the types of eco-friendly products you use and any measures you take to reduce the carbon footprint of your operations.\n\nWhile I have been satisfied with the quality of your services thus far, I believe it is crucial to ensure that the practices employed are in harmony with my commitment to environmental sustainability. I have not yet taken any steps to address this concern, as I wanted to first gather detailed information from your team.\n\nCould you please provide me with a comprehensive overview of your sustainability initiatives and any certifications or standards you adhere to? Additionally, I would appreciate any recommendations on how I can further enhance the eco-friendliness of my own space with your assistance.\n\nThank you for your attention to this matter. I look forward to your prompt and detailed response.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Scheduling Cleaning Services for My Home\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is Alex, and I\u2019m a high school student currently living in a residential complex that uses your services. I\u2019ve heard great things about ProCare Facility Solutions from my neighbors and have seen firsthand the excellent work your team does.\n\nI\u2019m reaching out because I need to schedule a cleaning service for my home. With school and college applications taking up most of my time, I haven\u2019t been able to keep up with the cleaning as much as I\u2019d like. I\u2019m looking for a regular cleaning schedule, preferably weekly, to help maintain a clean and healthy environment.\n\nI haven\u2019t taken any steps yet to resolve this, as I wanted to get in touch with you directly to understand the best options available. Could you please guide me on how to set up a cleaning schedule and what the next steps would be?\n\nThank you for your assistance. I look forward to hearing from you soon.\n\nBest regards,\nAlex"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Attention Required for Facility Management Issues\n\nHey ProCare Support Team,\n\nI'm really frustrated right now and need your help ASAP. My name is [Sender], and I've been using your facility management services for my office building for the past year. Usually, things run smoothly, but right now, it's a complete mess.\n\nThe HVAC system has been acting up for the past week, and it's unbearable. The temperature is all over the place, and it's making it impossible for my team to work efficiently. On top of that, the security system has been glitching, and we had a false alarm last night that woke up the entire neighborhood. This is unacceptable, and it's causing a lot of stress and disruption.\n\nI've already tried reaching out to your emergency repair line, but I haven't received any response. I even tried resetting the HVAC system myself, but it didn't help. This needs to be fixed immediately. I can't afford to have my team working in these conditions any longer.\n\nPlease send someone over right away to address these issues. I need this resolved today, not tomorrow or next week. This is seriously impacting our productivity and security, and I expect a prompt response.\n\nThanks,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Ol\u00e1 equipe de suporte da ProCare Facility Solutions,\n\nEspero que estejam bem! Meu nome \u00e9 [Sender] e sou um jovem empreendedor apaixonado por tecnologia blockchain. Recentemente, comecei a desenvolver minha pr\u00f3pria startup e estou muito animado com as possibilidades que essa jornada pode trazer.\n\nEstou escrevendo para solicitar orienta\u00e7\u00e3o e conselhos sobre como posso implementar as melhores pr\u00e1ticas de gest\u00e3o de instala\u00e7\u00f5es na minha empresa. Sei que a ProCare Facility Solutions \u00e9 refer\u00eancia no setor e acredito que a expertise de voc\u00eas pode ser extremamente valiosa para o crescimento e sucesso da minha startup.\n\nAt\u00e9 agora, tenho pesquisado bastante sobre o assunto e at\u00e9 participei de alguns webinars, mas sinto que preciso de uma orienta\u00e7\u00e3o mais direcionada e pr\u00e1tica. Gostaria de saber se voc\u00eas oferecem algum tipo de programa de treinamento ou suporte espec\u00edfico para startups como a minha, que est\u00e3o come\u00e7ando a estruturar suas opera\u00e7\u00f5es.\n\nAgrade\u00e7o desde j\u00e1 pela aten\u00e7\u00e3o e estou ansioso para aprender com a equipe de especialistas da ProCare. Tenho certeza de que, com a ajuda de voc\u00eas, poderei criar um ambiente de trabalho eficiente e sustent\u00e1vel, alinhado com as melhores pr\u00e1ticas do mercado.\n\nAguardo um retorno e agrade\u00e7o novamente pela disponibilidade.\n\nAtenciosamente,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Request for Specialized Cleaning Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am the director of a nonprofit organization dedicated to raising awareness about the psychological impact of hoarding. We have recently encountered a situation that requires specialized cleaning services, and I am reaching out to seek your assistance.\n\nWe are currently working with a client whose living conditions have deteriorated significantly due to hoarding. The environment poses serious health and safety risks, and we believe that a thorough, professional cleaning is essential to help them regain a livable space. Given the sensitive nature of this situation, we are looking for a team that can handle the task with care and discretion.\n\nWe have not yet taken any steps to address the cleaning needs, as we wanted to consult with experts who have experience in handling such cases. We are aware of your reputation for providing top-notch cleaning services and using eco-friendly products, which aligns with our values and the needs of our client.\n\nCould you please provide us with more information on how we can proceed with scheduling a specialized cleaning service? Additionally, any advice or recommendations you have for preparing the space beforehand would be greatly appreciated.\n\nThank you for your time and assistance. We look forward to your prompt response.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent: Immediate Assistance Required for HVAC Maintenance\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I've been a satisfied customer of ProCare Facility Solutions for the past year. Your team has always done a stellar job maintaining my property, and I truly appreciate the high standards you uphold.\n\nHowever, I\u2019m reaching out today with a bit of urgency. My HVAC system, which your team routinely services, has started making some unusual noises and isn\u2019t performing as efficiently as it usually does. Given the importance of a well-functioning HVAC system, especially with the colder months approaching, I need this addressed as soon as possible.\n\nI\u2019ve already checked the basic troubleshooting steps provided in your maintenance guide, but the issue persists. I\u2019m confident in your team\u2019s expertise and would greatly appreciate it if you could send someone over at the earliest convenience to take a look and perform any necessary maintenance.\n\nThank you for your prompt attention to this matter. I look forward to your swift response and continued excellent service.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Adjusting Bi-Weekly Cleaning Schedule for My Office\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. Alex Turner, and I have been utilizing your services for my office space for the past year. I must say, your team's dedication to maintaining a pristine environment has been commendable and greatly appreciated.\n\nI am reaching out to discuss the scheduling of our regular cleaning services. While I find the logistical challenges of coordinating these services intellectually stimulating, I believe we could optimize the current schedule to better suit the needs of my team and our workflow. Specifically, I would like to explore the possibility of adjusting our cleaning schedule to a bi-weekly arrangement, ideally on Tuesdays and Fridays, to ensure our workspace remains consistently clean without disrupting our research activities.\n\nPreviously, I have attempted to adjust the schedule through the online portal, but I encountered some difficulties in finalizing the changes. I would appreciate your assistance in making these adjustments or guiding me through the process if there is a more efficient way to do so.\n\nThank you for your attention to this matter. I look forward to your response and continued excellent service.\n\nBest regards,\n\nDr. Alex Turner\nCryptography Researcher"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry on Sustainability Practices\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a client of ProCare Facility Solutions for the past year, primarily utilizing your comprehensive facility management and maintenance services for our commercial property.\n\nI am reaching out to inquire about the sustainability and environmental practices that ProCare Facility Solutions implements. As someone deeply interested in futuristic and eco-friendly solutions, I am keen to understand how your services align with sustainable practices and what measures are in place to reduce environmental impact.\n\nSpecifically, I would like to know more about the eco-friendly cleaning products you use and any initiatives you have for energy efficiency and waste reduction. Additionally, I am interested in any future plans or innovations you might be considering to further enhance sustainability within your services.\n\nI have reviewed the information available on your website, but I would appreciate more detailed insights or any additional resources you could provide. Your assistance in this matter would be greatly valued as we aim to ensure our facility operates in the most environmentally responsible manner possible.\n\nThank you for your time and support. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Facility Management at My Gun Shop\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I run a local gun shop here in town. We've been using ProCare Facility Solutions for our facility management needs for a while now, and overall, we've been quite satisfied with the services provided.\n\nHowever, I've noticed a few minor issues lately that I'd like to bring to your attention. Specifically, there seems to be some inconsistency in the coordination of space utilization and security measures. While these aren't urgent problems, I believe addressing them could help maintain the smooth operation of my shop.\n\nI haven't taken any specific steps to resolve these issues yet, as I wanted to get your expert opinion first. Could you please look into this and let me know what can be done to improve the situation?\n\nThanks for your attention to this matter. Looking forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About Training Programs for In-House Maintenance Team\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a resident of Toronto for the past few years. As an Iranian expat with a deep passion for cinema and cultural representation, I have always appreciated the diverse and vibrant community here. I am writing to you today with a positive outlook and a request for some guidance.\n\nI have recently started managing a residential complex in the city and have been thoroughly impressed with the comprehensive services offered by ProCare Facility Solutions. Your commitment to quality and sustainability truly stands out, and I am eager to ensure that our facility meets the highest standards.\n\nCurrently, I am looking to develop an in-house maintenance team to handle routine and preventative maintenance tasks. I noticed that ProCare offers training programs on facility management best practices, which I believe would be incredibly beneficial for our team. Could you please provide more information about these training programs? Specifically, I am interested in understanding the curriculum, duration, and any prerequisites that might be required.\n\nI have not yet taken any steps towards organizing this training, as I wanted to reach out to your team first to get a better understanding of what is available. Your expertise and experience in this field are highly valued, and I am confident that your guidance will help us build a competent and efficient maintenance team.\n\nThank you for your time and assistance. I look forward to hearing from you soon and am excited about the possibility of collaborating with ProCare Facility Solutions to enhance our facility's maintenance capabilities.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent HVAC Repair Needed\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been availing your facility management and maintenance services for my residential complex in Kolkata for the past year. While I have generally been satisfied with the quality of your services, I am writing to bring to your attention a pressing issue that requires immediate resolution.\n\nOver the past few weeks, we have been experiencing recurring problems with the HVAC system in our building. Despite multiple service requests and visits from your maintenance team, the issue remains unresolved. The system frequently malfunctions, leading to uncomfortable living conditions for the residents, especially during this hot and humid season.\n\nI have already reported this issue several times through your customer service hotline and even had a few technicians visit our premises. However, the problem persists, and it seems that the root cause has not been adequately addressed. This situation is causing significant inconvenience and frustration among the residents, and we urgently need a permanent solution.\n\nI kindly request that you escalate this matter to the appropriate department and arrange for a thorough inspection and repair of the HVAC system at the earliest. It is crucial that this issue is resolved promptly to ensure the comfort and well-being of all residents.\n\nThank you for your immediate attention to this matter. I look forward to a swift resolution.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Cleaning Services for New Fitness and Play Facility\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am the owner of a children's play center. I am reaching out to explore a potential collaboration with ProCare Facility Solutions as we are in the process of expanding our facility to include a combined fitness and play area.\n\nGiven the nature of our business, maintaining a clean and hygienic environment is paramount. We are particularly interested in your specialized cleaning services, especially those that can cater to the unique needs of a space that will be used by both children and fitness enthusiasts.\n\nWe have not yet taken any steps towards securing a cleaning service provider, as we wanted to first understand the options available and how your services could be tailored to our specific requirements.\n\nCould you please provide more information on the cleaning services you offer, particularly any that would be suitable for a combined fitness and play facility? Additionally, we would appreciate details on your eco-friendly cleaning products and practices, as sustainability is a key concern for us.\n\nThank you for your time and assistance. I look forward to your response and hope we can work together to ensure our new facility is maintained to the highest standards.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent Inquiry Regarding Facility Management Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am currently managing the accounts for our family-owned commercial property. We have been considering your services for some time now, given your reputation for excellence in facility management and maintenance.\n\nI am reaching out with a high-priority inquiry regarding the comprehensive facility management services you offer. We are particularly interested in understanding how your team handles emergency repair services and the implementation of energy efficiency practices. Given the nature of our business, it is crucial for us to ensure that any potential issues are addressed swiftly and effectively to avoid any disruptions.\n\nTo provide some context, we have recently experienced a few unexpected maintenance issues that have caused significant concern. While we have managed to handle these situations internally, it has become clear that we need a more reliable and professional solution moving forward. We are keen to know more about your customized maintenance plans and how they can be tailored to meet the specific needs of our facility.\n\nI would appreciate it if you could provide detailed information on the following:\n1. The process for initiating emergency repair services.\n2. Examples of energy efficiency practices you have successfully implemented for other clients.\n3. The structure and flexibility of your customized maintenance plans.\n\nGiven the urgency of our situation, I kindly request a prompt response. We are eager to move forward and ensure that our facility is maintained to the highest standards, allowing us to focus on our core activities without the constant worry of unexpected issues.\n\nThank you for your attention to this matter. I look forward to your swift response and hope to establish a long-term partnership with ProCare Facility Solutions.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Facility Management Training Programs\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I've been a resident of Tupper Lake for quite some time now. I've always appreciated the quality of services ProCare Facility Solutions provides, especially in maintaining our local properties.\n\nI'm reaching out because I'm interested in the training programs you offer for facility management best practices. I manage a small residential complex here in town, and I believe that some formal training could really help us improve our maintenance routines and overall efficiency.\n\nSo far, we've been handling things on our own, but I think it's time to get some professional guidance to ensure we're doing everything correctly and sustainably. Could you provide more details on the training programs available and how we can get started?\n\nLooking forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About Training Programs for Facility Management\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a satisfied client of ProCare Facility Solutions for the past year. I am writing to express my appreciation for the excellent services your team has provided in maintaining my residential property. Your commitment to quality and sustainability has truly made a positive impact on my living environment.\n\nRecently, I have been exploring alternative methods to manage my knee arthritis, and I am particularly interested in learning more about your training programs on facility management best practices. While my condition limits my physical activities, I believe that gaining knowledge in this area could be beneficial for me in overseeing the maintenance of my property more effectively.\n\nI have not yet taken any steps towards enrolling in a training program, as I wanted to reach out to your support team first to gather more information. Could you please provide me with details on the available training sessions, including schedules, topics covered, and any prerequisites? Additionally, I would appreciate any recommendations you might have for someone in my situation.\n\nThank you for your time and assistance. I look forward to your response and am excited about the possibility of enhancing my understanding of facility management with ProCare's expert guidance.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About Specialized Cleaning Services for Chemistry Lab\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. Jonathan Harris, and I am a professor of chemistry with a particular interest in rare earth elements and their compounds. I have been utilizing your services for the past year to maintain the cleanliness and functionality of my laboratory and office space.\n\nI am writing to inquire about your specialized cleaning services. Given the nature of my work, it is crucial that my laboratory environment remains free from any contaminants that could interfere with my research. Specifically, I am looking for a deep cleaning service that can address the unique requirements of a chemistry lab, including the safe handling and disposal of any chemical residues.\n\nTo date, I have been managing routine cleaning with the help of my research assistants, but I believe a more thorough and professional approach is necessary to maintain the highest standards of cleanliness and safety. I would appreciate it if you could provide me with more information on the specialized cleaning services you offer, particularly those tailored for scientific laboratories.\n\nThank you for your attention to this matter. I look forward to your response and am hopeful that ProCare Facility Solutions can assist in maintaining the pristine condition of my workspace.\n\nBest regards,\n\nDr. Jonathan Harris"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent Concerns Regarding Maintenance and Safety Standards\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a resident at [Residential Complex Name] for the past few years. I have always appreciated the meticulous care and attention your team has provided to our facility, which has allowed me to enjoy my retirement in a clean and safe environment.\n\nHowever, I have recently noticed a few issues that require your immediate attention. Specifically, there have been some lapses in the quality and safety standards of the maintenance services. For instance, the HVAC system in my unit has been making unusual noises, and the air quality seems to have deteriorated. Additionally, I have observed some minor electrical issues in the common areas, such as flickering lights and exposed wiring, which could pose a safety hazard.\n\nI have not yet taken any steps to address these issues myself, as I believe they fall under the purview of your professional maintenance team. Given the importance of maintaining a safe and comfortable living environment, I would appreciate it if you could look into these concerns urgently.\n\nThank you for your prompt attention to this matter. I look forward to your swift response and resolution of these issues.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been a satisfied customer of ProCare Facility Solutions for the past two years. As a dog breeder specializing in American Eskimo Dogs, maintaining a comfortable and clean environment is crucial for both my dogs and my clients.\n\nI\u2019m writing to request a routine maintenance check for the HVAC system in my facility. Everything has been running smoothly, but I believe it\u2019s time for a scheduled check-up to ensure everything continues to operate efficiently. Your team has always done a fantastic job, and I trust your expertise to keep things in top shape.\n\nI haven\u2019t encountered any specific issues, but I think it\u2019s always better to be proactive. Could you please schedule a visit at your earliest convenience? I\u2019m flexible with timing, so there\u2019s no rush.\n\nThank you for your continued excellent service. Looking forward to hearing from you soon.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Assistance Required for Emergency HVAC Repair\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I've been a satisfied customer of ProCare Facility Solutions for the past two years. Your team has always done a fantastic job maintaining our residential complex here in Memphis, and I truly appreciate the quality of service you provide.\n\nI'm reaching out today because we have an urgent issue that needs immediate attention. Our HVAC system has been acting up, and with the weather getting unpredictable, it's crucial to get this sorted out as soon as possible. The system has been making unusual noises and isn't maintaining the set temperature, which is causing quite a bit of discomfort for the residents.\n\nI've already tried resetting the system and checked the filters, but the problem persists. Given the high standards of service we've come to expect from ProCare, I'm confident that your team can handle this swiftly and efficiently.\n\nCould you please arrange for a technician to come by at the earliest convenience? Your prompt assistance in this matter would be greatly appreciated.\n\nThank you so much for your help and for continuing to provide such excellent service.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Frustration with Routine Maintenance Scheduling\n\nHi ProCare Support Team,\n\nI hope this message finds you well, though I must admit I'm not feeling particularly positive as I write this. My name is [Sender], and I've been using ProCare Facility Solutions for the maintenance of my residential property for a while now. Unfortunately, my recent experiences have left me quite disappointed.\n\nI've been trying to schedule a routine maintenance check for my HVAC system, but the process has been anything but smooth. Despite following the usual steps and reaching out multiple times, I haven't received any confirmation or updates. This lack of communication is really frustrating, especially when all I'm asking for is a simple, routine service.\n\nI've already tried calling your support line and even sent a couple of emails, but it seems like my requests are falling into a black hole. I understand that this might not be a high-priority issue, but the delay and lack of response are quite disheartening.\n\nCould you please assist me in getting this maintenance scheduled? I just need a straightforward answer and a confirmed date. It's really not too much to ask, is it?\n\nLooking forward to your prompt response.\n\nBest,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I work closely with our engineer here at [Company Name] to ensure all facility modifications and maintenance tasks are up to par. We've been utilizing ProCare Facility Solutions for our maintenance needs for quite some time now, and your services have always been reliable.\n\nCurrently, we are facing an issue with our HVAC system that requires routine maintenance. The system has been running a bit less efficiently than usual, and we believe it might be time for a thorough check-up and any necessary adjustments. We haven't encountered any major problems yet, but we want to address this before it escalates.\n\nSo far, we've conducted a basic inspection and cleaned the accessible filters, but the system still seems to be underperforming. Given the importance of maintaining a comfortable and safe environment for our team, we would appreciate it if you could schedule a maintenance visit at your earliest convenience.\n\nPlease let us know the available slots for your team to come in and perform the necessary maintenance. We are looking for a timely yet thorough service to ensure everything is running smoothly again.\n\nThank you for your attention to this matter. Looking forward to your prompt response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent Request for Training and Support\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I manage a residential complex that has been utilizing ProCare Facility Solutions for our maintenance and cleaning needs for the past year. Your services have been instrumental in keeping our environment safe and well-maintained.\n\nHowever, I am reaching out with an urgent request. We are in immediate need of comprehensive training for our in-house maintenance team. Given the complexity of our facility's systems, particularly the HVAC and electrical components, it's crucial that our team is well-versed in best practices and troubleshooting techniques. \n\nWe have encountered several issues recently that have highlighted gaps in our current knowledge and capabilities. While we have managed to address these problems temporarily, a more sustainable solution is necessary. We need a detailed training program that covers routine maintenance, emergency repairs, and energy efficiency practices.\n\nCould you please provide information on the available training programs and how quickly we can schedule a session? Time is of the essence, as we aim to prevent any further disruptions to our facility's operations.\n\nThank you for your prompt attention to this matter. I look forward to your swift response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Feedback on Recent HVAC Maintenance\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been using ProCare Facility Solutions for the maintenance of my residential property for the past year. Overall, I\u2019ve been quite satisfied with the services provided, but I wanted to share some feedback regarding a recent experience.\n\nLast week, I scheduled a routine maintenance check for my HVAC system. While the technician was professional and courteous, I noticed that the system still seems to be running less efficiently than before. I understand that these things can happen, but I wanted to bring it to your attention to see if there might be a follow-up or additional steps that could be taken to resolve this.\n\nI haven\u2019t taken any further steps yet, as I wanted to get your input first. Could you please advise on what can be done to ensure the HVAC system is operating at its best? Any guidance or additional service would be appreciated.\n\nThank you for your attention to this matter. Looking forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Facility Management Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. [Sender], and I am a large animal veterinarian specializing in bovine podiatry. I am reaching out to you with a few questions regarding your facility management services.\n\nI have recently been considering ways to improve the efficiency and upkeep of my veterinary clinic, which includes both residential and commercial spaces. Given the nature of my work, maintaining a clean, safe, and well-managed environment is crucial. I have heard positive things about ProCare Facility Solutions and am interested in learning more about how your services could benefit my practice.\n\nSpecifically, I would like to understand more about your comprehensive facility management offerings. Could you provide details on how your team handles the coordination of space utilization, security, and sustainability efforts? Additionally, I am curious about the implementation of best practices for energy efficiency and environmental impact reduction, as these are areas of particular interest to me.\n\nI have not yet taken any steps to address these needs, as I wanted to gather more information before making any decisions. Your expertise and experience in this field are highly valued, and I am confident that your insights will help me make an informed choice.\n\nI would appreciate it if you could provide me with more information or direct me to the appropriate resources. If there are any specific plans or packages tailored for veterinary clinics or similar facilities, I would be very interested in learning about those as well.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n\nDr. [Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Scheduled Maintenance Request for HVAC System\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a loyal client of ProCare Facility Solutions for the past two years. Your team has always been a beacon of reliability and professionalism, ensuring that my home remains a sanctuary of comfort and peace.\n\nHowever, I find myself in a bit of a predicament. The HVAC system in my home has been acting up lately, and it seems to be struggling to maintain a consistent temperature. While it hasn't completely broken down, the inconsistency is becoming quite bothersome, especially as the weather starts to change. It's almost as if my home is yearning for the same stability and warmth that I seek in my own life.\n\nI have tried adjusting the thermostat and even checked the filters, but the issue persists. Given the importance of a well-functioning HVAC system, I believe it is time to call in the experts for a routine maintenance check. Could you please arrange for one of your skilled technicians to come by and take a look at it? I trust your team to handle this with the same care and attention to detail that you always do.\n\nThank you so much for your prompt attention to this matter. I look forward to hearing from you soon and getting this issue resolved.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry on Sustainability and Environmental Practices\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I represent a software company that specializes in providing a comprehensive online assessment platform with built-in security features. We have been considering your services for our office maintenance and cleaning needs.\n\nAs a company that places a high value on sustainability and environmental responsibility, we are particularly interested in understanding more about your eco-friendly practices and how they align with our own sustainability goals. Specifically, we would like to know more about the types of eco-friendly cleaning products you use, your waste management protocols, and any initiatives you have in place to reduce the carbon footprint of your operations.\n\nWe have reviewed the information available on your website, but we would appreciate more detailed insights into your sustainability efforts. Additionally, if you have any case studies or examples of how you have helped other companies achieve their environmental goals, that would be extremely helpful.\n\nThank you for your attention to this matter. We look forward to your response and hope to establish a partnership that supports both our operational needs and our commitment to environmental stewardship.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Inquiry About Specialized Cleaning Services\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I manage a bustling sports bar downtown. We've been using ProCare Facility Solutions for our regular cleaning needs for a while now, and I must say, your team does a fantastic job keeping our place spotless.\n\nRecently, I've been thinking about getting some specialized cleaning done, particularly for our carpets and windows. With the amount of foot traffic we get, especially during game nights, it's starting to show. I haven't taken any steps yet, but I wanted to reach out to see what options you might recommend for a deep clean that fits our schedule.\n\nCould you provide some details on your specialized cleaning services, including any packages or one-time services that might be suitable for us? Also, if there are any eco-friendly options, that would be a big plus.\n\nLooking forward to hearing from you.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Request for Routine Plumbing Maintenance\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a resident in the [Neighborhood] community for several years now. I have always appreciated the exceptional services provided by ProCare Facility Solutions, and I am grateful for the peace of mind your team brings to our living environment.\n\nRecently, I encountered a minor issue with the plumbing in my apartment. While it is not an urgent matter, I believe it would be best to address it sooner rather than later to prevent any potential complications. Specifically, there seems to be a small leak under the kitchen sink that I noticed a few days ago. I have tried tightening the connections myself, but the leak persists.\n\nGiven the positive experiences I have had with your team in the past, I am confident that you will be able to resolve this issue efficiently. Could you please arrange for a technician to visit my apartment at your earliest convenience to take a look and perform the necessary routine maintenance?\n\nThank you for your attention to this matter. I look forward to your prompt response and appreciate your continued dedication to maintaining our community.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent Attention Needed for Quality and Safety Concerns\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been using your facility management services for my residential complex for the past year. While I have generally been satisfied with your services, I am writing to express some serious concerns regarding the quality and safety of the recent maintenance work carried out at my property.\n\nOver the past few weeks, I have noticed several issues that are quite alarming. The HVAC system, which was supposed to be serviced, is still malfunctioning, causing significant discomfort for the residents. Additionally, there have been multiple instances where the cleaning staff has left hazardous materials unattended, posing a safety risk to everyone in the building.\n\nI have already tried to address these issues by speaking directly with the on-site team, but unfortunately, the problems persist. This is not the level of service I expected from a company that prides itself on quality and safety.\n\nI urgently need your assistance to rectify these issues. Specifically, I would like a thorough inspection of the HVAC system and immediate corrective actions to ensure it is functioning properly. Additionally, I request a review of the cleaning protocols to ensure that safety standards are being strictly followed.\n\nI trust that you will take these concerns seriously and provide a prompt resolution. Thank you for your attention to this matter.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Persistent HVAC Noise - Request for Maintenance\n\nHi [Receiver],\n\nI hope this email finds you well. My name is [Sender], and I've been a client of ProCare Facility Solutions for a while now, primarily utilizing your maintenance services for my office building. Normally, I appreciate the level of service you provide, but today, I'm less than impressed.\n\nWe've been experiencing a persistent issue with our HVAC system. It's been making an unbearable noise, and while it's not an emergency that needs immediate attention, it's certainly disruptive and annoying. I had hoped that your team would have caught this during their routine checks, but alas, here we are.\n\nI've tried to troubleshoot the problem myself, even going as far as consulting a few online forums, but nothing seems to work. It's quite frustrating, especially considering the premium we pay for your services.\n\nCould you please arrange for someone to come and take a look at this issue? I understand it's not a high-priority emergency, but it does need to be addressed sooner rather than later.\n\nLooking forward to your prompt response and hoping this can be resolved without further inconvenience.\n\nBest,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Specialized Cleaning Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. [Sender], and I am an atmospheric physicist currently engaged in research on the effects of geoengineering on climate patterns. I have been utilizing your facility management services for my research lab and have been quite satisfied with the overall quality and professionalism your team has demonstrated.\n\nI am writing to inquire about your specialized cleaning services. Given the nature of my work, maintaining a pristine and controlled environment is crucial for the accuracy of my experiments. Specifically, I am interested in understanding more about your deep cleaning and eco-friendly cleaning practices, as these are particularly relevant to the sensitive equipment and materials we handle.\n\nWhile there is no immediate urgency, I would appreciate detailed information on the scope of these services, including any protocols you follow to ensure minimal disruption to ongoing research activities. Additionally, if there are any specific preparations or considerations we need to be aware of before scheduling such services, that information would be very helpful.\n\nI have not yet taken any steps towards scheduling a cleaning session, as I wanted to gather all necessary details first. Your guidance on this matter would be greatly appreciated.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\nDr. [Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Attention Required: Quality and Safety Concerns\n\nHi ProCare Support Team,\n\nI'm [Sender], and I've been using your services for a while now. Honestly, I expected better from a company that claims to be a premier provider of facility management and maintenance.\n\nRecently, I've noticed some glaring issues with the quality and safety standards in the cleaning services provided to my office space. The cleaning crew seems to be cutting corners, and I've found several areas that are consistently overlooked. This isn't just about aesthetics; it's about maintaining a safe and healthy environment for my team.\n\nI've tried addressing this with the on-site supervisor, but nothing has changed. It's frustrating to see that my concerns are not being taken seriously.\n\nI need you to step in and ensure that these issues are resolved promptly. I expect a thorough review of the cleaning protocols and immediate action to rectify the situation.\n\nLooking forward to your prompt response.\n\nBest,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Coordination of Space Utilization\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am currently a physics student specializing in ferromagnetism. I reside in one of the residential complexes managed by your esteemed company.\n\nI am writing to bring to your attention a minor issue related to the coordination of space utilization within our building. Specifically, there seems to be a slight misalignment in the scheduling of common area usage, which occasionally leads to overlapping bookings. While this is not an urgent matter, I believe addressing it could enhance the overall efficiency and convenience for all residents.\n\nI have not yet taken any steps to resolve this issue independently, as I thought it best to consult with your team first. I would appreciate it if you could look into this matter and suggest a possible solution or adjustment to the current scheduling system.\n\nThank you for your attention to this matter. I look forward to your guidance and support.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent Assistance Required for Facility Management and Safety Concerns\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a client of ProCare Facility Solutions for the past two years, primarily utilizing your facility management services for our residential complex in Toronto. I am reaching out to seek your immediate assistance with a matter that has recently come to my attention.\n\nOver the past few weeks, we have noticed some serious inconsistencies in the management of our facility operations. Specifically, there have been significant lapses in the coordination of space utilization and security measures. For instance, the common areas are not being utilized efficiently, leading to overcrowding during peak hours. Additionally, there have been a few instances where the security protocols were not followed, causing considerable concern among the residents.\n\nI have already spoken with our on-site manager to address these issues, but unfortunately, the situation has not improved. Given the importance of maintaining a safe and efficient environment for our residents, I believe it is crucial to resolve these matters promptly.\n\nCould you please look into this issue and provide guidance on how we can enhance our facility management practices? Any recommendations or adjustments to our current plan would be greatly appreciated.\n\nThank you for your immediate attention to this matter. I look forward to your prompt response and assistance.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Urgent Training Support Needed for In-House Team\n\nHi [Receiver],\n\nI hope this message finds you well. My name is [Sender], and I am an executive at a podcast network that has been utilizing ProCare Facility Solutions for our office maintenance and cleaning services. We've been quite satisfied with the level of service provided so far.\n\nHowever, we are currently facing a pressing issue that requires immediate attention. Our in-house maintenance team is struggling to keep up with the demands of our rapidly growing office space. Despite their best efforts, there have been several instances where routine maintenance tasks have been overlooked, leading to minor but disruptive issues.\n\nWe have tried to address this internally by conducting brief training sessions, but it seems that our team needs more comprehensive guidance to handle the increasing workload effectively. Given the urgency of the situation, we need your expert support to develop a robust training program for our staff.\n\nCould you please arrange for an intensive training session at the earliest convenience? We need a detailed program that covers best practices in facility management, maintenance protocols, and efficient problem-solving techniques. Additionally, any resources or materials you can provide to support ongoing training would be greatly appreciated.\n\nThank you for your prompt attention to this matter. We look forward to your swift response and assistance in resolving this issue.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Request for Training and Support on Latest Facility Management Trends\n\nHi ProCare Support Team,\n\nHope you're all doing great! My name is Alex, and I've been following ProCare Facility Solutions for a while now. I really appreciate the top-notch services you provide, especially your commitment to sustainability and quality.\n\nI'm reaching out because I think there's a fantastic opportunity for us to stay ahead of the curve with some of the latest online trends in facility management. As someone who grew up with the internet, I've noticed a lot of new tools and practices emerging that could really benefit our operations. I believe integrating these trends could enhance our efficiency and overall service quality.\n\nI've done some preliminary research and tried to implement a few of these trends myself, but I think a more structured training program from your end would be incredibly beneficial. Specifically, I'm interested in learning more about the latest best practices in energy efficiency and environmental impact reduction, as well as any new technologies that could streamline our maintenance and cleaning processes.\n\nCould you please provide some guidance or set up a training session to help us get up to speed with these new trends? I think it would be a great addition to our current practices and help us maintain our high standards.\n\nThanks a lot for your time and assistance. Looking forward to hearing from you soon!\n\nBest regards,\nAlex"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Assistance Required for Facility Management Issue\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am reaching out to you with a matter that requires urgent attention. My partner and I have been relying on ProCare Facility Solutions for the management of our residential complex, and while we have generally been satisfied with your services, we are currently facing a significant issue that needs immediate resolution.\n\nOver the past few days, we have noticed a series of problems with the facility management at our complex. Specifically, there have been lapses in security measures, and the coordination of space utilization has been less than optimal. These issues are causing us considerable concern, especially given the potential risks involved. We are particularly worried about the safety and efficiency of our living environment, which is paramount to us.\n\nWe have already attempted to address these concerns by speaking with the on-site management team, but unfortunately, the issues persist. Given the urgency of the situation, we are seeking your immediate intervention to rectify these problems. We would appreciate it if you could send a team to assess and resolve the security lapses and improve the coordination of space utilization as soon as possible.\n\nThank you for your prompt attention to this matter. We look forward to your swift response and resolution.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Urgent: Immediate Attention Required for Facility Management Issues\n\nDear [Receiver],\n\nI hope this message finds you well, though I must admit, my patience is wearing thin. My name is [Sender], and I have been utilizing ProCare Facility Solutions for my commercial property for the past year. While I initially had high hopes for your services, recent experiences have left me quite disillusioned.\n\nThe primary issue at hand is the ongoing mismanagement of our facility operations. Despite your promises of comprehensive oversight and efficient management, I have encountered numerous problems that suggest otherwise. The coordination of space utilization has been a mess, and the security measures in place are far from adequate. Additionally, the so-called sustainability efforts seem to be more of a marketing gimmick than a practical reality.\n\nI have already attempted to address these concerns through your support channels, but the responses have been lackluster at best. It seems that my complaints are falling on deaf ears, and the lack of urgency in resolving these issues is quite frustrating.\n\nI am reaching out once again, hoping that this time my concerns will be taken seriously. I need a thorough review and immediate improvement in the management of our facility. Specifically, I want to see a detailed plan on how you intend to rectify the current shortcomings and ensure that such issues do not recur in the future.\n\nI trust that you will give this matter the attention it deserves and provide a satisfactory resolution promptly. \n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Facility Management Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am currently an economics student with a keen interest in efficient facility management. I have been researching various companies that offer comprehensive facility management services, and ProCare Facility Solutions has come highly recommended.\n\nI am particularly interested in understanding more about your facility management services, specifically how you measure and report on the efficiency and effectiveness of your operations. As someone who values tangible outcomes and data-driven results, I would appreciate detailed information on the metrics and KPIs you use to evaluate your services. Additionally, I am curious about the sustainability practices you implement and how these are quantified in terms of environmental impact reduction.\n\nTo provide some context, I am considering potential facility management solutions for a residential complex project I am working on as part of my studies. I have reviewed the information available on your website, but I would like to delve deeper into the specifics mentioned above.\n\nCould you please provide more detailed documentation or case studies that highlight your approach to facility management, particularly in terms of measurable outcomes? Any additional insights into your sustainability initiatives would also be greatly appreciated.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Concerns Regarding Recent Cleaning Services Quality\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been utilizing your services for my physical therapy practice, which primarily caters to seniors. I must say, I have been quite disappointed with the recent cleaning services provided.\n\nDespite the low urgency of this matter, I feel compelled to address it as the quality of cleaning has noticeably declined. The deep cleaning and carpet maintenance, in particular, have not met the standards I have come to expect from ProCare Facility Solutions. The carpets still appear dingy, and there are areas that seem to have been overlooked entirely.\n\nI have not taken any steps to resolve this issue on my own, as I believe it falls squarely within the scope of the services I am paying for. I would appreciate it if your team could look into this matter and ensure that the cleaning services are brought back up to the high standards that were initially promised.\n\nThank you for your attention to this matter. I look forward to your prompt response and a resolution that restores my confidence in your services.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Immediate Assistance Required for HVAC System Disruption\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a client of ProCare Facility Solutions for the past two years, primarily utilizing your facility management services for our commercial property. I have always appreciated the meticulous attention to detail and the seamless management provided by your team.\n\nHowever, I am writing to bring to your immediate attention a pressing issue that has arisen in our facility. Over the past week, we have encountered significant disruptions in our HVAC system, which has led to uncomfortable working conditions for our staff. Despite our best efforts to manage the situation internally, the problem persists and seems to be escalating.\n\nWe have already attempted basic troubleshooting measures, including resetting the system and checking for any visible obstructions or faults. Unfortunately, these steps have not resolved the issue, and we are now facing a critical need for professional intervention.\n\nGiven the urgency of the situation, I kindly request that you dispatch a technician at the earliest possible opportunity to diagnose and rectify the problem. The well-being and productivity of our team are being adversely affected, and we are keen to restore normalcy as swiftly as possible.\n\nThank you for your prompt attention to this matter. I look forward to your swift response and resolution.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Training Programs for Facility Management\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I work closely with the owner of a local liquor store to promote our distillery's bourbon. We've been considering ways to improve our facility management practices and came across your comprehensive services.\n\nI'm particularly interested in learning more about the training programs you offer for facility management best practices. We believe that enhancing our knowledge in this area could significantly benefit our operations. Could you provide more details on the available training sessions, including schedules and any associated costs?\n\nWe haven't taken any steps yet, as we wanted to gather more information before proceeding. Your guidance on how to get started would be greatly appreciated.\n\nThank you for your time and assistance.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent: Immediate Attention Required for Scheduling Issues\n\nDear ProCare Support Team,\n\nI hope this message finds you well. However, I must express my deep frustration with the current state of your scheduling services. As someone who values efficiency and reliability, the lack of coordination in your cleaning services is unacceptable.\n\nI have been a loyal customer of ProCare Facility Solutions, consistently appreciating the quality of your cleaning services. Unfortunately, recent scheduling issues have caused significant disruptions. Despite my repeated attempts to establish a consistent cleaning schedule for my office space, I have encountered numerous delays and miscommunications. This is far below the standard of service I expect from a company that prides itself on professionalism and reliability.\n\nI have reached out to your team multiple times to address this issue, but the responses have been slow and unhelpful. It seems no one is taking responsibility for the scheduling mishaps, leaving me to deal with the consequences.\n\nI urge you to take immediate action to rectify this situation. I need a reliable and consistent cleaning schedule that aligns with my needs. Please assign a competent team member to handle this matter and ensure that such issues do not recur in the future.\n\nThank you for your prompt attention to this matter. I look forward to a swift resolution.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nHi ProCare Support Team,\n\nI hope this message finds you well! My name is [Sender], and I\u2019ve been enjoying the fantastic services provided by ProCare Facility Solutions for my residential property. Your team has always been top-notch, and I truly appreciate the attention to detail and professionalism.\n\nI\u2019m reaching out today with a small request regarding the routine maintenance of our HVAC system. I\u2019ve noticed some minor inconsistencies in the temperature control, and I think it might be time for a check-up to ensure everything is running smoothly. I\u2019m not entirely sure about the technicalities, but I trust your expertise to handle it.\n\nI haven\u2019t taken any steps yet, as I wanted to consult with the professionals first. Could you please schedule a maintenance visit at your earliest convenience? There\u2019s no rush, so whenever it fits into your schedule would be perfect.\n\nThank you so much for your help and for always providing such excellent service. Looking forward to hearing from you soon!\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Concerns Regarding Recent Service Experience\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I represent [Multinational Corporation Name]. We have been utilizing your facility management and maintenance services for our office buildings across several locations. Overall, we have been satisfied with the quality of service provided by ProCare Facility Solutions.\n\nHowever, I would like to bring to your attention a few concerns that have recently come to our notice. Over the past month, we have observed inconsistencies in the cleaning schedules and maintenance routines. Specifically, there have been delays in the routine maintenance of our HVAC systems, which has caused some discomfort for our employees. Additionally, the quality of the cleaning services has not been up to the usual standards we have come to expect from your team.\n\nWe have already reached out to our designated account manager to address these issues, but the response has been slower than anticipated. Given the importance of maintaining a comfortable and clean working environment for our staff, we would appreciate a more prompt resolution to these concerns.\n\nCould you please look into this matter and provide us with an update on the steps being taken to rectify these issues? We value the partnership we have with ProCare Facility Solutions and hope to continue working together to ensure our facilities are well-maintained.\n\nThank you for your attention to this matter. I look forward to your prompt response.\n\nBest regards,\n\n[Sender] \n[Multinational Corporation Name] \n[Contact Information]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Urgent Assistance Needed for HVAC Maintenance\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I recently started using your services for my home. I have an urgent request that I need help with.\n\nI\u2019m not very handy around the house and prefer to keep things simple. I\u2019ve been trying to follow the maintenance plan you provided, but I\u2019m finding it a bit overwhelming. Specifically, I\u2019m struggling with the HVAC system maintenance. The instructions seem too complex for someone like me who isn\u2019t very experienced with these things.\n\nI\u2019ve tried to follow the steps as best as I can, but I\u2019m worried I might mess something up. I haven\u2019t done anything drastic yet, just some basic cleaning and checking, but I\u2019m not confident I\u2019m doing it right.\n\nCould you please provide a simpler, more straightforward guide or perhaps send someone over to help me out? I\u2019d really appreciate any assistance you can offer to make this process easier for me.\n\nThank you for your prompt attention to this matter.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Assistance Required for Facility Management Issue\n\nDear ProCare Support Team,\n\nGreetings and blessings to you all. I hope this message finds you in good health and high spirits.\n\nMy name is [Sender], and I have been a satisfied client of ProCare Facility Solutions for the past two years. Your dedication to maintaining a safe and efficient environment has always resonated with me, and I deeply appreciate the quality of service you provide.\n\nRecently, I have encountered an issue with the facility management at our residential complex. Specifically, there seems to be a recurring problem with the coordination of space utilization in our common areas. While the overall management has been commendable, this particular aspect requires some attention to ensure that all residents can enjoy the shared spaces harmoniously.\n\nI have already spoken with our on-site manager and attempted to address the issue by rearranging some of the furniture and scheduling usage times. However, these measures have not fully resolved the problem, and I believe a more comprehensive solution is needed.\n\nI kindly request your assistance in reviewing the current space utilization plan and providing guidance on how we can optimize it for better efficiency and harmony. Your expertise in facility management is highly valued, and I am confident that with your support, we can find a suitable resolution.\n\nThank you for your attention to this matter. I look forward to your prompt response and am hopeful for a positive outcome.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is Officer John Mitchell, and I oversee the facility management for our precinct. We've been utilizing ProCare Facility Solutions for our maintenance needs for the past two years, and I must say, your services have been instrumental in keeping our operations running smoothly.\n\nI am writing to request routine maintenance for our HVAC system. As you know, maintaining a comfortable environment is crucial for our team, especially given the nature of our work. The system has been functioning adequately, but it's due for its scheduled check-up to ensure everything continues to run efficiently.\n\nSo far, we haven't encountered any major issues, but I believe it's prudent to stay ahead of any potential problems. Could you please arrange for a technician to come by sometime next week? We are flexible with the timing, but a mid-week appointment would be ideal.\n\nThank you for your attention to this matter. I look forward to your prompt response and continued excellent service.\n\nBest regards,\n\nOfficer John Mitchell\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Scheduling Specialized Cleaning Services for My Art Collection\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a client of ProCare Facility Solutions for some time now. I am reaching out to discuss the scheduling of cleaning services for my residence, which houses an extensive collection of Michelangelo's sculptures.\n\nGiven the delicate nature of these artworks, it is imperative that the cleaning is conducted with the utmost care and precision. I would like to arrange a specialized cleaning schedule that ensures the sculptures are maintained in pristine condition without compromising their integrity.\n\nPreviously, I have coordinated with your team for routine cleaning services, and I have been quite satisfied with the results. However, the unique requirements of these sculptures necessitate a more tailored approach. I am looking for a cleaning plan that includes deep cleaning and the use of eco-friendly products to preserve the sculptures' original state.\n\nCould you please assist me in setting up a suitable cleaning schedule? I am available to discuss the specifics at your earliest convenience. Your prompt attention to this matter would be greatly appreciated.\n\nThank you for your continued support and excellent service.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Scheduled Maintenance Request for HVAC System\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a proud client of ProCare Facility Solutions for the past three years. I have always been impressed by your commitment to quality and the exceptional service you provide, which is why I am reaching out to you today with a positive outlook.\n\nRecently, I encountered an issue with the HVAC system in my residential complex. While it is not an immediate emergency, it is something that needs to be addressed promptly to ensure the comfort and safety of the residents. The system has been making unusual noises and is not maintaining the desired temperature consistently.\n\nI have already checked the thermostat settings and ensured that the filters are clean, but the problem persists. Given your expertise and my positive experiences with your maintenance services, I am confident that your team can swiftly diagnose and resolve this issue.\n\nCould you please arrange for a technician to visit our property at the earliest convenience for a routine maintenance check? I am looking forward to your prompt assistance and am sure that, as always, ProCare will deliver a solution that exceeds expectations.\n\nThank you for your attention to this matter. I appreciate your support and dedication to maintaining our facilities in top condition.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Scheduled Maintenance Request for HVAC System\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a client of ProCare Facility Solutions for the past few years, relying on your expertise to maintain my residential property. I am writing to bring to your attention an issue that has recently arisen with the HVAC system in my home.\n\nOver the past few days, I have noticed that the heating system is not functioning as it should. Despite setting the thermostat to the desired temperature, the system fails to maintain a consistent warmth throughout the house. This inconsistency is becoming increasingly uncomfortable, especially as the weather turns colder.\n\nI have attempted to troubleshoot the problem by checking the thermostat settings and ensuring that the filters are clean. However, these steps have not resolved the issue. Given the importance of a properly functioning HVAC system, I believe it is necessary to seek professional assistance to address this matter promptly.\n\nCould you please arrange for a technician to visit my property and diagnose the problem as part of the routine maintenance schedule? I would appreciate it if this could be scheduled at your earliest convenience, as I am keen to restore a comfortable living environment.\n\nThank you for your attention to this matter. I look forward to your prompt response and resolution.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Scheduling Cleaning Services for Upcoming Event\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I run a food truck specializing in Southern cuisine. We\u2019ve been serving up delicious meals at various country music events, and I\u2019ve been considering your cleaning services to help keep our operation spotless.\n\nWe have a big event coming up next month, and I want to ensure everything is in top shape. I\u2019m looking to schedule a thorough cleaning for our food truck, including deep cleaning and window washing. I\u2019ve heard great things about your eco-friendly cleaning products and practices, and I believe they would be perfect for our needs.\n\nI haven\u2019t taken any steps yet to resolve this, as I wanted to reach out directly to you for the best advice and scheduling options. Could you please provide me with available dates and any additional information I might need to get this set up?\n\nThanks for your help, and I look forward to hearing from you soon.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent Assistance Needed with Facility Management Coordination\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a solar panel engineer currently managing a residential complex that benefits from your exceptional facility management services. I have always appreciated the professionalism and dedication your team brings to maintaining our environment.\n\nRecently, I have encountered a few critical challenges with the coordination of space utilization and security measures within our facility. These issues require immediate attention to ensure the safety and well-being of everyone in the complex.\n\nTo provide some context, we have been experiencing significant inconsistencies in the scheduling and execution of space utilization plans, leading to frequent overlaps and confusion among residents. Additionally, there have been concerning lapses in our security protocols that need urgent resolution.\n\nI have already taken the initiative to review our current plans and made some adjustments to mitigate the impact. However, a more comprehensive approach, guided by your team\u2019s expertise, is urgently needed.\n\nCould you please assist us in reviewing and optimizing our space utilization and security measures? Your prompt insights and recommendations would be greatly valued, and I am confident that together we can enhance the overall efficiency and safety of our facility.\n\nThank you for your continued support and dedication. I look forward to your immediate response and assistance.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been utilizing your facility management services for my photo restoration studio for the past year. Your team has always been reliable, and I appreciate the quality of service provided.\n\nI am writing to request routine maintenance for the HVAC system in my studio. While there are no immediate issues, I believe it is prudent to ensure that everything is functioning optimally, especially as we approach the colder months. Regular maintenance is crucial for maintaining the right environment for my vintage photographs, and I trust your expertise in handling this.\n\nCould you please schedule a visit at your earliest convenience to perform the necessary checks and maintenance?\n\nThank you for your attention to this matter. I look forward to your prompt response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for HVAC System\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I manage a series of residential properties that have been utilizing your facility management services for the past year. Overall, we have been quite satisfied with the level of professionalism and efficiency your team has demonstrated.\n\nI am writing to request routine maintenance for the HVAC system in one of our residential complexes. While there are no immediate issues, I believe it is prudent to ensure that everything is functioning optimally, especially as we approach the colder months. Regular upkeep is essential to maintain the comfort and satisfaction of our tenants.\n\nTo date, we have not encountered any significant problems with the HVAC system, and this request is purely preventative. We have followed the basic maintenance guidelines provided by your team, but I think a professional check-up would be beneficial at this juncture.\n\nCould you please schedule a routine maintenance visit at your earliest convenience? We are flexible with the timing and can accommodate your team\u2019s availability.\n\nThank you for your attention to this matter. I look forward to your prompt response.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Assistance Needed for Quality and Safety Concerns\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am part of the facilities management team at [Technology Company]. We've been utilizing ProCare Facility Solutions for our office maintenance and cleaning services for the past year, and I must say, your team has consistently delivered exceptional service.\n\nRecently, we've encountered a few issues related to the quality and safety of our facility that we need your assistance with. Specifically, we've noticed some inconsistencies in the cleaning routines, particularly in high-traffic areas like our main lobby and conference rooms. Additionally, there have been a few minor safety concerns regarding the maintenance of our HVAC system.\n\nWe have already taken some initial steps to address these issues internally, such as adjusting our cleaning schedules and conducting a preliminary inspection of the HVAC system. However, we believe that your expertise and comprehensive approach will be invaluable in resolving these concerns effectively.\n\nCould you please arrange for a detailed inspection and provide recommendations on how we can enhance the quality and safety of our facility? We are confident that with your support, we can maintain the high standards we strive for.\n\nThank you for your attention to this matter. We look forward to your prompt response and continued partnership.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Eco-Friendly Cleaning Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. Alex Thompson, and I am an ecological economist currently engaged in research on the economic impact of insect behavior on agriculture. I have recently come across your company and am interested in your specialized cleaning services.\n\nGiven the nature of my work, maintaining a clean and controlled environment is crucial for the accuracy of my research. I am particularly interested in your deep cleaning and eco-friendly cleaning products, as these align with my commitment to sustainability and environmental health.\n\nAt this stage, I am in the preliminary phase of exploring potential service providers and have not yet taken any specific steps towards engaging a cleaning service. I would appreciate it if you could provide more detailed information about your specialized cleaning services, including any relevant case studies or references that highlight your expertise in maintaining environments similar to mine.\n\nThank you for your time and assistance. I look forward to your response.\n\nBest regards,\n\nDr. Alex Thompson\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": true, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Coordination of Space Utilization in Common Areas\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a satisfied client of ProCare Facility Solutions for the past year. As a devoted korfball player from Suriname, I truly appreciate the excellent services you provide, which allow me to focus on my training and matches without worrying about facility upkeep.\n\nI am writing to bring a minor issue to your attention regarding the management of my residential complex. Recently, I have noticed that the coordination of space utilization in our common areas could be improved. While this is not an urgent matter, I believe addressing it would enhance the overall efficiency and enjoyment of our shared spaces.\n\nI have not taken any specific steps to resolve this issue yet, as I trust your expertise and experience in handling such matters. I would greatly appreciate it if your team could look into this and suggest any possible improvements.\n\nThank you for your continued support and dedication to maintaining our facilities. I look forward to your assistance in resolving this minor issue.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for Upcoming Event\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a publicist managing several high-profile clients. We have been utilizing ProCare Facility Solutions for our maintenance needs, and I must commend your team for the exceptional service provided thus far.\n\nI am reaching out today with a specific request that requires your timely attention. We have an upcoming event at one of our client's properties, and it is imperative that the facility is in pristine condition. Specifically, we need routine maintenance performed on the HVAC system, plumbing, and electrical systems to ensure everything operates flawlessly during the event.\n\nI have already coordinated with your team in the past for similar requests, and I trust that you understand the level of perfection expected. Given the nature of our clientele, any oversight could reflect poorly on both our brands. Therefore, I urge you to prioritize this request and ensure that all necessary maintenance is completed well in advance of the event date.\n\nPlease confirm receipt of this message and provide a timeline for when the maintenance will be conducted. Your prompt attention to this matter is greatly appreciated.\n\nThank you for your continued support and dedication to excellence.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Routine Maintenance Request for My Studio\n\nDear ProCare Facility Solutions Team,\n\nI hope this message finds you well. My name is [Sender], and I am a Bollywood film director currently working on an exciting new project. I have been a satisfied client of ProCare Facility Solutions for quite some time now, and I must say, your services have always been top-notch. Your team's dedication to maintaining a pristine environment has allowed me to focus on my creative endeavors without any distractions.\n\nI am writing to request routine maintenance for my studio. While everything is functioning smoothly, I believe it's always better to stay ahead with preventative measures. Specifically, I would like to schedule a check-up for the HVAC system and a general inspection of the plumbing and electrical systems. Ensuring that everything is in perfect working order will help maintain the seamless workflow we currently enjoy.\n\nI haven't encountered any issues so far, but I believe in the adage, \"Prevention is better than cure.\" Therefore, I haven't taken any steps myself, as I trust your expertise in handling these matters efficiently.\n\nCould you please arrange for a maintenance visit at your earliest convenience? I understand that this is not an urgent request, so I am flexible with the scheduling. Your team's professionalism and attention to detail have always impressed me, and I am confident that this routine check-up will be handled with the same level of excellence.\n\nThank you for your continued support and exceptional service. I look forward to hearing from you soon.\n\nWarm regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Concerns About Facility Safety and Maintenance\n\nHi [Receiver],\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been using ProCare Facility Solutions for our residential complex for a while now. I used to work at a record store, and I often find myself reminiscing about the good old days of flipping through vinyls and admiring album covers. But today, I\u2019m writing to you about something a bit more pressing.\n\nLately, I\u2019ve noticed a few issues around our building that have me a bit concerned. Specifically, there are a few areas where the maintenance seems to be slipping. For instance, the HVAC system has been making some unusual noises, and there\u2019s a persistent leak in the plumbing that hasn\u2019t been addressed. Additionally, I\u2019ve observed that the cleaning in common areas isn\u2019t as thorough as it used to be. These issues are starting to affect the overall safety and quality of our living environment.\n\nI\u2019ve already tried reaching out to the on-site maintenance team, but it seems like they\u2019re either overwhelmed or not fully aware of the extent of these problems. I understand that these things can take time, but I\u2019m hoping we can get them sorted out before they become bigger issues.\n\nCould you please look into these concerns and let me know what steps can be taken to address them? I\u2019m particularly interested in ensuring that our HVAC and plumbing systems are functioning properly and that the cleaning standards are maintained at the high level we\u2019ve come to expect from ProCare.\n\nThank you for your attention to this matter. I look forward to hearing from you soon.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Scheduled Maintenance Request for Bathroom Plumbing\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been utilizing your services for my residential property for some time now. I have always appreciated the quality and reliability of your maintenance services.\n\nI am writing to inform you of a minor issue that has recently come up. There seems to be a small problem with the plumbing in my bathroom. While it is not an urgent matter, I would like to have it addressed at your earliest convenience to prevent any potential complications.\n\nI have not taken any steps to resolve the issue myself, as I trust your team\u2019s expertise in handling such matters. Could you please arrange for a technician to visit my home and take a look at the problem as part of your scheduled maintenance services?\n\nThank you for your attention to this matter. I look forward to your prompt response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry Regarding Maintenance Quality and Safety for Exhibit\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is Dr. Evelyn Harper, and I am an expert in agricultural artifacts, currently curating an exhibit that will showcase a variety of historical farming tools and machinery. I have been utilizing your facility management and maintenance services for our exhibit space, and I am reaching out to discuss a few concerns regarding the quality and safety standards of the maintenance work being performed.\n\nWhile I appreciate the comprehensive services provided by ProCare Facility Solutions, I have noticed a few areas where the maintenance quality could be improved to ensure the safety and preservation of our valuable artifacts. Specifically, there have been instances where the cleaning products used seem to leave residues that could potentially harm the delicate surfaces of some items. Additionally, I have observed that the HVAC system's performance has been inconsistent, which is crucial for maintaining the optimal environment for artifact preservation.\n\nI have not yet taken any steps to address these issues directly with your on-site team, as I wanted to first seek guidance from your support team on the best course of action. I would greatly appreciate it if you could provide recommendations or adjustments to the current maintenance protocols to better align with the specific needs of our exhibit.\n\nThank you for your attention to this matter. I look forward to your prompt response and any assistance you can offer to ensure the continued safety and quality of our exhibit space.\n\nBest regards,\n\nDr. Evelyn Harper\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Inquiry About Scheduling Deep Cleaning Services\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a researcher who has recently been in touch with Daniel through various academic forums. We have exchanged ideas and supported each other's work, which has been quite enriching.\n\nI am writing to inquire about scheduling cleaning services for an upcoming visit to my residential property. I have heard great things about your comprehensive cleaning services and would like to ensure that my home is in pristine condition for my guests. Specifically, I am interested in a deep cleaning service, including window washing and carpet maintenance.\n\nI have not yet taken any steps to schedule this service, as I wanted to confirm the availability and any specific requirements you might have. Could you please provide me with the available dates and any additional information needed to proceed with the booking?\n\nThank you for your assistance. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Urgent Assistance Needed for HVAC Repair\n\nHi ProCare Support Team,\n\nI hope y'all are doing well! My name is [Sender], and I've been a happy customer of ProCare Facility Solutions for a while now. Y'all have always done such a fantastic job keeping my home in tip-top shape, and I truly appreciate it.\n\nI'm reaching out because I'm in a bit of a pickle. The HVAC system in my home has suddenly stopped working, and with the Southern heat, it's becoming unbearable. I noticed the issue this morning when the air conditioning just wouldn't kick in, and it's been getting hotter by the hour.\n\nI've tried resetting the thermostat and checking the circuit breaker, but nothing seems to be working. Given the current situation, I really need someone to come out and take a look at it as soon as possible. I know y'all are the best in the business, and I'm confident you can get this sorted out quickly.\n\nCould you please send a technician over at your earliest convenience? I would be so grateful for your prompt assistance with this urgent repair.\n\nThank you so much for your help!\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"high\"}"}, {"fields": {"input": "Subject: Inquiry About Facility Management Training Programs\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am currently exploring career options in facility management. I recently came across ProCare Facility Solutions and was impressed by the range of services and the emphasis on sustainability and quality.\n\nI am particularly interested in your training and support services. Could you provide more details about the comprehensive training programs you offer, especially those related to facility management best practices? I am keen to understand the structure, duration, and any prerequisites for these programs.\n\nI haven't taken any steps yet to resolve this query as I thought it best to reach out directly to your support team for accurate information.\n\nLooking forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": true, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": true}, \"sentiment\": \"neutral\", \"urgency\": \"low\"}"}, {"fields": {"input": "Subject: Assistance Needed for HVAC Maintenance\n\nHi [Receiver],\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been a long-time friend of Jerome Frey. I\u2019ve always heard great things about ProCare Facility Solutions from him, and I\u2019m reaching out today because I need some help with an issue at my property.\n\nRecently, I\u2019ve been experiencing some problems with the HVAC system in my building. It\u2019s not an immediate crisis, but it\u2019s definitely something that needs attention soon. The system has been making unusual noises and isn\u2019t maintaining the temperature as it should. I\u2019ve tried adjusting the thermostat and checking the filters, but the problem persists.\n\nGiven the situation, I\u2019d appreciate it if you could arrange for someone to come by and take a look at the system. I\u2019m hoping to get this resolved before it turns into a bigger issue. Your team\u2019s expertise in handling routine maintenance is well-known, and I\u2019m confident you\u2019ll be able to help.\n\nLooking forward to your prompt response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Concerns Regarding Cleaning Quality and Safety Standards\n\nHi [Receiver],\n\nI hope this message finds you well. My name is [Sender], and I am a developer specializing in embedded systems. I have been utilizing ProCare Facility Solutions for the maintenance and management of our office building for the past year.\n\nI am writing to discuss a few observations related to the quality and safety standards of the cleaning services provided. While I understand that maintaining a pristine environment is a continuous effort, I have noticed some inconsistencies in the cleaning routines, particularly in high-traffic areas like the main lobby and conference rooms. These areas seem to accumulate dust and debris more quickly than expected, which raises some concerns about the overall effectiveness of the cleaning protocols in place.\n\nTo address this, I have already spoken with the on-site cleaning staff and reviewed the cleaning schedules. However, the issue persists, and I believe it might be beneficial to reassess the current cleaning strategies or perhaps introduce more frequent checks in these critical areas.\n\nCould you please provide some guidance on how we can ensure that these high-traffic zones are maintained to the highest standards? Any recommendations or adjustments to the current cleaning plan would be greatly appreciated.\n\nThank you for your attention to this matter. I look forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Feedback on Recent Maintenance Service\n\nDear [Receiver],\n\nI hope this message finds you well. My name is [Sender], and I have been utilizing the services of ProCare Facility Solutions for the maintenance of my residential property for the past year. I am writing to provide some feedback regarding a recent maintenance service.\n\nWhile I appreciate the overall quality and professionalism that ProCare consistently delivers, I encountered a minor issue during the last scheduled maintenance visit. Specifically, the technician seemed to overlook a routine check on the HVAC system, which is a critical component of my home\u2019s comfort and efficiency. This oversight was not immediately apparent, but I noticed a slight decline in performance a few days after the visit.\n\nI have not yet taken any steps to address this issue, as I wanted to bring it to your attention first. I believe it is important for your team to be aware of such instances to ensure they are addressed promptly and do not recur in the future.\n\nI would appreciate it if you could arrange for a follow-up visit to inspect and service the HVAC system at your earliest convenience. Additionally, any insights or recommendations on how to prevent similar oversights would be greatly valued.\n\nThank you for your attention to this matter. I look forward to your response and continued excellent service from ProCare Facility Solutions.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Concerns About Studio Maintenance and Rent Increase\n\nDear ProCare Facility Solutions Support Team,\n\nI hope this message finds you well. My name is [Sender], and I am a local artist who has been renting a studio space in one of the properties managed by your company. I have generally been satisfied with the services provided, but I am writing to express some concerns that have arisen recently.\n\nOver the past year, my studio rent has doubled, which has been quite challenging to manage. While I understand that rent increases can happen, I am particularly concerned about the maintenance and upkeep of the studio space. Despite the significant increase in rent, I have noticed that the quality of maintenance has not improved correspondingly. There have been recurring issues with the HVAC system, and the plumbing has required frequent attention. These problems have disrupted my work and added to my stress.\n\nI have previously reported these issues to the building management, but the solutions provided have been temporary at best. Given the substantial rent increase, I believe it is reasonable to expect a higher standard of maintenance and more prompt resolutions to these problems.\n\nI am reaching out to request a thorough review of the maintenance services provided for my studio. Specifically, I would appreciate a comprehensive inspection of the HVAC and plumbing systems to ensure they are functioning correctly and any necessary repairs are made promptly. Additionally, I would like to understand if there are any plans to improve the overall maintenance services in light of the increased rent.\n\nThank you for your attention to this matter. I look forward to your prompt response and hope we can resolve these issues satisfactorily.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": true, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": true, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Scheduling Cleaning Services for Upcoming Event\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been a loyal customer of ProCare Facility Solutions for the past year. I manage the performance analysis for the New York Red Bulls, and I must say, your services have been instrumental in maintaining our office environment, allowing us to focus on our work without any distractions.\n\nI\u2019m reaching out to schedule a cleaning service for our office space. We have an important event coming up next month, and I want to ensure that everything is in pristine condition for our guests. Given the nature of our work, a clean and organized environment is crucial for our productivity and overall morale.\n\nI haven\u2019t taken any steps yet to schedule this service, as I wanted to get in touch with your team directly to ensure we get the best possible arrangement. Ideally, we would need a thorough cleaning a few days before the event, including window washing and carpet maintenance.\n\nCould you please assist me in setting up a suitable cleaning schedule? I\u2019m confident that your team will handle this with the same excellence and attention to detail that we\u2019ve come to expect from ProCare.\n\nThank you so much for your help. Looking forward to your response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": true, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"positive\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Disappointed with Service Quality\n\nDear ProCare Support Team,\n\nI hope this email finds you well, though I must admit, I am not in the best of spirits as I write this. My name is Rajesh, and I run a small barber shop in Mumbai. I have been using your facility management services for the past six months, but lately, I have been quite disappointed with the quality of service.\n\nTo be honest, I expected a lot more from a company that claims to be a premier provider of facility management and maintenance. The cleaning services, in particular, have been subpar. The floors are not as clean as they used to be, and the windows have streaks that are quite noticeable. This is not the level of service I was promised when I signed up.\n\nI have tried to address these issues by speaking to your customer service team on a couple of occasions, but the improvements have been minimal, if any. It feels like my concerns are not being taken seriously, and this is quite frustrating.\n\nI would appreciate it if you could look into this matter and ensure that the quality of service improves. I am not asking for anything extraordinary, just the level of service that was promised when I became a customer.\n\nThank you for your attention to this matter. I hope to see some positive changes soon.\n\nBest regards,\nRajesh"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Request for Post-Renovation Cleaning Services\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been utilizing ProCare Facility Solutions for the maintenance and management of my commercial property for the past few years. Your services have always been reliable and efficient, which is why I am reaching out to you today.\n\nI am writing to request assistance with a specialized cleaning service for our office building. We have recently undergone some renovations, and there is a significant amount of dust and debris that needs to be addressed. Additionally, the carpets and windows require a thorough cleaning to restore them to their original condition.\n\nI have already scheduled a routine cleaning, but I believe this situation requires more specialized attention. Given the nature of the work needed, I would appreciate it if you could arrange for a team that specializes in deep cleaning and post-renovation cleanup.\n\nCould you please provide me with the available dates and any additional information required to proceed with this request? Your prompt assistance in this matter would be greatly appreciated, as we aim to have the office fully operational and presentable as soon as possible.\n\nThank you for your attention to this matter. I look forward to your response.\n\nBest regards,\n\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": false, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": true, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Disappointing Experience with Recent Cleaning Service\n\nHi ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I\u2019ve been using ProCare Facility Solutions for my apartment cleaning for the past few months. I\u2019ve always been impressed with your services, but I have to say, my recent experience has left me quite disappointed.\n\nLast week, I scheduled a deep cleaning for my apartment, expecting the usual top-notch service. However, when I returned home, I found several areas that were clearly overlooked. The windows were still smudged, and the carpets didn\u2019t seem to have been cleaned at all. It\u2019s really frustrating because I rely on your team to keep my space in pristine condition, especially with my busy schedule.\n\nI\u2019ve tried to address this by calling your support line, but I haven\u2019t received any follow-up. I understand that things can get busy, but I would appreciate some acknowledgment and a plan to rectify this situation.\n\nCould you please arrange for a follow-up cleaning to address these issues? I really want to continue using your services, but this experience has shaken my confidence a bit.\n\nThank you for your attention to this matter. I look forward to hearing from you soon.\n\nBest,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": true, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": false, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"negative\", \"urgency\": \"medium\"}"}, {"fields": {"input": "Subject: Immediate Assistance Required for Emergency Repair\n\nDear ProCare Support Team,\n\nI hope this message finds you well. My name is [Sender], and I have been a resident at [Residential Complex Name] for the past few years. I have always appreciated the high standards of maintenance and cleanliness that ProCare Facility Solutions provides.\n\nHowever, I am currently facing a significant issue that requires urgent attention. Earlier today, I discovered a severe leak in the plumbing system of my apartment. The water is rapidly spreading, and I am concerned about potential damage to my property and the overall safety of the living environment.\n\nI have attempted to contain the leak by shutting off the main water valve, but the situation seems to be beyond my control. Given the urgency of this matter, I kindly request immediate assistance from your emergency repair team to address and resolve this issue as swiftly as possible.\n\nYour prompt response and action would be greatly appreciated, as I am deeply concerned about the potential impact on my home and the well-being of my neighbors.\n\nThank you for your attention to this matter. I look forward to your swift response.\n\nBest regards,\n[Sender]"}, "answer": "{\"categories\": {\"routine_maintenance_requests\": false, \"customer_feedback_and_complaints\": false, \"training_and_support_requests\": false, \"quality_and_safety_concerns\": true, \"sustainability_and_environmental_practices\": false, \"cleaning_services_scheduling\": false, \"specialized_cleaning_services\": false, \"emergency_repair_services\": true, \"facility_management_issues\": false, \"general_inquiries\": false}, \"sentiment\": \"neutral\", \"urgency\": \"high\"}"}] \ No newline at end of file diff --git a/tutorials/ai-core-genaihub-prompt-optimization/facility-train.json b/tutorials/ai-core-genaihub-prompt-optimization/facility-train.json new file mode 100644 index 0000000000..0a7f50f7b0 --- /dev/null +++ b/tutorials/ai-core-genaihub-prompt-optimization/facility-train.json @@ -0,0 +1 @@ +{"error": {"code": "01700003", "message": "File not found.", "requestId": "4f6e78f7-a702-95e8-a972-ca0476623ee7", "target": "/file/api/v1/files/default/example/facility-train.json"}} \ No newline at end of file diff --git a/tutorials/ai-core-genaihub-prompt-optimization/facility_prompt.yaml b/tutorials/ai-core-genaihub-prompt-optimization/facility_prompt.yaml new file mode 100644 index 0000000000..e10ca3c8b8 --- /dev/null +++ b/tutorials/ai-core-genaihub-prompt-optimization/facility_prompt.yaml @@ -0,0 +1,13 @@ +system: |- + You are a helpful assistant + +user: |- + Giving the following message: + --- + {{?input}} + --- + Extract and return a json with the follwoing keys and values: + - "urgency" as one of `high`, `medium`, `low` + - "sentiment" as one of `negative`, `neutral`, `positive` + - "categories" Create a dictionary with categories as keys and boolean values (True/False), where the value indicates whether the category is one of the best matching support category tags from: `emergency_repair_services`, `routine_maintenance_requests`, `quality_and_safety_concerns`, `specialized_cleaning_services`, `general_inquiries`, `sustainability_and_environmental_practices`, `training_and_support_requests`, `cleaning_services_scheduling`, `customer_feedback_and_complaints`, `facility_management_issues` + Your complete message should be a valid json string that can be read directly and only contain the keys mentioned in the list above. Never enclose it in ```json...```, no newlines, no unnessacary whitespaces. diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image-br01.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image-br01.png new file mode 100644 index 0000000000..1897aa2e2c Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image-br01.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_007.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_007.png new file mode 100644 index 0000000000..1076e84281 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_007.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_008.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_008.png new file mode 100644 index 0000000000..e1b61605de Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_008.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_1.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_1.png new file mode 100644 index 0000000000..b8740d5997 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_1.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_33.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_33.png new file mode 100644 index 0000000000..1ee321aa5e Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_33.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_34.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_34.png new file mode 100644 index 0000000000..47498a7b07 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_34.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail01.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail01.png new file mode 100644 index 0000000000..5ddf8cf2a8 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail01.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail02.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail02.png new file mode 100644 index 0000000000..4006bb93be Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail02.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail03.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail03.png new file mode 100644 index 0000000000..5a80b84586 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail03.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail04.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail04.png new file mode 100644 index 0000000000..bb87cb3e52 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail04.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail05.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail05.png new file mode 100644 index 0000000000..b6e41a1198 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail05.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail06.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail06.png new file mode 100644 index 0000000000..1361320716 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail06.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail07.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail07.png new file mode 100644 index 0000000000..8e72747ae9 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail07.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail08.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail08.png new file mode 100644 index 0000000000..8ba5ed5c7c Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail08.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail09.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail09.png new file mode 100644 index 0000000000..a49baa84d6 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail09.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail10.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail10.png new file mode 100644 index 0000000000..03c03c0ffa Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail10.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail11.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail11.png new file mode 100644 index 0000000000..5bc18ae4bd Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_ail11.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_arch.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_arch.png new file mode 100644 index 0000000000..e84b599b36 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_arch.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br02.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br02.png new file mode 100644 index 0000000000..2ba2c4733e Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br02.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br03.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br03.png new file mode 100644 index 0000000000..501b92e1dd Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br03.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br04.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br04.png new file mode 100644 index 0000000000..0e23c95f94 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br04.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br05.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br05.png new file mode 100644 index 0000000000..6fdaca4336 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br05.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br06.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br06.png new file mode 100644 index 0000000000..1d84f81492 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br06.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br07.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br07.png new file mode 100644 index 0000000000..cf1dceed06 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br07.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br08.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br08.png new file mode 100644 index 0000000000..12107d1738 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br08.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br_dt.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br_dt.png new file mode 100644 index 0000000000..fc0a10d6b8 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br_dt.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br_ex.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br_ex.png new file mode 100644 index 0000000000..61554d0c81 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br_ex.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_br_pr.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br_pr.png new file mode 100644 index 0000000000..a3935c9a52 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_br_pr.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_py01.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_py01.png new file mode 100644 index 0000000000..e29a2aaa85 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_py01.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_py02.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_py02.png new file mode 100644 index 0000000000..924dbab968 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_py02.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_py03.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_py03.png new file mode 100644 index 0000000000..9dbbccdf76 Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_py03.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/image_py04.png b/tutorials/ai-core-genaihub-prompt-optimization/img/image_py04.png new file mode 100644 index 0000000000..d262f05f3a Binary files /dev/null and b/tutorials/ai-core-genaihub-prompt-optimization/img/image_py04.png differ diff --git a/tutorials/ai-core-genaihub-prompt-optimization/img/requirements.txt b/tutorials/ai-core-genaihub-prompt-optimization/img/requirements.txt new file mode 100644 index 0000000000..b749a1816d --- /dev/null +++ b/tutorials/ai-core-genaihub-prompt-optimization/img/requirements.txt @@ -0,0 +1,12 @@ +sap-ai-sdk-gen[all] +python-dotenv==1.0.1 +boto3==1.37.4 +pandas==2.2.3 +numpy==1.26.4 +PyYAML +rich +json2html==1.3.0 +ipywidgets==8.1.0 +requests +matplotlib +tqdm diff --git a/tutorials/ai-core-genaihub-prompt-optimization/onboarding-tutorial.ipynb b/tutorials/ai-core-genaihub-prompt-optimization/onboarding-tutorial.ipynb new file mode 100644 index 0000000000..f8e3db101f --- /dev/null +++ b/tutorials/ai-core-genaihub-prompt-optimization/onboarding-tutorial.ipynb @@ -0,0 +1,1116 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "9c7b73af-0100-471b-81e0-4d9fbddc6de3", + "metadata": { + "id": "9c7b73af-0100-471b-81e0-4d9fbddc6de3" + }, + "outputs": [], + "source": [ + "# Loading the credentials from the env file\n", + "from gen_ai_hub.proxy.gen_ai_hub_proxy import GenAIHubProxyClient\n", + "from dotenv import load_dotenv\n", + "import os\n", + "\n", + "load_dotenv(override=True)\n", + "\n", + "# Fetching environment variables\n", + "AICORE_BASE_URL = os.getenv(\"AICORE_BASE_URL\")\n", + "AICORE_RESOURCE_GROUP = os.getenv(\"AICORE_RESOURCE_GROUP\")\n", + "AICORE_AUTH_URL = os.getenv(\"AICORE_AUTH_URL\")\n", + "AICORE_CLIENT_ID = os.getenv(\"AICORE_CLIENT_ID\")\n", + "AICORE_CLIENT_SECRET = os.getenv(\"AICORE_CLIENT_SECRET\")\n", + "\n", + "# Initializing the GenAIHubProxyClient\n", + "client = GenAIHubProxyClient(\n", + " base_url=AICORE_BASE_URL,\n", + " auth_url=AICORE_AUTH_URL,\n", + " client_id=AICORE_CLIENT_ID,\n", + " client_secret=AICORE_CLIENT_SECRET,\n", + " resource_group=AICORE_RESOURCE_GROUP\n", + ")\n" + ] + }, + { + "cell_type": "markdown", + "id": "Pd3wsKls4OS5", + "metadata": { + "id": "Pd3wsKls4OS5" + }, + "source": [ + "# Dependencies and Helper Functions" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "j7YWZOg103r0", + "metadata": { + "id": "j7YWZOg103r0" + }, + "outputs": [], + "source": [ + "!pip install rich PyYAML \"sap-ai-sdk-gen[all]\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "03050198-427c-4157-9c06-eeda4aa2a47f", + "metadata": { + "id": "03050198-427c-4157-9c06-eeda4aa2a47f" + }, + "outputs": [], + "source": [ + "from gen_ai_hub.proxy import get_proxy_client\n", + "import pathlib\n", + "import yaml\n", + "\n", + "from ai_api_client_sdk.models.input_artifact_binding import InputArtifactBinding\n", + "from ai_api_client_sdk.models.parameter_binding import ParameterBinding\n", + "from ai_api_client_sdk.models.artifact import Artifact\n", + "from ai_api_client_sdk.models.label import Label\n", + "\n", + "SUPPORTED_MODELS = [\n", + " 'gemini-2.5-pro:001',\n", + " 'gpt-4o:2024-08-06'\n", + "]\n", + "\n", + "SUPPORTED_METRICS = [\"LLMaaJ:Sem_Sim_1\", \"JSON_Match\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "f6e39b20", + "metadata": { + "id": "f6e39b20" + }, + "outputs": [], + "source": [ + "client = get_proxy_client()" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "6ea323c6", + "metadata": { + "id": "6ea323c6" + }, + "outputs": [], + "source": [ + "from logging import PlaceHolder\n", + "from pydantic import BaseModel\n", + "from typing import List\n", + "import re\n", + "import requests\n", + "import json\n", + "\n", + "class PromptTemplate(BaseModel):\n", + " role: str\n", + " content: str\n", + "\n", + "\n", + "class PromptTemplateSpec(BaseModel):\n", + " template: List[PromptTemplate]\n", + "\n", + "\n", + " @property\n", + " def placeholders(self):\n", + " placeholders = set()\n", + " pattern = re.compile(r'\\{\\{\\s*\\?\\s*(\\w+)\\s*\\}\\}')\n", + " for message in self.template:\n", + " placeholders.update(pattern.findall(message.content))\n", + " return placeholders\n", + "\n", + " @classmethod\n", + " def from_optimizer_result(cls, input_):\n", + " placeholders = input_[\"user_message_template_fields\"]\n", + " def replace(msg):\n", + " for key in placeholders:\n", + " msg = msg.replace(\"{\"+key+\"}\", \"{{?\"+ key + \"}}\")\n", + " return msg\n", + "\n", + " return cls(\n", + " template=[\n", + " {\n", + " \"role\": \"system\",\n", + " \"content\": replace(input_[\"system_prompt\"]),\n", + " },{\n", + " \"role\": \"user\",\n", + " \"content\": replace(input_[\"user_message_template\"]),\n", + " }\n", + " ]\n", + " )\n", + "\n", + " def escape_curly_brackets(self) -> \"PromptTemplateSpec\":\n", + " # 1. Hide each {{?key}} placeholder with a unique token\n", + " placeholder_pattern = re.compile(r'\\{\\{\\s*\\?\\s*(\\w+)\\s*\\}\\}')\n", + " mapping = {}\n", + " counter = 1\n", + "\n", + " def _hide(match):\n", + " nonlocal counter\n", + " token = f\"__PLACEHOLDER_{counter}__\"\n", + " mapping[token] = match.group(0)\n", + " counter += 1\n", + " return token\n", + "\n", + " new_templates = []\n", + " for msg in self.template:\n", + " # a) hide custom placeholders\n", + " hidden = placeholder_pattern.sub(_hide, msg.content)\n", + " # b) escape all remaining braces\n", + " escaped = hidden.replace('{', '{{').replace('}', '}}')\n", + " # c) restore the original placeholders\n", + " print(mapping)\n", + " for token, original in mapping.items():\n", + " escaped = escaped.replace(token, original)\n", + "\n", + " new_templates.append(PromptTemplate(role=msg.role, content=escaped))\n", + "\n", + " # return a fresh copy\n", + " return PromptTemplateSpec(template=new_templates)\n", + "\n", + "\n", + "\n", + "def fetch_prompt_template(prompt_template: str) -> PromptTemplateSpec:\n", + " headers = {\n", + " **client.request_header,\n", + " \"Content-Type\": \"application/json\",\n", + " }\n", + " url = f\"{client.ai_core_client.base_url}/lm/promptTemplates\"\n", + " scenario, sep, name = prompt_template.partition(\"/\")\n", + " if sep:\n", + " name, sep, version = name.partition(\":\")\n", + " if sep:\n", + " body = {\"name\": name,\n", + " \"version\": version,\n", + " \"scenario\": scenario,\n", + " \"includeSpec\": True\n", + " }\n", + " response = requests.get(url, headers=headers, params=body)\n", + " response.raise_for_status()\n", + " response = response.json()\n", + " if response[\"count\"] > 0:\n", + " response = response[\"resources\"][0]\n", + " else:\n", + " raise ValueError(f\"Prompt template {name} not found.\")\n", + " else:\n", + " url += f\"/{prompt_template}\"\n", + " response = requests.get(url, headers=headers)\n", + " response.raise_for_status()\n", + " response = response.json()\n", + " return PromptTemplateSpec.model_validate(response[\"spec\"])\n", + "\n", + "def load_prompt_template(prompt: str | pathlib.Path | list | dict | PromptTemplateSpec) -> PromptTemplateSpec:\n", + " if isinstance(prompt, PromptTemplateSpec):\n", + " return prompt\n", + " if isinstance(prompt, (str, pathlib.Path)) and pathlib.Path(prompt).exists():\n", + " with open(prompt, \"r\") as f:\n", + " prompt = yaml.safe_load(f)\n", + " elif isinstance(prompt, str):\n", + " return fetch_prompt_template(prompt)\n", + " if isinstance(prompt, dict):\n", + " # expect dict with keys \"system\" [optional] and \"user\"\n", + " messages = []\n", + " if \"system\" in prompt:\n", + " messages.append({\"role\": \"system\", \"content\": prompt[\"system\"]})\n", + " messages.append({\"role\": \"user\", \"content\": prompt[\"user\"]})\n", + " return PromptTemplateSpec(template=messages)\n", + " elif isinstance(prompt, list):\n", + " # expect list of dicts with keys \"role\" and \"content\"\n", + " return PromptTemplateSpec(template=messages)\n", + " else:\n", + " raise ValueError(\"Prompt must be a string, Path, list or dict\")\n", + "\n", + "\n", + "def push_prompt_template(prompt_template: PromptTemplateSpec,\n", + " prompt_template_name_registry: str,\n", + " prompt_template_version: str,\n", + " scenario: str,\n", + " update=False):\n", + " headers = {\n", + " **client.request_header,\n", + " \"Content-Type\": \"application/json\",\n", + " }\n", + " url = f\"{client.ai_core_client.base_url}/lm/promptTemplates\"\n", + " body = {\"name\": prompt_template_name_registry,\n", + " \"version\": prompt_template_version,\n", + " \"scenario\": scenario}\n", + " res = requests.get(url, headers=headers, params=body).json()\n", + " if res[\"count\"] > 0 and not update:\n", + " print(f\"Prompt template {prompt_template_name_registry} already exists. Use update=True to update.\")\n", + " return res[\"resources\"][0]\n", + " # Prepare body\n", + "\n", + " body[\"spec\"] = prompt_template.model_dump()\n", + " # Prepare headers\n", + " response = requests.post(url, headers=headers, json=body)\n", + " # Handle response\n", + " if response.status_code == 201:\n", + " response = response.json()\n", + " elif response.status_code in (400, 409, 413):\n", + " # Return error details\n", + " raise requests.HTTPError(f\"Upload failed ({response.status_code}): {response.text}\")\n", + " else:\n", + " response.raise_for_status()\n", + " return response.json()\n", + "\n", + "\n", + "import re\n", + "\n", + "def convert_py_notation(template):\n", + " pattern = re.compile(r'\\{\\{\\s*\\?\\s*(\\w+)\\s*\\}\\}')\n", + " return pattern.sub(lambda match: \"{\" + match.group(1) + \"}\", template)\n", + "\n", + "\n", + "def validate_prompt(prompt: PromptTemplateSpec):\n", + " values = {k: \"???\" for k in prompt.placeholders}\n", + "\n", + " for message in prompt.template:\n", + " if message.role == \"user\":\n", + " try:\n", + " convert_py_notation(message.content).format(**values)\n", + " except KeyError as err:\n", + " msg = [\"Unexpected key error when running test formatting.\"]\n", + " msg += [\"This is most likeyly due to unescaped curly brackets.\"]\n", + " msg += [\"You can try fixing this by running `prompt = prompt.escape_curly_brackets()` and use the new prompt template.\"]\n", + " raise ValueError(\"\\n\".join(msg)) from err\n", + " return True\n", + "\n", + "\n", + "\n", + "\n", + "from rich.console import Console\n", + "from rich.highlighter import RegexHighlighter\n", + "from rich.theme import Theme\n", + "from rich.panel import Panel\n", + "from rich import print\n", + "\n", + "class TemplateHighlighter(RegexHighlighter):\n", + " \"\"\"Apply style to anything that looks like an email.\"\"\"\n", + "\n", + " base_style = \"template.\"\n", + " highlights = [r\"(?P\\{\\{\\s*\\?[^\\{\\}\\s]+\\s*\\}\\})\"]\n", + "\n", + "highlighter = TemplateHighlighter()\n", + "theme = Theme({\"template.placeholder\": \"bold magenta\", \"example.email\": \"bold magenta\"})\n", + "console = Console(highlighter=highlighter, theme=theme)\n", + "\n", + "\n", + "def print_prompt_template(prompt_template: PromptTemplateSpec | str | pathlib.Path, addition: str | None = None):\n", + "\n", + " prompt_template = load_prompt_template(prompt_template)\n", + " addition = f' - {addition}' if addition else ''\n", + "\n", + " for message in prompt_template.template:\n", + " if message.role == \"system\":\n", + " console.print(Panel(highlighter(message.content), title=\"System Message\" + addition, border_style=\"red\"))\n", + " elif message.role == \"user\":\n", + " console.print(Panel(highlighter(message.content), title=\"User Message\" + addition, border_style=\"green\"))\n", + " else:\n", + " console.print(Panel(highlighter(message.content), title=\"Assistant Message\" + addition))\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "067c2cf6", + "metadata": { + "id": "067c2cf6" + }, + "outputs": [], + "source": [ + "from typing import List\n", + "import requests\n", + "import mimetypes\n", + "from urllib.parse import quote\n", + "import pathlib\n", + "import json\n", + "\n", + "\n", + "def validate_dataset(dataset: str | pathlib.Path | list, expected_keys: None | List[str] = None) -> bool:\n", + " if isinstance(dataset, (str, pathlib.Path)):\n", + " with open(dataset, \"r\") as f:\n", + " try:\n", + " dataset = json.load(f)\n", + " except json.JSONDecodeError as e:\n", + " raise ValueError(f\"Invalid JSON in file: {e}\")\n", + " if not isinstance(dataset, list):\n", + " raise ValueError(\"Dataset must be a list of dictionaries.\")\n", + "\n", + " def validate_item(item: dict, excepted_keys: None | List[str]) -> bool:\n", + " excepted_keys = set(excepted_keys) if excepted_keys else None\n", + " if set(item.keys()) != {\"fields\", \"answer\"}:\n", + " raise ValueError(\"Each item must contain 'fields' and 'answer' keys.\")\n", + " if not isinstance(item[\"fields\"], dict):\n", + " raise ValueError(\"'fields' must be a dictionary.\")\n", + " fields = set(item[\"fields\"].keys())\n", + " if excepted_keys is not None:\n", + " if fields != excepted_keys:\n", + " if fields.difference(excepted_keys):\n", + " raise ValueError(f\"Unexpected keys in 'fields'. Expected: {excepted_keys}, Found: {fields}\")\n", + " if excepted_keys.difference(fields):\n", + " raise ValueError(f\"Missing keys in 'fields'. Expected: {excepted_keys}, Found: {fields}\")\n", + " if not all([isinstance(k, str) for k in item[\"fields\"].values()]):\n", + " raise ValueError(\"All values in 'fields' must be strings.\")\n", + " return fields\n", + "\n", + " excepted_keys = expected_keys\n", + " for i, item in enumerate(dataset):\n", + " if not isinstance(item, dict):\n", + " raise ValueError(\"Each item in the dataset must be a dictionary.\")\n", + " try:\n", + " excepted_keys = validate_item(item, excepted_keys)\n", + " except ValueError as e:\n", + " raise ValueError(f\"Error in entry {i}\") from e\n", + " return True\n", + "\n", + "\n", + "def upload_dataset(secret: str,\n", + " local_path: str | pathlib.Path,\n", + " remote_path: str,\n", + " scenario: str,\n", + " description: str | None = None,\n", + " overwrite: bool = False,\n", + " expected_keys: None | List[str] = None,\n", + "\n", + " allow_bucket_root: bool = False) -> str:\n", + " # Validate dataset\n", + " validate_dataset(local_path, expected_keys)\n", + " # check if secret exists\n", + " secrets = [r.name for r in client.ai_core_client.object_store_secrets.query().resources]\n", + " if secret not in secrets:\n", + " raise ValueError(f\"Secret '{secret}' not found in object store secrets. Known secrets: {secrets}\")\n", + "\n", + " # Check if local path exists\n", + " remote_path = remote_path.lstrip(\"/\")\n", + " if \"/\" not in remote_path and not allow_bucket_root:\n", + " raise ValueError(\n", + " \"Remote path must use subdirectories. Otherwise the whole bucket will be used as an input artifact. Set allow_bucket_root=True to allow this.\"\n", + " )\n", + "\n", + " # URL-encode the path parameter\n", + " path = f\"{secret}/\" + remote_path.lstrip(\"/\")\n", + " encoded_path = quote(path, safe=\"\")\n", + " url = f\"{client.ai_core_client.base_url}/lm/dataset/files/{encoded_path}\"\n", + " params = {\"overwrite\": str(overwrite).lower()}\n", + "\n", + " # Prepare headers\n", + " headers = {\n", + " **client.request_header,\n", + " \"Content-Type\": \"application/octet-stream\",\n", + " }\n", + " # Guess MIME type\n", + " guessed_type, _ = mimetypes.guess_type(local_path)\n", + " if guessed_type:\n", + " headers[\"Content-Type\"] = guessed_type\n", + "\n", + " with open(local_path, \"rb\") as f:\n", + " response = requests.put(url, params=params, headers=headers, data=f)\n", + "\n", + " # Handle response\n", + " if response.status_code == 201:\n", + " response = response.json()\n", + " elif response.status_code in (400, 409, 413):\n", + " # Return error details\n", + " raise requests.HTTPError(f\"Upload failed ({response.status_code}): {response.text}\")\n", + " else:\n", + " response.raise_for_status()\n", + " artifact_url = \"/\".join(response[\"url\"].split(\"/\")[:-1])\n", + " for artifact in client.ai_core_client.artifact.query().resources:\n", + " if response[\"url\"].startswith(artifact.url + \"/\"):\n", + " return artifact, response[\"url\"].removeprefix(artifact.url).lstrip(\"/\")\n", + "\n", + " # Create new artifact\n", + " path = response[\"url\"].split(\"/\")[-1]\n", + " new_artifact = client.ai_core_client.artifact.create(\n", + " name=f\"{scenario}-prompt-optimization\",\n", + " kind=Artifact.Kind.DATASET,\n", + " url=artifact_url,\n", + " scenario_id=scenario,\n", + " description=\"Datasets for prompt optimization\" if description is None else description,\n", + " resource_group=headers[client.ai_core_client.rest_client.resource_group_header]\n", + " )\n", + " return new_artifact, path\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "eXT05z-77zuK", + "metadata": { + "id": "eXT05z-77zuK" + }, + "source": [ + "## Create Config" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "yCXzXl1C7zVL", + "metadata": { + "id": "yCXzXl1C7zVL" + }, + "outputs": [], + "source": [ + "old_new_name_mapping = {\n", + " \"gemini-2.5-pro:001\": \"gemini-2.5-pro:001\",\n", + " \"gpt-4o:2024-08-06\": \"openai/gpt-4o-2024-08-06\"\n", + "}\n", + "\n", + "old_new_name_mapping.update({old_new_name_mapping[k]: k for k, v in old_new_name_mapping.items()})\n", + "\n", + "\n", + "def create_config(metric: str,\n", + " reference_model: str,\n", + " targets: dict,\n", + " dataset_path: str,\n", + " scenario: str,\n", + " prompt: PromptTemplateSpec) -> str:\n", + " assert metric in SUPPORTED_METRICS, f\"Unsupported metric: {metric}. Supported metrics: {SUPPORTED_METRICS}\"\n", + " assert reference_model in SUPPORTED_MODELS, f\"Unsupported reference model: {reference_model}. Supported models: {SUPPORTED_MODELS}\"\n", + " assert all(model in SUPPORTED_MODELS for model in targets.keys()), f\"Unsupported target models: {targets}. Supported models: {SUPPORTED_MODELS}\"\n", + " input_parameters = [\n", + " ParameterBinding(key=\"dataset\", value=dataset_path),\n", + " ParameterBinding(key=\"optimizationMetric\", value=metric),\n", + " ParameterBinding(key=\"basePrompt\", value=f'{scenario}/{prompt[\"name\"]}:{prompt[\"version\"]}'),\n", + " ParameterBinding(key=\"baseModel\", value=reference_model),\n", + " ParameterBinding(key=\"targetModels\", value=','.join(targets.keys())),\n", + " ParameterBinding(key=\"targetPromptMapping\", value=\",\".join([f\"{old_new_name_mapping[k]}={v}\" for k, v in targets.items()]))\n", + " \n", + " \n", + " ]\n", + " existing_configs = client.ai_core_client.configuration.query(scenario_id='genai-optimizations', executable_ids=['genai-optimizations'])\n", + " params = {par.key: par.value for par in input_parameters}\n", + " for conf in existing_configs.resources:\n", + " if {par.key: par.value for par in conf.parameter_bindings} == params:\n", + " return conf.id\n", + " \n", + " input_artifacts = [InputArtifactBinding(key=\"prompt-data\", artifact_id=artifact_id)]\n", + "\n", + " response = client.ai_core_client.configuration.create(\n", + " name = \"prompt-optimization-config\", # custom name of configuration\n", + " scenario_id = \"genai-optimizations\", # value from workflow\n", + " executable_id = \"genai-optimizations\", # value from workflow\n", + " resource_group = resource_group,\n", + " parameter_bindings = input_parameters,\n", + " input_artifact_bindings = input_artifacts\n", + " )\n", + "\n", + " return response.id\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "M7NpyMM9NI7k", + "metadata": { + "id": "M7NpyMM9NI7k" + }, + "outputs": [], + "source": [ + "from rich.console import Console\n", + "from rich.table import Table\n", + "\n", + "def fetch_results(execution_id):\n", + " response = client.ai_core_client.execution.get(execution_id = execution_id)\n", + " if response.status.name not in {'DEAD', 'COMPLETED'}:\n", + " raise RuntimeError('Execution not finished!')\n", + " path = f\"default/{execution_id}/result-data/results.json\"\n", + " encoded_path = quote(path, safe=\"\")\n", + " url = f\"{client.ai_core_client.base_url}/lm/dataset/files/{encoded_path}\"\n", + " headers = {\n", + " **client.request_header,\n", + " }\n", + " response = requests.get(url, headers=headers)\n", + " response.raise_for_status()\n", + " return response.json()# results = response.json()\n", + "\n", + "\n", + "def print_result(result):\n", + " origin_model = result[\"origin_model\"]\n", + " table = Table(title=\"Performance\")\n", + " table.add_column(\"Model\", justify=\"right\", style=\"cyan\", no_wrap=True)\n", + " table.add_column(\"Pre Optimization\", style=\"magenta\")\n", + " table.add_column(\"Post Optimization\", justify=\"right\", style=\"green\")\n", + " table.add_row(origin_model[\"model_name\"], f'{origin_model[\"score\"]:.3f}', \"n/a - reference run\")\n", + " for m in result[\"target_models\"]:\n", + " table.add_row(m[\"model_name\"], f'{m[\"pre_optimization_score\"]:.3f}', f'{m[\"post_optimization_score\"]:.3f}')\n", + " console.print(table)\n", + " for m in result[\"target_models\"]:\n", + " print_prompt_template(PromptTemplateSpec.from_optimizer_result(m), addition=m['model_name'])\n" + ] + }, + { + "cell_type": "markdown", + "id": "QcrTeIvD8Rgz", + "metadata": { + "id": "QcrTeIvD8Rgz" + }, + "source": [ + "### Download Demo Data" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "1BRIRT5a6phA", + "metadata": { + "id": "1BRIRT5a6phA" + }, + "outputs": [], + "source": [ + "import pathlib\n", + "\n", + "files = [\n", + " (\"default/example/base-prompt.yaml\", \"./facility_prompt.yaml\"),\n", + " (\"default/example/facility-train.json\", \"./facility-train.json\")\n", + "]\n", + "\n", + "for remote, local in files:\n", + " local_path = pathlib.Path(local)\n", + " if not local_path.exists():\n", + " url = f\"{client.ai_core_client.base_url}/lm/dataset/files/{remote}\"\n", + " headers = {\n", + " **client.request_header,\n", + " }\n", + " response = requests.get(url, headers=headers)\n", + " with local_path.open(\"w\") as stream:\n", + " stream.write(response.text)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "sDyiLKIM4ha_", + "metadata": { + "id": "sDyiLKIM4ha_" + }, + "outputs": [], + "source": [ + "resource_group = client.request_header[client.ai_core_client.rest_client.resource_group_header]" + ] + }, + { + "cell_type": "markdown", + "id": "fY-fejJ14YLC", + "metadata": { + "id": "fY-fejJ14YLC" + }, + "source": [ + "# Start Prompt Optimizer Run" + ] + }, + { + "cell_type": "markdown", + "id": "ExirmzxlEgYO", + "metadata": { + "id": "ExirmzxlEgYO" + }, + "source": [ + "### Loading a Local Prompt Template\n", + "\n", + "**The prompt template is structured in a `system` and a `user` message. Placeholders in the prompt template have to be wrapped in `{{?key}}`.**\n", + "\n", + "\n", + "Your prompt can be provided in any of the following forms and will be normalized to a `PromptTemplateSpec` under the hood:\n", + "\n", + "#### From Local Disk\n", + "**A file path** (`str` or `Path`) pointing to a YAML or JSON file defining either:\n", + " - a **mapping** with keys \n", + " - `\"user\"` (required) and \n", + " - `\"system\"` (optional)\n", + "\n", + "```yaml\n", + "system: |-\n", + " You are a helpful assistant\n", + "assistant: |-\n", + " Write a poen on {{?topic}}\n", + "```\n", + "or \n", + " - a **list** of message objects, each with `\"role\"` (e.g. `\"system\"` or `\"user\"`) and `\"content\"` (string)\n", + "\n", + "```yaml\n", + "- role: system\n", + " content: |-\n", + " You are a helpful assistant\n", + "- role: user\n", + " content: |-\n", + " Write a poen on {{?topic}}\n", + "```\n", + "\n", + "\n", + "#### Alternative: Prompt Registry\n", + "- **A lookup string** of the form `\"/:\"` (or just `\":\"`) will be fetched from the AI-core prompt‐template API; if you omit the version, the latest will be returned. \n" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "mYsHaqTVFEQZ", + "metadata": { + "id": "mYsHaqTVFEQZ" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
╭──────────────────────────────────────────────── System Message ─────────────────────────────────────────────────╮\n",
+       " You are a helpful assistant                                                                                     \n",
+       "╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n",
+       "
\n" + ], + "text/plain": [ + "\u001b[31m╭─\u001b[0m\u001b[31m───────────────────────────────────────────────\u001b[0m\u001b[31m System Message \u001b[0m\u001b[31m────────────────────────────────────────────────\u001b[0m\u001b[31m─╮\u001b[0m\n", + "\u001b[31m│\u001b[0m You are a helpful assistant \u001b[31m│\u001b[0m\n", + "\u001b[31m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
╭───────────────────────────────────────────────── User Message ──────────────────────────────────────────────────╮\n",
+       " Giving the following message:                                                                                   \n",
+       " ---                                                                                                             \n",
+       " {{?input}}                                                                                                      \n",
+       " ---                                                                                                             \n",
+       " Extract and return a json with the follwoing keys and values:                                                   \n",
+       " - \"urgency\" as one of `high`, `medium`, `low`                                                                   \n",
+       " - \"sentiment\" as one of `negative`, `neutral`, `positive`                                                       \n",
+       " - \"categories\" Create a dictionary with categories as keys and boolean values (True/False), where the value     \n",
+       " indicates whether the category is one of the best matching support category tags from:                          \n",
+       " `emergency_repair_services`, `routine_maintenance_requests`, `quality_and_safety_concerns`,                     \n",
+       " `specialized_cleaning_services`, `general_inquiries`, `sustainability_and_environmental_practices`,             \n",
+       " `training_and_support_requests`, `cleaning_services_scheduling`, `customer_feedback_and_complaints`,            \n",
+       " `facility_management_issues`                                                                                    \n",
+       " Your complete message should be a valid json string that can be read directly and only contain the keys         \n",
+       " mentioned in the list above. Never enclose it in ```json...```, no newlines, no unnessacary whitespaces.        \n",
+       "╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n",
+       "
\n" + ], + "text/plain": [ + "\u001b[32m╭─\u001b[0m\u001b[32m────────────────────────────────────────────────\u001b[0m\u001b[32m User Message \u001b[0m\u001b[32m─────────────────────────────────────────────────\u001b[0m\u001b[32m─╮\u001b[0m\n", + "\u001b[32m│\u001b[0m Giving the following message: \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m --- \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m \u001b[1;35m{{?input}}\u001b[0m \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m --- \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m Extract and return a json with the follwoing keys and values: \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m - \"urgency\" as one of `high`, `medium`, `low` \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m - \"sentiment\" as one of `negative`, `neutral`, `positive` \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m - \"categories\" Create a dictionary with categories as keys and boolean values (True/False), where the value \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m indicates whether the category is one of the best matching support category tags from: \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m `emergency_repair_services`, `routine_maintenance_requests`, `quality_and_safety_concerns`, \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m `specialized_cleaning_services`, `general_inquiries`, `sustainability_and_environmental_practices`, \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m `training_and_support_requests`, `cleaning_services_scheduling`, `customer_feedback_and_complaints`, \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m `facility_management_issues` \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m Your complete message should be a valid json string that can be read directly and only contain the keys \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m mentioned in the list above. Never enclose it in ```json...```, no newlines, no unnessacary whitespaces. \u001b[32m│\u001b[0m\n", + "\u001b[32m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
Prompt template loaded successfully. Placeholders found are: {'input'}\n",
+       "
\n" + ], + "text/plain": [ + "Prompt template loaded successfully. Placeholders found are: \u001b[1m{\u001b[0m\u001b[32m'input'\u001b[0m\u001b[1m}\u001b[0m\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "base_prompt_template = \"./facility_prompt.yaml\" # local path to the prompt template or Prompt Repository identifier\n", + "\n", + "\n", + "prompt = load_prompt_template(base_prompt_template) # .escape_curly_brackets() if validation fails.\n", + "print_prompt_template(prompt)\n", + "print(f\"Prompt template loaded successfully. Placeholders found are: {prompt.placeholders}\")\n", + "assert validate_prompt(prompt)\n" + ] + }, + { + "cell_type": "markdown", + "id": "wFNUcWAbtgYA", + "metadata": { + "id": "wFNUcWAbtgYA" + }, + "source": [ + "Check if all expected placeholders were found." + ] + }, + { + "cell_type": "markdown", + "id": "963zmQ0rCPkT", + "metadata": { + "id": "963zmQ0rCPkT" + }, + "source": [ + "### Validating Local Dataset\n", + "\n", + "Your dataset must be a JSON‐serializable list where each element is a dictionary with exactly two keys: **`fields`** and **`answer`**. The **`fields`** value should itself be a dictionary whose keys (e.g. `\"question\"`, `\"hint\"`, `\"term\"`, etc.) are **identical** across every entry and whose values are all strings. The **`answer`** value must also be a string.\n", + "\n", + "\n", + "You can validate your dataset using the `validate_dataset` method.\n", + "\n", + "If validation is not passed succesfully this are might be the reasons:\n", + "\n", + "\n", + "| Condition | Exception Raised (inner) | Outer Message |\n", + "| -------------------------------------- | ------------------------------------------------------------------ | -------------------------------- |\n", + "| Non-list top-level | N/A | `Dataset must be a list…` |\n", + "| Item not a dict | N/A | `Each item…must be a dictionary` |\n", + "| Wrong item keys | `ValueError(\"Each item must contain 'fields' and 'answer' keys.\")` | `Error in entry i` |\n", + "| `\"fields\"` not a dict | `ValueError(\"'fields' must be a dictionary.\")` | `Error in entry i` |\n", + "| Field name mismatch (extra or missing) | `ValueError(\"Unexpected keys…\")` or `ValueError(\"Missing keys…\")` | `Error in entry i` |\n", + "| Non-string field value | `ValueError(\"All values in 'fields' must be strings.\")` | `Error in entry i` |\n", + "| Invalid JSON file | `ValueError(\"Invalid JSON in file:…\")` | N/A |\n" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "id": "RMNFj5ZWCyW8", + "metadata": { + "id": "RMNFj5ZWCyW8" + }, + "outputs": [], + "source": [ + "dataset_local_path=\"./facility-synth-train/facility-train.json\" # local path to the dataset\n", + "\n", + "assert validate_dataset(dataset_local_path), \"Dataset not valid\"" + ] + }, + { + "cell_type": "markdown", + "id": "b2nsOfnjEK61", + "metadata": { + "id": "b2nsOfnjEK61" + }, + "source": [ + "### Remaining Config parameter" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "id": "ab10f2a9", + "metadata": { + "id": "ab10f2a9" + }, + "outputs": [], + "source": [ + "scenario = \"genai-optimizations\"\n", + "\n", + "base_prompt_template_registry = \"evaluate-base:0.0.1\" # name:version for the template in the registry\n", + "\n", + "dataset_secret=\"default\" # secret name in the object store you want to use to store the dataset\n", + "dataset_remote_path=\"datasets/facility-train.json\" # remote path in the object store to store the dataset\n", + "\n", + "reference_model = \"gpt-4o:2024-08-06\"\n", + "# Dictionary of models to optimize with their corresponding prompt template names under which the optimized prompt should be stored in the registry\n", + "targets = {\n", + " \"gemini-2.5-pro:001\": \"evaluate-base-gemini-2_5-pro:0.0.1\"\n", + "}\n", + "\n", + "# Metric to use for optimization\n", + "metric = \"JSON_Match\"\n" + ] + }, + { + "cell_type": "markdown", + "id": "461f1569", + "metadata": { + "id": "461f1569" + }, + "source": [ + "## Push Local Prompt to Registry" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "id": "af015c2a", + "metadata": { + "id": "af015c2a" + }, + "outputs": [ + { + "data": { + "text/html": [ + "
Prompt template evaluate-base already exists. Use update=True to update.\n",
+       "
\n" + ], + "text/plain": [ + "Prompt template evaluate-base already exists. Use \u001b[33mupdate\u001b[0m=\u001b[3;92mTrue\u001b[0m to update.\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
Prompt present in registry under id 3a9cfc20-f972-4720-8d0e-3ac48f77f391\n",
+       "
\n" + ], + "text/plain": [ + "Prompt present in registry under id \u001b[93m3a9cfc20-f972-4720-8d0e-3ac48f77f391\u001b[0m\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n",
+       "\n",
+       "=== Base Prompt ===\n",
+       "
\n" + ], + "text/plain": [ + "\n", + "\n", + "=== Base Prompt ===\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
╭──────────────────────────────────────────────── System Message ─────────────────────────────────────────────────╮\n",
+       " You are a helpful assistant                                                                                     \n",
+       "╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n",
+       "
\n" + ], + "text/plain": [ + "\u001b[31m╭─\u001b[0m\u001b[31m───────────────────────────────────────────────\u001b[0m\u001b[31m System Message \u001b[0m\u001b[31m────────────────────────────────────────────────\u001b[0m\u001b[31m─╮\u001b[0m\n", + "\u001b[31m│\u001b[0m You are a helpful assistant \u001b[31m│\u001b[0m\n", + "\u001b[31m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
╭───────────────────────────────────────────────── User Message ──────────────────────────────────────────────────╮\n",
+       " Giving the following message:                                                                                   \n",
+       " ---                                                                                                             \n",
+       " {{?input}}                                                                                                      \n",
+       " ---                                                                                                             \n",
+       " Extract and return a json with the follwoing keys and values:                                                   \n",
+       " - \"urgency\" as one of `high`, `medium`, `low`                                                                   \n",
+       " - \"sentiment\" as one of `negative`, `neutral`, `positive`                                                       \n",
+       " - \"categories\" Create a dictionary with categories as keys and boolean values (True/False), where the value     \n",
+       " indicates whether the category is one of the best matching support category tags from:                          \n",
+       " `emergency_repair_services`, `routine_maintenance_requests`, `quality_and_safety_concerns`,                     \n",
+       " `specialized_cleaning_services`, `general_inquiries`, `sustainability_and_environmental_practices`,             \n",
+       " `training_and_support_requests`, `cleaning_services_scheduling`, `customer_feedback_and_complaints`,            \n",
+       " `facility_management_issues`                                                                                    \n",
+       " Your complete message should be a valid json string that can be read directly and only contain the keys         \n",
+       " mentioned in the list above. Never enclose it in ```json...```, no newlines, no unnessacary whitespaces.        \n",
+       "╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n",
+       "
\n" + ], + "text/plain": [ + "\u001b[32m╭─\u001b[0m\u001b[32m────────────────────────────────────────────────\u001b[0m\u001b[32m User Message \u001b[0m\u001b[32m─────────────────────────────────────────────────\u001b[0m\u001b[32m─╮\u001b[0m\n", + "\u001b[32m│\u001b[0m Giving the following message: \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m --- \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m \u001b[1;35m{{?input}}\u001b[0m \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m --- \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m Extract and return a json with the follwoing keys and values: \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m - \"urgency\" as one of `high`, `medium`, `low` \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m - \"sentiment\" as one of `negative`, `neutral`, `positive` \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m - \"categories\" Create a dictionary with categories as keys and boolean values (True/False), where the value \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m indicates whether the category is one of the best matching support category tags from: \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m `emergency_repair_services`, `routine_maintenance_requests`, `quality_and_safety_concerns`, \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m `specialized_cleaning_services`, `general_inquiries`, `sustainability_and_environmental_practices`, \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m `training_and_support_requests`, `cleaning_services_scheduling`, `customer_feedback_and_complaints`, \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m `facility_management_issues` \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m Your complete message should be a valid json string that can be read directly and only contain the keys \u001b[32m│\u001b[0m\n", + "\u001b[32m│\u001b[0m mentioned in the list above. Never enclose it in ```json...```, no newlines, no unnessacary whitespaces. \u001b[32m│\u001b[0m\n", + "\u001b[32m╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\u001b[0m\n" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "base_template = load_prompt_template(base_prompt_template)\n", + "prompt_template_name_registry, _, prompt_template_version = base_prompt_template_registry.partition(\":\")\n", + "prompt = push_prompt_template(prompt_template=base_template,\n", + " prompt_template_name_registry=prompt_template_name_registry,\n", + " prompt_template_version=prompt_template_version,\n", + " scenario=scenario,\n", + " update=False\n", + ")\n", + "\n", + "print(f\"Prompt present in registry under id {prompt['id']}\")\n", + "\n", + "print('\\n\\n=== Base Prompt ===')\n", + "print_prompt_template(prompt[\"id\"])" + ] + }, + { + "cell_type": "markdown", + "id": "8df4d0a8", + "metadata": { + "id": "8df4d0a8" + }, + "source": [ + "## Push Local Dataset to Object Store and Create Artifact" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f46937ef", + "metadata": { + "id": "f46937ef" + }, + "outputs": [], + "source": [ + "artifact, dataset_path = upload_dataset(\n", + " secret=dataset_secret,\n", + " local_path=dataset_local_path,\n", + " remote_path=dataset_remote_path,\n", + " expected_keys=base_template.placeholders,\n", + " scenario=scenario,\n", + " overwrite=True,\n", + " allow_bucket_root=True\n", + ")\n", + "\n", + "print(f\"Dataset uploaded to {artifact.url}/{dataset_path} -> Artifact ID: {artifact.id}\")\n" + ] + }, + { + "cell_type": "markdown", + "id": "ab4ec0c5", + "metadata": { + "id": "ab4ec0c5" + }, + "source": [ + "## Create Prompt Optimizer Config" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4PuS58nc8i7w", + "metadata": { + "id": "4PuS58nc8i7w" + }, + "outputs": [], + "source": [ + "configuration_id = create_config(metric=metric,\n", + " reference_model=reference_model,\n", + " targets=targets,\n", + " dataset_path=dataset_path,\n", + " scenario=scenario,\n", + " prompt=prompt\n", + " )\n" + ] + }, + { + "cell_type": "markdown", + "id": "5dde0e00", + "metadata": { + "id": "5dde0e00" + }, + "source": [ + "## Start Prompt Optimizer" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "aa02b617", + "metadata": { + "id": "aa02b617" + }, + "outputs": [], + "source": [ + "response = client.ai_core_client.execution.create(\n", + " configuration_id = configuration_id, # Change this value.\n", + " resource_group = \"default\"\n", + ")\n", + "\n", + "execution_id = response.id\n", + "print('Execution started with ID:', execution_id)" + ] + }, + { + "cell_type": "markdown", + "id": "aSkihvDXKcAv", + "metadata": { + "id": "aSkihvDXKcAv" + }, + "source": [ + "## Check Execution Status" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "96ee23e5", + "metadata": { + "id": "96ee23e5" + }, + "outputs": [], + "source": [ + "result = fetch_results(execution_id)\n", + "print_result(result)" + ] + } + ], + "metadata": { + "colab": { + "collapsed_sections": [ + "Pd3wsKls4OS5" + ], + "provenance": [] + }, + "kernelspec": { + "display_name": "venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.4" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/tutorials/application-frontend-cli/application-frontend-cli.md b/tutorials/application-frontend-cli/application-frontend-cli.md index 3c13690c21..0528c02ee2 100644 --- a/tutorials/application-frontend-cli/application-frontend-cli.md +++ b/tutorials/application-frontend-cli/application-frontend-cli.md @@ -12,9 +12,10 @@ author_profile: https://github.com/tahelMilstein Learn how to create and deploy your first "Hello World" application using Application Frontend Service and the afctl CLI, including version management basics. ## Prerequisites - -- You have an account in SAP BTP Trial landscape us10-trial. If you don't have one yet, follow the instructions in [Get a Free Account on SAP BTP Trial](hcp-create-trial-account) -- Completed the setup steps in the [Application frontend trial setup](../application-frontend-trial-setup/application-frontend-trial-setup.md) guide. + - SAP Business Technology Platform subaccount + - Cloud Foundry environment enabled in subaccount + - [Subscription to Application Frontend service](application-frontend-trial-setup) + - Subscription to SAP Business Application Studio ## You will learn - How to log in to **Application Frontend Service** using the CLI. @@ -23,8 +24,28 @@ author_profile: https://github.com/tahelMilstein - Activate and manage different application versions using `afctl`. --- +### Enable Application Frontend CLI locally or in SAP Business Application Studio + +#### Option 1 - Create SAP Business Application Studio Dev Space: +
    +
  1. Navigate to BTP Cockpit subaccount.
  2. +
  3. Navigate to Services > Instances and Subscriptions
  4. +
  5. In the Subscriptions table click on SAP Business Application Studio link. +
+ +![Open SAP Business Application Studio from BTP Cockpit](open-bas-1.png) + +
    +
  1. Click CreateDevSpace.
  2. +
  3. Enter Dev Space name (e.g. MyDevSpace).
  4. +
  5. Select SAP Fiori kind of application.
  6. +
  7. Select Application Frontend Service CLI additional SAP extension.
  8. +
  9. Click Create Dev Space.
  10. +
+ +![Create Dev Space](create-bas-ws-1.png) -### Install Application Frontend CLI +#### Option 2 - Install Application Frontend CLI locally Before you start, make sure you have the required tools installed locally. diff --git a/tutorials/application-frontend-cli/create-bas-ws-1.png b/tutorials/application-frontend-cli/create-bas-ws-1.png new file mode 100644 index 0000000000..a4551eecb9 Binary files /dev/null and b/tutorials/application-frontend-cli/create-bas-ws-1.png differ diff --git a/tutorials/application-frontend-cli/open-bas-1.png b/tutorials/application-frontend-cli/open-bas-1.png new file mode 100644 index 0000000000..e0dab28957 Binary files /dev/null and b/tutorials/application-frontend-cli/open-bas-1.png differ diff --git a/tutorials/application-frontend-mta/trial-destinations-1.png b/tutorials/application-frontend-mta/trial-destinations-1.png index 043e50041c..4a42aeded5 100644 Binary files a/tutorials/application-frontend-mta/trial-destinations-1.png and b/tutorials/application-frontend-mta/trial-destinations-1.png differ diff --git a/tutorials/btp-terraform-get-started/btp-terraform-get-started.md b/tutorials/btp-terraform-get-started/btp-terraform-get-started.md index 73ae385b81..fbfe561071 100644 --- a/tutorials/btp-terraform-get-started/btp-terraform-get-started.md +++ b/tutorials/btp-terraform-get-started/btp-terraform-get-started.md @@ -39,7 +39,7 @@ terraform { required_providers { btp = { source = "SAP/btp" - version = "~>1.15.0" + version = "~>1.18.1" } } } diff --git a/tutorials/cp-cf-create-destination/cp-cf-create-destination.md b/tutorials/cp-cf-create-destination/cp-cf-create-destination.md index 6cfda7a368..79d3f9f527 100644 --- a/tutorials/cp-cf-create-destination/cp-cf-create-destination.md +++ b/tutorials/cp-cf-create-destination/cp-cf-create-destination.md @@ -36,8 +36,7 @@ The Northwind OData services are available in several versions. Most tutorials c ### Enter your SAP BTP account - For (free) Trial Accounts: -- For Free Tier and Enterprise Accounts on **feature set A**: -- For Free Tier and Enterprise Accounts on **feature set B**: +- For Free Tier and Enterprise Accounts: ### Access your subaccount diff --git a/tutorials/cp-cf-understand-application-lifecycle/cp-cf-understand-application-lifecycle.md b/tutorials/cp-cf-understand-application-lifecycle/cp-cf-understand-application-lifecycle.md index f5507fd4c6..cd89128e77 100644 --- a/tutorials/cp-cf-understand-application-lifecycle/cp-cf-understand-application-lifecycle.md +++ b/tutorials/cp-cf-understand-application-lifecycle/cp-cf-understand-application-lifecycle.md @@ -86,7 +86,7 @@ Every application stops running at some point, whether from a normal shutdown, a - _Crash_ - If an application instance crashes, Cloud Foundry is designed to [automatically try to restart it](https://docs.cloudfoundry.org/devguide/deploy-apps/app-lifecycle.html#crash-events). Application crashes are usually due to an issue with the application itself, though in rare cases a crash could be caused by a problem with some underlying Cloud Foundry component(s). In such a cases, it is important to look at the logs, events and metrics to determine the cause of the crash, and to discern whether or not Cloud Foundry can recover on its own, or if human intervention is required. -- _Shutdown_ - Certain [actions](https://docs.cloudfoundry.org/devguide/deploy-apps/app-lifecycle.html#shutdown) will cause Cloud Foundry to shutdown an application instance. On shutdown, Cloud Foundry sends the app process a SIGTERM, giving the application 10 seconds to stop on its own before being forcibly terminated via SIGKILL. This 10 second limit is a system-wide setting, and is also the default configuration of the SAP BTP. An application developer should keep this in mind when creating their app so that it can handle shutdowns gracefully. +- _Shutdown_ - Certain [actions](https://docs.cloudfoundry.org/devguide/deploy-apps/app-lifecycle.html#shutdown) will cause Cloud Foundry to shutdown an application instance. On shutdown, Cloud Foundry sends the app process a SIGTERM, giving the application by default 10 seconds to stop on its own before being forcibly terminated via SIGKILL. This is a system-wide setting, and the configuration of the SAP BTP is 60 seconds. An application developer should keep this in mind when creating their app so that it can handle shutdowns gracefully. - _Evacuation_ - In some cases, the virtual machines (VMs) that run the containers hosting an app instance may need to be restarted. For example, this may happen if underlying VM image or Cloud Foundry are updated. Through a process called [evacuation](https://docs.cloudfoundry.org/devguide/deploy-apps/app-lifecycle.html#evacuation), Cloud Foundry automatically relocates an app instance to another VM before restarting the VM that previously ran that app instance. When this occurs the app instance is recreated, and once the new app instance reports itself as healthy, the old instance is shut down. This may cause a brief period of time where duplicates of an app can be seen. If an app only has one instance, it may become unavailable during this process (if the new app instance doesn't report as healthy within the default 10 minute evacuation timeout). diff --git a/tutorials/data-lake-file-containers-hdlfscli/data-lake-file-containers-hdlfscli.md b/tutorials/data-lake-file-containers-hdlfscli/data-lake-file-containers-hdlfscli.md index 96cb1ccdbb..a88f904cdf 100644 --- a/tutorials/data-lake-file-containers-hdlfscli/data-lake-file-containers-hdlfscli.md +++ b/tutorials/data-lake-file-containers-hdlfscli/data-lake-file-containers-hdlfscli.md @@ -118,7 +118,6 @@ Some HDLFSCLI help documentation should appear if it is successfully installed a [OPTION END] - ### Generate Certificates To connect the HDLFSCLI to an SAP HANA, data lake Files container, a certificate will need to be generated to make a secure connection. Below are the steps required to create a self-signed certificate to get started using the HDLFSCLI. You will require an installation of OpenSSL. Use your preferred Linux package installer to install OpenSSL if it is not already installed. If you're using a Windows machine, then Windows Subsystem for Linux (WSL) will have OpenSSL installed. Alternatively, OpenSSL can be installed for Windows from [here](https://slproweb.com/products/Win32OpenSSL.html). @@ -127,6 +126,18 @@ Then, follow these steps to creating your self-signed certificate. Make sure the certificate fields are not all exactly the same between the Certificate Authority (CA) and client certificates. Otherwise, it is assumed to be a self-signed cert and the cert validation below will fail. +Create a folder. + +```Shell (Microsoft Windows) +mkdir %HOMEPATH%\certs +cd %HOMEPATH%\certs +``` + +```Shell (Linux or Mac) +mkdir -p $HOME/certs +cd $HOME/certs +``` + Create a private key for the CA (2048 bits). ```Shell @@ -141,7 +152,7 @@ openssl req -x509 -new -key ca.key -days 200 -out ca.crt Create a signing request for the client certificate. -Provide at least a common name and fill other fields as desired. Also, leave the email-Id field blank. +Provide at least a common name and fill other fields as desired. Leave the email-Id field blank. The Common Name must be different from the one used for the CA public certificate. ```Shell openssl req -new -nodes -newkey rsa:2048 -out client.csr -keyout client.key diff --git a/tutorials/data-lake-file-containers-restapi-node/data-lake-file-containers-restapi-node.md b/tutorials/data-lake-file-containers-restapi-node/data-lake-file-containers-restapi-node.md index d5638c0163..622202b64d 100644 --- a/tutorials/data-lake-file-containers-restapi-node/data-lake-file-containers-restapi-node.md +++ b/tutorials/data-lake-file-containers-restapi-node/data-lake-file-containers-restapi-node.md @@ -384,7 +384,7 @@ Upon attempting to access the files via the command line, an error message indic ### Explore and Experiment! -These endpoints along with the others documented in the [REST API reference](https://help.sap.com/doc/9d084a41830f46d6904fd4c23cd4bbfa/QRC_4_2021/en-US/html/index.html) can be used by any application to manipulate or manage the files in the HANA Data Lake File Container. Other endpoints not demonstrated here include APPEND, GETRESTORSNAPSHOT, WHOAMI, RENAME, and RESTORESNAPSHOT. +These endpoints along with the others documented in the [REST API reference](https://help.sap.com/doc/9d084a41830f46d6904fd4c23cd4bbfa/latest/en-US/index.html) can be used by any application to manipulate or manage the files in the HANA Data Lake File Container. Other endpoints not demonstrated here include APPEND, GETRESTORSNAPSHOT, WHOAMI, RENAME, and RESTORESNAPSHOT. To replicate these requests in other languages or HTTP tools, copy the request headers, FILES REST API + request URL, and body contents. diff --git a/tutorials/data-lake-file-containers-restapi/data-lake-file-containers-restapi.md b/tutorials/data-lake-file-containers-restapi/data-lake-file-containers-restapi.md index 8a5725812a..ad6d127bc8 100644 --- a/tutorials/data-lake-file-containers-restapi/data-lake-file-containers-restapi.md +++ b/tutorials/data-lake-file-containers-restapi/data-lake-file-containers-restapi.md @@ -21,7 +21,7 @@ primary_tag: software-product-function>sap-hana-cloud--data-lake - Users without access to the HDLFSCLI can use the REST API to perform File Store operations. ## Intro -SAP HANA data lake file containers are accessible via a REST API. The official REST API reference can be found [here](https://help.sap.com/doc/9d084a41830f46d6904fd4c23cd4bbfa/latest/en-US/html/index.html). However, below are some python demonstrations using some of the common endpoints. Although this tutorial doesn't cover other endpoint testing tools, these endpoints and the contents of the request body can be used in any other http interface such as PostMan or CURL. +SAP HANA data lake file containers are accessible via a REST API. The official REST API reference can be found [here](https://help.sap.com/doc/9d084a41830f46d6904fd4c23cd4bbfa/latest/en-US/index.html). However, below are some python demonstrations using some of the common endpoints. Although this tutorial doesn't cover other endpoint testing tools, these endpoints and the contents of the request body can be used in any other http interface such as PostMan or CURL. --- @@ -270,7 +270,7 @@ Upon attempting to access the files via the command line, an error message indic ### Explore and Experiment! -These endpoints along with the others documented in the [REST API reference](https://help.sap.com/doc/9d084a41830f46d6904fd4c23cd4bbfa/latest/en-US/html/index.html) can be used by any application to manipulate or manage the files in the HANA Data Lake File Container. Other endpoints not demonstrated here include DELETE, APPEND, GETRESTORSNAPSHOT, WHOAMI, RENAME, and RESTORESNAPSHOT. +These endpoints along with the others documented in the [REST API reference](https://help.sap.com/doc/9d084a41830f46d6904fd4c23cd4bbfa/latest/en-US/index.html) can be used by any application to manipulate or manage the files in the HANA Data Lake File Container. Other endpoints not demonstrated here include DELETE, APPEND, GETRESTORSNAPSHOT, WHOAMI, RENAME, and RESTORESNAPSHOT. To replicate these requests in other languages or HTTP tools, copy the request headers, FILES REST API + request URL, and body contents. diff --git a/tutorials/data-lake-schedule-data-movement/data-lake-schedule-data-movement.md b/tutorials/data-lake-schedule-data-movement/data-lake-schedule-data-movement.md index 2903d108d3..9cbb48267d 100644 --- a/tutorials/data-lake-schedule-data-movement/data-lake-schedule-data-movement.md +++ b/tutorials/data-lake-schedule-data-movement/data-lake-schedule-data-movement.md @@ -182,7 +182,7 @@ CREATE TABLE HDLRE_CUSTOMER ); ``` -Here I will break down [creating an event](https://help.sap.com/viewer/19b3964099384f178ad08f2d348232a9/2021_4_QRC/en-US/a617091784f210158db2e43f0733ae5d.html?q=CREATE%20EVENT) in HDLRE. In the following SQL you create an event called `PullCustomerDataFromHANA`. Immediately after you create a schedule `SchedulePullCustomerDataFromHANA`. The schedule is scheduled to start at 12:00am and repeat the event every Sunday. Below the "HANDLER" you define the SQL script to be executed. The script creates a local temporary table (this table will be lost once the connection is dropped) and then inserts the data from that the temporary table into your `HDLRE_CUSTOMER` table which persists inside of your HDLRE instance. So, every Sunday the event is copying the data from your HANA table to your HDLRE table. +Here I will break down [creating an event](https://help.sap.com/docs/hana-cloud-data-lake/sql-reference-for-data-lake-relational-engine/create-event-statement-for-data-lake-relational-engine) in HDLRE. In the following SQL you create an event called `PullCustomerDataFromHANA`. Immediately after you create a schedule `SchedulePullCustomerDataFromHANA`. The schedule is scheduled to start at 12:00am and repeat the event every Sunday. Below the "HANDLER" you define the SQL script to be executed. The script creates a local temporary table (this table will be lost once the connection is dropped) and then inserts the data from that the temporary table into your `HDLRE_CUSTOMER` table which persists inside of your HDLRE instance. So, every Sunday the event is copying the data from your HANA table to your HDLRE table. ```SQL CREATE EVENT PullCustomerDataFromHANA diff --git a/tutorials/data-lake-text-search/data-lake-text-search.md b/tutorials/data-lake-text-search/data-lake-text-search.md index bc2d0f05dd..aa8df6d61d 100644 --- a/tutorials/data-lake-text-search/data-lake-text-search.md +++ b/tutorials/data-lake-text-search/data-lake-text-search.md @@ -236,7 +236,7 @@ The above creates the index on both columns using the configuration that you def ### Query the Table Using the CONTAINS function -To make use of the text index that you created above, you can use the CONTAINS function. The CONTAINS function when used on a text index allows you to search your text columns for key words, partial key words (using * operator), and words that are near each other. Learn more about what's possible with text searching in the (SAP Help documentation)[https://help.sap.com/viewer/a8937bea84f21015a80bc776cf758d50/2021_4_QRC/en-US/a5f9128284f21015be99d1a8e8925c94.html?q=CONTAINS%20text%20search]. Try a simple query on your index. +To make use of the text index that you created above, you can use the CONTAINS function. The CONTAINS function when used on a text index allows you to search your text columns for key words, partial key words (using * operator), and words that are near each other. Learn more about what's possible with text searching in the (SAP Help documentation)[https://help.sap.com/docs/hana-cloud-data-lake/administration-guide-for-data-lake-relational-engine/contains-conditions-for-full-text-searches]. Try a simple query on your index. ```SQL SELECT Actor1Geo_FullName, Actor2Geo_FullName FROM EVENT CONTAINS(EVENT.Actor1Geo_FullName, 'United States'); @@ -304,7 +304,7 @@ Notice, all the entries with the closest match to the exact search term have the ### Knowledge check -You now know how to create a text index on a `text` or `varchar` column, configure that text index, and use the CONTAINS function to perform a text search on your data. Be sure to check out the SAP Help documentation for more information on [text indexes](https://help.sap.com/viewer/a8937bea84f21015a80bc776cf758d50/2021_4_QRC/en-US/a5efed9884f210158fd8bd686e7be818.html) and performing [text search](https://help.sap.com/viewer/a8937bea84f21015a80bc776cf758d50/2021_4_QRC/en-US/a5f8abf084f2101580319c6ef971d09c.html). +You now know how to create a text index on a `text` or `varchar` column, configure that text index, and use the CONTAINS function to perform a text search on your data. Be sure to check out the SAP Help documentation for more information on [text indexes](https://help.sap.com/docs/hana-cloud-data-lake/administration-guide-for-data-lake-relational-engine-sap-hana-db-managed/text-indexes-in-data-lake-relational-engine-sap-hana-db-managed). diff --git a/tutorials/deploy-nodejs-application-kyma/deploy-nodejs-application-kyma.md b/tutorials/deploy-nodejs-application-kyma/deploy-nodejs-application-kyma.md index 0e55ba99a4..9b7e65953d 100644 --- a/tutorials/deploy-nodejs-application-kyma/deploy-nodejs-application-kyma.md +++ b/tutorials/deploy-nodejs-application-kyma/deploy-nodejs-application-kyma.md @@ -176,6 +176,8 @@ spec: value: "8080" - name: TMPDIR value: /tmp + - name: BP_NODE_OPTIMIZE_MEMORY + value: "false" image: /multitenant-kyma-backend:v1 # replace with your Docker Hub account name name: kyma-multitenant-node-multitenancy ports: diff --git a/tutorials/fiori-tools-cap-create-application/application-info-page.png b/tutorials/fiori-tools-cap-create-application/application-info-page.png index 60b99853bf..dcc07a1b76 100644 Binary files a/tutorials/fiori-tools-cap-create-application/application-info-page.png and b/tutorials/fiori-tools-cap-create-application/application-info-page.png differ diff --git a/tutorials/fiori-tools-cap-create-application/choose-tile-list-report-new.png b/tutorials/fiori-tools-cap-create-application/choose-tile-list-report-new.png deleted file mode 100644 index 6532f858cb..0000000000 Binary files a/tutorials/fiori-tools-cap-create-application/choose-tile-list-report-new.png and /dev/null differ diff --git a/tutorials/fiori-tools-cap-create-application/choose-tile-list-report.png b/tutorials/fiori-tools-cap-create-application/choose-tile-list-report.png index d30dcf3aac..37d8de209b 100644 Binary files a/tutorials/fiori-tools-cap-create-application/choose-tile-list-report.png and b/tutorials/fiori-tools-cap-create-application/choose-tile-list-report.png differ diff --git a/tutorials/fiori-tools-cap-create-application/fiori-tools-cap-create-application.md b/tutorials/fiori-tools-cap-create-application/fiori-tools-cap-create-application.md index 7f9178bf6d..ff6c9d6e8a 100644 --- a/tutorials/fiori-tools-cap-create-application/fiori-tools-cap-create-application.md +++ b/tutorials/fiori-tools-cap-create-application/fiori-tools-cap-create-application.md @@ -3,7 +3,7 @@ title: Create an SAP Fiori Elements Application description: Create an SAP Fiori elements application of type list report object page based on the SAP Cloud Application Programming Model. auto_validation: true time: 15 -tags: [ software-product>sap-fiori, software-product>sap-fiori-tools, tutorial>beginner, software-product>sap-fiori, software-product>sap-business-application-studio, software-product-function>sap-cloud-application-programming-model, software-product>sap-business-technology-platform] +tags: [ software-product-function>sap-fiori, software-product-function>sap-fiori-tools, tutorial>beginner, software-product-function>sap-fiori, software-product-function>sap-business-application-studio, software-product-function>sap-cloud-application-programming-model, software-product-function>sap-business-technology-platform ] primary_tag: software-product>sap-fiori contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>https://github.com/jo-fiess ] --- @@ -21,7 +21,7 @@ contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>ht 2. Select the tile **List Report Page** and click **Next**. - ![Choose tile "List Report Object Page"](choose-tile-list-report.png) + !![Choose tile "List Report Object Page"](choose-tile-list-report.png) 3. Now you connect the application template with your OData service. The OData service you use for this example was already prepared during the previous tutorial: [Prepare Your Development Environment](fiori-tools-cap-prepare-dev-env) @@ -33,17 +33,27 @@ contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>ht When finished, click **Next**. - ![Select service related parameters](enter-service-parameters.png) + !![Select service related parameters](enter-service-parameters.png) 4. For your application you need to choose the main entity set from the OData service. Objects of this type will be displayed in the list report. In your application, start with **Incidents**. As your application will not have a sub-object page, you do not need a navigation entity. Leave **Yes** selected for the prompt **Automatically add table columns to the list page and a section to the object page if none already exists?**. + Leave the selected **Table Type**. + When finished, click **Next**. -5. Maintain specific attributes of the application project as follows (Minimum SAPUI5 version is updated automatically): +5. Maintain specific attributes of the application project as follows: + + Module Name: `incidents` + + Application Title: `Incidents Management` - ![Provide project attributes](provide-project-attributes.png) + Application Namespace: `sap.fe.demo` + + Keep the rest as default. + + !![Provide project attributes](provide-project-attributes.png) >Be sure to choose exactly the **Module name** and the **Application namespace** as shown above, because these are referenced in the sample code. @@ -53,11 +63,11 @@ contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>ht After the project is generated, an Application Information page is shown giving you an overview of project details and tasks that you may perform on this project. It is recommended that you keep this page open as it will be used in other steps. You can open it any time using selecting menu **View->Command Palette...** and select **Fiori: Open Application Info** - ![Application Information page](application-info-page.png) + !![Application Information page](application-info-page.png) You will also see a new folder `incidents` inside the `app` folder. - ![Review the generated artifacts](review-generated-artifacts.png) + !![Review the generated artifacts](review-generated-artifacts.png) [DONE] [ACCORDION-END] @@ -67,17 +77,19 @@ contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>ht Your SAP Fiori elements application needs a server to run. This server is provided by the command line client and development toolkit for the SAP Cloud Application Programming Model. The setup for using the server was done in the previous tutorial [Prepare Your Development Environment](fiori-tools-cap-prepare-dev-env). 1. Select the tile **Preview Application** from **Application Information** page. - ![Select watch script](preview-application.png) + !![Select watch script](preview-application.png) 2. When the quick pick is shown, select **watch-incidents** script - ![Select watch script](select-watch-script.png) + !![Select watch script](select-watch-script.png) + + Your app should now start in a new window. If not, you can click on the link from the terminal or click on **Open in New Tab** as shown below. A dialog window may pop up and you can choose the option as follows. Click **Open in New Tab**. - ![Click button Open in New Tab on popup](click-open-in-new-tab.png) + !![Click button Open in New Tab on popup](click-open-in-new-tab.png) >Please check for a browser popup blocker in case the popup windows are not visible. @@ -85,7 +97,7 @@ Your SAP Fiori elements application needs a server to run. This server is provid Press **Go**. The list report table will then show the data from the sample service. - ![List Report with items](list-report-go.png) + !![List Report with items](list-report-go.png) Filter fields, actions, and table columns are defined by the annotations in the Core Data Service (CDS) files. These files are part of the OData service definition. diff --git a/tutorials/fiori-tools-cap-create-application/preview-application.png b/tutorials/fiori-tools-cap-create-application/preview-application.png index 4b444b68a7..e9c6328bf9 100644 Binary files a/tutorials/fiori-tools-cap-create-application/preview-application.png and b/tutorials/fiori-tools-cap-create-application/preview-application.png differ diff --git a/tutorials/fiori-tools-cap-create-application/provide-project-attributes.png b/tutorials/fiori-tools-cap-create-application/provide-project-attributes.png index b2a1908bf7..c8e1b1edb5 100644 Binary files a/tutorials/fiori-tools-cap-create-application/provide-project-attributes.png and b/tutorials/fiori-tools-cap-create-application/provide-project-attributes.png differ diff --git a/tutorials/fiori-tools-cap-create-application/review-generated-artifacts.png b/tutorials/fiori-tools-cap-create-application/review-generated-artifacts.png index df21533050..111d72672d 100644 Binary files a/tutorials/fiori-tools-cap-create-application/review-generated-artifacts.png and b/tutorials/fiori-tools-cap-create-application/review-generated-artifacts.png differ diff --git a/tutorials/fiori-tools-cap-create-application/select-watch-script.png b/tutorials/fiori-tools-cap-create-application/select-watch-script.png index d730b41def..d04462fc24 100644 Binary files a/tutorials/fiori-tools-cap-create-application/select-watch-script.png and b/tutorials/fiori-tools-cap-create-application/select-watch-script.png differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/fiori-tools-cap-modify-list-report.md b/tutorials/fiori-tools-cap-modify-list-report/fiori-tools-cap-modify-list-report.md index 527aa603ff..bfe805424e 100644 --- a/tutorials/fiori-tools-cap-modify-list-report/fiori-tools-cap-modify-list-report.md +++ b/tutorials/fiori-tools-cap-modify-list-report/fiori-tools-cap-modify-list-report.md @@ -3,7 +3,7 @@ author_name: Dimitri Herber author_profile: https://github.com/fakirdi auto_validation: true time: 15 -tags: [products>sap-fiori-elements, products>sap-fiori-tools, tutorial>beginner, products>sap-fiori, products>sap-business-application-studio, software-product-function>sap-cloud-application-programming-model, products>sap-business-technology-platform] +tags: [software-product-function>sap-fiori-elements, products>sap-fiori-tools, tutorial>beginner, products>sap-fiori, products>sap-business-application-studio, software-product-function>sap-cloud-application-programming-model, products>sap-business-technology-platform] primary_tag: products>sap-fiori parser: v2 contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>https://github.com/jo-fiess ] @@ -23,34 +23,37 @@ contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>ht - How to configure the list report to load data automatically - In SAP Fiori elements applications, UI annotations are used to refine the user interface. All annotations are documented in the [OData 4.0 Vocabularies](https://sap.github.io/odata-vocabularies/vocabularies/UI.html). With SAP Fiori Tools - Application modeler, you don't have to be an annotation expert, as the necessary UI annotations are automatically generated when you add or modify the UI elements for your application. You can easily navigate to the annotations behind the UI elements to review and/or manually update them in the code editor. - ### Add filter field to the filter bar In this step, you will learn how to add filters to the List Report page of your application using the Page Editor and see the auto generated annotation code in the local annotation file. -1. From the Application Information page, click on the **ListReport** page - +1. From the Application Information page, click on the **ListReport** page. + + ![Open List Report Page](t3-open-list-report-page-app-info.png) The Page Editor view opens up listing all the major page elements in the application outline structure. 2. Press the **+** icon in the **Filter Fields** sub-node of the **Filter Bar** node on the outline. It becomes visible, once you hover over the sub-node. + ![Add Filter Fields Icon](t3-add-filter-fields.png) 3. When prompted, choose **category_code** as **Filter Field** and press **Add**. - ![Add Filter Fields Icon](t3-add-filter-fields-dialog.png) + + ![Add Filter Fields Icon](t3-add-filter-fields-dialog.png) - The new filter field is added to the filter bar. The application preview (if started) is automatically refreshed to display it. + The new filter field is added to the filter bar. The application preview (if started) is automatically refreshed to display it. ![New Filter Field](t3-annotation-selection-field-category.PNG) + > This is enabled by copying the `UI.SelectionFields` annotation to the local annotation file and updating it with `category_code` property in the background. You can press ![Navigate to source code](t3-navigate-source-code.png) (Navigate to source code) icon displayed in the **Filter Fields** sub-node on hover to see the updated annotation in the local annotation file. + ```CDS SelectionFields : [ incidentStatus_code, @@ -80,11 +83,13 @@ In this step, you will learn how to enhance the value help defined in the projec - In the Properties pane displayed to the right of the outline, find the **Display Type** property. Currently it shows **Value Help (base layer)**, indicating that value help is defined in the layer lower than this app. To enhance the value help settings, choose **Value Help** instead. + ![Filter Properties](t3-initial-load-filter-properties.png) - - In the pop-up dialog, make sure **Display as Dropdown** is switched on, press **Add Column** under **Results List**, choose **desc** in the **Property** column and press **Apply**. + - In the pop-up dialog, make sure **Display as Dropdown** is switched on, press **Add Column** under **Results List**, choose **desc** in the **Property** column and press **Apply**. - ![Value Help Dialog](t3-value-help-dialog-updated.png) + + ![Value Help Dialog](t3-value-help-dialog-updated.png) 3. Application preview is refreshed and displays the **Category** filter as drop-down list and shows the value help with the description column. @@ -93,17 +98,19 @@ In this step, you will learn how to enhance the value help defined in the projec ### Configure the application to load data automatically -In this step, you will learn how to configure the application to load data automatically when started without the need of pressing the **Go** button. - -1. In the Page Editor, select the **table** node on the outline to show the properties of the table. +In this step, you will learn how to configure the application to load data automatically when started without the need of pressing the **Go** button. - ![Table Properties](t3-initial-load-table-properties.PNG) -2. In the Properties pane, locate the **Initial Load** property and set it to **Enabled**. +1. In the Page Editor, select the **table** node on the outline to show the properties of the table. +2. In the Properties pane, locate the **Initial Load** property and set it to **Enabled**. + ![Initial Load](t3-initial-load-table-properties-initial-load-true.PNG) + >To easily find the specific property in the Properties pane, you can use the Search Properties field in the top right corner. -1. After the application is refreshed, the table data will be loaded automatically. +3. After the application is refreshed, the table data will be loaded automatically. + + ![Add Column](t3-initial-load-table-preview.png) @@ -113,18 +120,21 @@ In this step, you will learn how to enhance the list report table with additiona 1. In the Page Editor, press the **+** icon in the **Column** sub-node of the **Table** node on the outline and choose **Add Basic Columns**. + ![Add Column](t3-add-column.png) 2. When prompted, choose **title** in the **Columns** field + ![Add Column Dialog](t3-add-title-column.png) > You can filter the list of suggestions by typing a few characters of the option you want to choose. This will filter the list of suggestions. 3. Press **Add**. - The application preview refreshes and displays the column added to the table. + The application preview refreshes and displays the column added to the table. + ![Annotation Cursor](t3-annotation-line-item-LR.PNG) > If your preview window is not wide enough, the last column is not visible unless its Importance property is set to High or Medium. diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-add-column.png b/tutorials/fiori-tools-cap-modify-list-report/t3-add-column.png index d3cc46f14c..c9b9c2199b 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-add-column.png and b/tutorials/fiori-tools-cap-modify-list-report/t3-add-column.png differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-add-filter-fields-dialog.png b/tutorials/fiori-tools-cap-modify-list-report/t3-add-filter-fields-dialog.png index 71a65bdd8a..e74b0b516b 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-add-filter-fields-dialog.png and b/tutorials/fiori-tools-cap-modify-list-report/t3-add-filter-fields-dialog.png differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-add-filter-fields.png b/tutorials/fiori-tools-cap-modify-list-report/t3-add-filter-fields.png index 44b0bb1ee1..bc979248cf 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-add-filter-fields.png and b/tutorials/fiori-tools-cap-modify-list-report/t3-add-filter-fields.png differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-add-title-column.png b/tutorials/fiori-tools-cap-modify-list-report/t3-add-title-column.png index a061f9a903..1128f12d3e 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-add-title-column.png and b/tutorials/fiori-tools-cap-modify-list-report/t3-add-title-column.png differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-annotation-selection-field-category.PNG b/tutorials/fiori-tools-cap-modify-list-report/t3-annotation-selection-field-category.PNG index a040195692..808fe230e8 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-annotation-selection-field-category.PNG and b/tutorials/fiori-tools-cap-modify-list-report/t3-annotation-selection-field-category.PNG differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-filter-properties.png b/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-filter-properties.png index 11a2328be5..9d281f6277 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-filter-properties.png and b/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-filter-properties.png differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-table-properties-initial-load-true.PNG b/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-table-properties-initial-load-true.PNG index 82f2d351d0..64b4336716 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-table-properties-initial-load-true.PNG and b/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-table-properties-initial-load-true.PNG differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-table-properties.PNG b/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-table-properties.PNG deleted file mode 100644 index 79de0a8f05..0000000000 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-initial-load-table-properties.PNG and /dev/null differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-open-list-report-page-app-info.png b/tutorials/fiori-tools-cap-modify-list-report/t3-open-list-report-page-app-info.png index d4d8043f9c..2a8004a3a7 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-open-list-report-page-app-info.png and b/tutorials/fiori-tools-cap-modify-list-report/t3-open-list-report-page-app-info.png differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-value-help-dialog-updated.png b/tutorials/fiori-tools-cap-modify-list-report/t3-value-help-dialog-updated.png index da59ce04bc..5b57450df8 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-value-help-dialog-updated.png and b/tutorials/fiori-tools-cap-modify-list-report/t3-value-help-dialog-updated.png differ diff --git a/tutorials/fiori-tools-cap-modify-list-report/t3-value-help-icon2.PNG b/tutorials/fiori-tools-cap-modify-list-report/t3-value-help-icon2.PNG index 2563a97ba6..c43cd1f327 100644 Binary files a/tutorials/fiori-tools-cap-modify-list-report/t3-value-help-icon2.PNG and b/tutorials/fiori-tools-cap-modify-list-report/t3-value-help-icon2.PNG differ diff --git a/tutorials/fiori-tools-cap-modify-object-page/fiori-tools-cap-modify-object-page.md b/tutorials/fiori-tools-cap-modify-object-page/fiori-tools-cap-modify-object-page.md index cff9e4e342..8c5a3b2b88 100644 --- a/tutorials/fiori-tools-cap-modify-object-page/fiori-tools-cap-modify-object-page.md +++ b/tutorials/fiori-tools-cap-modify-object-page/fiori-tools-cap-modify-object-page.md @@ -3,7 +3,7 @@ author_name: Dimitri Herber author_profile: https://github.com/fakirdi auto_validation: true time: 15 -tags: [ software-product>sap-fiori-elements, software-product>sap-fiori-tools, tutorial>beginner, software-product>sap-fiori, software-product>sap-business-application-studio, software-product-function>sap-cloud-application-programming-model, software-product>sap-business-technology-platform] +tags: [ software-product-function>sap-fiori-elements, software-product>sap-fiori-tools, tutorial>beginner, software-product>sap-fiori, software-product>sap-business-application-studio, software-product-function>sap-cloud-application-programming-model, software-product>sap-business-technology-platform] primary_tag: software-product>sap-fiori parser: v2 contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>https://github.com/jo-fiess ] @@ -28,25 +28,29 @@ contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>ht 1. Open the object page of your application by clicking one of the incidents within the list report table. You´ll see the field group **Incident Details** on the **Incident Overview** section. + ![Annotation Cursor](t4-annotation-section-field-1.PNG) 2. Open the Page Editor for the object page of your app: from the Application Information page, click on **ObjectPage** within Pages. - ![Open Object Page](t4-open-object-page-app-info.png) + + ![Open Object Page](t4-open-object-page-app-info.png) The Page Editor view opens up listing all the major page elements in the application outline structure. -3. Expand the nodes **Sections->Incident Overview->Subsections->Incident Details->Form**, press the **+** icon in the **Fields** sub-node and choose **Add Basic Fields**. +3. Expand the nodes **Sections - Incident Overview - Subsections - Incident Details - Form**, press the **+** icon in the **Fields** sub-node and choose **Add Basic Fields**. + ![Add Fields Icon](t4-add-section-fields.png) - 4. When prompted, choose **description** in **Fields** and press **Add**. + ![Add Fields Dialog](t4-add-fields-dialog.png) 5. Application preview automatically refreshes (if started) to show the additional field **Incident Description** within the field group **Incident Details**. + ![Annotation Cursor](t4-annotation-section-field-2.PNG) @@ -54,25 +58,31 @@ contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>ht In the previous step, you added a new field to an existing field group. Now you will add a new field group to the section **Incident Overview**. -1. In Page editor, expand the nodes **Sections->Incident Overview** if not already expanded, press the **+** icon in the **Subsections** sub-node and choose **Add Form Section**. +1. In Page editor, expand the nodes **Sections - Incident Overview** if not already expanded, press the **+** icon in the **Subsections** sub-node and choose **Add Form Section**. + ![Add Section Icon](t4-add-section.png) 2. When prompted, type **General Information** in the **Label** field and press **Add**. + ![Add Sections Dialog](t4-add-section-dialog.png) General Information section is visible in the outline. -3. Expand the nodes **General Information->Form**, press **+** icon in the **Fields** node and choose **Add Basic Fields**. +3. Expand the nodes **General Information -> Form**, press **+** icon in the **Fields** node and choose **Add Basic Fields**. - ![Add Fields Icon](t4-add-section-fields-icon.png) + + ![Add Fields Icon](t4-add-section-fields-icon.png) 4. When prompted, choose **priority_code**, **category_code** and **incidentStatus_code** as **Fields** and press **Add**. + ![Add Fields Dialog](t4-add-section-fields-dialog.png) Application preview refreshes and shows the additional field group **General Information** within the section **Incident Overview**. + + ![Annotation Cursor](t4-annotation-section-field-group.PNG) ### Add custom section to the object page @@ -83,14 +93,17 @@ To simplify this exercise, you will find prepared content in the `ext` folder of 1. Using drag&drop move the existing folder `ext` located in `test-resources` to the `webapp` folder of the incidents application. + ![Annotation Cursor](t4-annotation-custom-section-ext-4.png) 2. In Page Editor, press the **+** icon in the **Sections** node and choose **Add Custom Section**. + ![Annotation Cursor](t4-annotation-custom-section-page-editor-add-section.PNG) 3. In the **Add Custom Section** dialog, modify the content of the fields as showed in the image below and press **Add**. + ![Annotation Cursor](t4-annotation-custom-section-add-section-dialog.PNG) >The content of field **Fragment Name** represents one of the prepared artifacts located in the `ext` folder. @@ -99,6 +112,7 @@ To simplify this exercise, you will find prepared content in the `ext` folder of You have now finished the creation of the new custom section. Once the application preview is refreshed, check the new section displayed on the object page. + ![Annotation Cursor](t4-annotation-custom-section-on-object-page.PNG) ### Add new column to Incident Process Flow table @@ -107,24 +121,29 @@ Now you are going to add a new column to the object page table **Incidents Proce 1. In Page editor, expand the nodes **Sections->Incident Process Flow->Table**, press the **+** icon in the **Columns** sub-node and choose **Add Basic Columns**. + ![Add Columns Icon](t4-add-column-icon.png) 2. When prompted, choose **stepStatus** in the **Columns** field and press **Add**. + ![Add Column Dialog](t4-add-column-dialog.png) **Process Step Status** column is added at the bottom of the columns list section in the outline. 3. Drag the newly added column to the top of the columns list and drop it there. + ![Move Column](t4-move-column.png) 4. Choose the **Process Step Status** column to display its properties in the Properties pane to the right of the outline. In the **Criticality** field, change the value to **criticality**. + ![Define Criticality](t4-add-column-criticality.png) Once the application preview is refreshed, the new column added to the object page table. + ![Annotation Cursor](t4-annotation-LSP-table-column.PNG) ### Enable the flexible column layout @@ -135,10 +154,13 @@ The flexible column layout allows you to have the list report and the object pag In the **Property Panel** select the **Flexible Column Layout** and choose the `Mid-Expanded` option for the two column layout. + ![Annotation Cursor](t4-flexible-column-layout-global-page-settings.PNG) 2. In the application preview, the list report and object page are now shown in a two column layout. When you click on a different row in the list report the object page will update accordingly. + + ![Annotation Cursor](t4-flexible-column-layout-final.PNG) ### Summary @@ -147,6 +169,7 @@ At this point, your list report object page application is complete. > To prepare your app for translation, you can generate the translation keys for all the language dependent fields in your app. For that, choose the globe button at the top of the screen and, once prompted, press **Create**. + ![Prepare for Translation](t4-i18n.png) Over the past four tutorials, you have used the SAP Business Technology Platform, SAP Fiori tools and SAP Fiori elements to build this application. You have learned how to: diff --git a/tutorials/fiori-tools-cap-modify-object-page/t4-add-fields-dialog.png b/tutorials/fiori-tools-cap-modify-object-page/t4-add-fields-dialog.png index 88ebbe45c9..b3c1ffdee0 100644 Binary files a/tutorials/fiori-tools-cap-modify-object-page/t4-add-fields-dialog.png and b/tutorials/fiori-tools-cap-modify-object-page/t4-add-fields-dialog.png differ diff --git a/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields-dialog.png b/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields-dialog.png index 96c356df49..8a87818fb3 100644 Binary files a/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields-dialog.png and b/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields-dialog.png differ diff --git a/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields-icon.png b/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields-icon.png index e8a4f6dfae..a4ec25c2a1 100644 Binary files a/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields-icon.png and b/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields-icon.png differ diff --git a/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields.png b/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields.png index 36d162295a..473c0ca866 100644 Binary files a/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields.png and b/tutorials/fiori-tools-cap-modify-object-page/t4-add-section-fields.png differ diff --git a/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-custom-section-add-section-dialog.PNG b/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-custom-section-add-section-dialog.PNG index ab5f882a48..c983c511ba 100644 Binary files a/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-custom-section-add-section-dialog.PNG and b/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-custom-section-add-section-dialog.PNG differ diff --git a/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-section-field-2.PNG b/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-section-field-2.PNG index afaefa9fd3..c0f55a2d06 100644 Binary files a/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-section-field-2.PNG and b/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-section-field-2.PNG differ diff --git a/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-section-field-group.PNG b/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-section-field-group.PNG index d8c26730a7..7a13b9e6a5 100644 Binary files a/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-section-field-group.PNG and b/tutorials/fiori-tools-cap-modify-object-page/t4-annotation-section-field-group.PNG differ diff --git a/tutorials/fiori-tools-cap-modify-object-page/t4-flexible-column-layout-global-page-settings.PNG b/tutorials/fiori-tools-cap-modify-object-page/t4-flexible-column-layout-global-page-settings.PNG index b6fdd4f121..b78f3e5795 100644 Binary files a/tutorials/fiori-tools-cap-modify-object-page/t4-flexible-column-layout-global-page-settings.PNG and b/tutorials/fiori-tools-cap-modify-object-page/t4-flexible-column-layout-global-page-settings.PNG differ diff --git a/tutorials/fiori-tools-cap-modify-object-page/t4-open-object-page-app-info.png b/tutorials/fiori-tools-cap-modify-object-page/t4-open-object-page-app-info.png index a9c692ce2a..598fc14414 100644 Binary files a/tutorials/fiori-tools-cap-modify-object-page/t4-open-object-page-app-info.png and b/tutorials/fiori-tools-cap-modify-object-page/t4-open-object-page-app-info.png differ diff --git a/tutorials/fiori-tools-cap-prepare-dev-env/create-dev-space-BAS.png b/tutorials/fiori-tools-cap-prepare-dev-env/create-dev-space-BAS.png index 0cf5f47bd6..1aea830fa6 100644 Binary files a/tutorials/fiori-tools-cap-prepare-dev-env/create-dev-space-BAS.png and b/tutorials/fiori-tools-cap-prepare-dev-env/create-dev-space-BAS.png differ diff --git a/tutorials/fiori-tools-cap-prepare-dev-env/fiori-tools-cap-prepare-dev-env.md b/tutorials/fiori-tools-cap-prepare-dev-env/fiori-tools-cap-prepare-dev-env.md index a3a8fd091c..5903628d36 100644 --- a/tutorials/fiori-tools-cap-prepare-dev-env/fiori-tools-cap-prepare-dev-env.md +++ b/tutorials/fiori-tools-cap-prepare-dev-env/fiori-tools-cap-prepare-dev-env.md @@ -3,7 +3,7 @@ title: Prepare Your Development Environment for SAP Fiori Elements description: Set up your development environment with SAP Business Application Studio to create an SAP Fiori elements application based on the SAP Cloud Application Programming Model. auto_validation: true time: 20 minutes -tags: [ products>sap-fiori-elements, products>sap-fiori-tools, tutorial>beginner, products>sap-fiori, products>sap-business-application-studio, software-product-function>sap-cloud-application-programming-model, products>sap-business-technology-platform] +tags: [ software-product-function>sap-fiori-elements, tutorial>beginner, software-product-function>sap-business-application-studio, software-product-function>sap-cloud-application-programming-model, software-product-function>sap-business-technology-platform ] primary_tag: products>sap-fiori contributors: [ Hitesh Parmar>https://github.com/hitesh-parmar, Joachim Fiess>https://github.com/jo-fiess ] --- @@ -28,7 +28,7 @@ Click [here](https://cap.cloud.sap/docs/about/) for more information about the S Click **Create Dev Space**. - ![Start the Dev Space](create-dev-space-BAS.png) + !![Start the Dev Space](create-dev-space-BAS.png) Your development space is now ready to use. Wait until the status has changed from **STARTING** to **RUNNING**. After the initial creation this is done automatically. @@ -54,16 +54,15 @@ Once you are in the development space, you will see a **Welcome** page from whic 2. Click the link **Clone from Git**. - ![Click on link "Clone from Git"](click-clone-from-git.png) + !![Click on link "Clone from Git"](click-clone-from-git.png) Paste the repository link into the input field and press **Enter**. - ![Enter the github repository URL](enter-github-repository.png) + !![Enter the github repository URL](enter-github-repository.png) -3. Wait until the cloning has finished. When you see a toast message in the lower right corner, click **Open** to open the project. - You see your project in the explorer panel as shown in the image below: +3. Wait until the cloning has finished. Click **Open** to open the project. You see your project in the explorer panel as shown in the image below: - ![Explorer service structure](explorer-project-tree.png) + !![Explorer service structure](explorer-project-tree.png) [DONE] [ACCORDION-END] diff --git a/tutorials/hana-clients-choose-hana-instance/hana-clients-choose-hana-instance.md b/tutorials/hana-clients-choose-hana-instance/hana-clients-choose-hana-instance.md index 4cd7c72933..7f6068a06b 100644 --- a/tutorials/hana-clients-choose-hana-instance/hana-clients-choose-hana-instance.md +++ b/tutorials/hana-clients-choose-hana-instance/hana-clients-choose-hana-instance.md @@ -7,17 +7,21 @@ primary_tag: software-product>sap-hana-cloud --- # Choose an SAP HANA Database + Learn about SAP HANA Cloud and SAP HANA, express edition and choose one that will be used with the SAP HANA client interfaces in subsequent tutorials. ## Prerequisites - - A Microsoft Windows, Linux, or Mac computer - - A machine that can run SAP HANA, express edition if the SAP HANA Cloud trial or free tier is not used + +- A Microsoft Windows, Linux, or Mac computer +- A machine that can run SAP HANA, express edition if SAP HANA Cloud free tier is not used ## You will learn - - How to create an instance of SAP HANA Cloud or SAP HANA, express edition - - How to connect to a SAP HANA Cloud or an SAP HANA, express edition database + +- How to create an instance of SAP HANA Cloud or SAP HANA, express edition +- How to connect to a SAP HANA Cloud or an SAP HANA, express edition database ## Intro + This tutorial will provide tips and pointers on setting up an instance of [SAP HANA](https://www.sap.com/products/hana.html) running in the cloud or on-premise so that it can then be connected to using a few of the [SAP HANA Client](https://help.sap.com/docs/SAP_HANA_CLIENT) interfaces. For more information on SAP HANA, consult [What Is SAP HANA](https://help.sap.com/docs/SAP_HANA_PLATFORM/eb3777d5495d46c5b2fa773206bbfb46/d3b1adcdbb571014a93eff11ad9a1d89.html). @@ -40,6 +44,7 @@ For more information on SAP HANA, consult [What Is SAP HANA](https://help.sap.co --- ### Overview of SAP HANA Cloud and SAP HANA On-premise + There are multiple versions of SAP HANA. The information below is a list of links for the documentation of each version. | Version | Notes @@ -50,38 +55,39 @@ There are multiple versions of SAP HANA. The information below is a list of lin ### SAP HANA Cloud -Here are a few benefits of using SAP HANA Cloud: - * Software updates are automatically applied by SAP. +Here are a few benefits of using SAP HANA Cloud: - * Hardware is managed by a cloud provider (e.g. AWS, Azure, or GCP). +- Software updates are automatically applied by SAP. - * Many data center locations to choose from as listed in the [SAP Discovery Center](https://discovery-center.cloud.sap/serviceCatalog/sap-hana-cloud?region=all&tab=service_plan) +- Hardware is managed by a cloud provider (e.g. AWS, Azure, or GCP). - * [Backups](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/backup-and-recovery) are automatic and recovery can be initiated in SAP HANA Cloud Central. +- Many data center locations to choose from as listed in the [SAP Discovery Center](https://discovery-center.cloud.sap/serviceCatalog/sap-hana-cloud?region=all&tab=service_plan) - * The memory, compute and storage settings can be changed as your needs change. Note a few operations can be performed using [service requests](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/service-requests). +- [Backups](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/backup-and-recovery) are automatic and recovery can be initiated in SAP HANA Cloud Central. - * The ability is provided to expand data storage from in-memory, to native storage extensions, to a data lake, while providing a common access layer that enables you to have further control over performance and cost. See also [Lower Your Data Management Costs With SAP HANA Cloud](https://blogs.sap.com/2019/10/29/lower-your-data-management-costs-with-sap-hana-cloud/). +- The memory, compute and storage settings can be changed as your needs change. Note a few operations can be performed using [service requests](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/service-requests). +- The ability is provided to expand data storage from in-memory, to native storage extensions, to a data lake, while providing a common access layer that enables you to have further control over performance and cost. See also [Lower Your Data Management Costs With SAP HANA Cloud](https://blogs.sap.com/2019/10/29/lower-your-data-management-costs-with-sap-hana-cloud/). - Here are a few differences between SAP HANA Cloud and an on-premise version: - * Every SAP HANA Cloud instance is one SAP HANA database. SAP HANA Cloud as of 2024 QRC 4 offers [multitenancy](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-multitenancy/introducing-sap-hana-cloud-multitenancy) support. For further details see [The next step towards cost-effectiveness and scalability with SAP HANA Cloud Multitenancy](https://community.sap.com/t5/technology-blog-posts-by-sap/the-next-step-towards-cost-effectiveness-and-scalability-with-sap-hana/ba-p/13885564). On-premise SAP HANA also has a concept of tenant databases (a system database and one or more tenant databases) but in a different manner from SAP HANA Cloud. For further details see [SAP HANA Tenant Databases](https://help.sap.com/docs/SAP_HANA_PLATFORM/eb3777d5495d46c5b2fa773206bbfb46/0baadba82dd9407cbb852ae98f49f6bd.html). +Here are a few differences between SAP HANA Cloud and an on-premise version: - * Connections to an SAP HANA Cloud instance must be secure and require a minimum SAP HANA client version of 2.4.167. +- Every SAP HANA Cloud instance is one SAP HANA database. SAP HANA Cloud as of 2024 QRC 4 offers [multitenancy](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-multitenancy/introducing-sap-hana-cloud-multitenancy) support. For further details see [The next step towards cost-effectiveness and scalability with SAP HANA Cloud Multitenancy](https://community.sap.com/t5/technology-blog-posts-by-sap/the-next-step-towards-cost-effectiveness-and-scalability-with-sap-hana/ba-p/13885564). On-premise SAP HANA also has a concept of tenant databases (a system database and one or more tenant databases) but in a different manner from SAP HANA Cloud. For further details see [SAP HANA Tenant Databases](https://help.sap.com/docs/SAP_HANA_PLATFORM/eb3777d5495d46c5b2fa773206bbfb46/0baadba82dd9407cbb852ae98f49f6bd.html). - * The administration user for SAP HANA Cloud is named DBADMIN while for an SAP HANA 2.0 database it is SYSTEM. For additional details see [Predefined Users](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-security-guide/predefined-users), [SAP HANA Cloud Administrator DBADMIN](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/user-management-with-sap-hana-database-administrator-dbadmin), and [Predefined Users in HANA 2.0](https://help.sap.com/docs/SAP_HANA_PLATFORM/b3ee5778bc2e4a089d3299b82ec762a7/de4ee8bbbb5710148a04f023da147c8d.html). +- Connections to an SAP HANA Cloud instance must be secure and require a minimum SAP HANA client version of 2.4.167. - Information on the instance size steps for SAP HANA Cloud, SAP HANA databases can be found at [Create an SAP HANA Database Instance Using SAP HANA Cloud Central](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/create-sap-hana-database-instance-using-sap-hana-cloud-central). Service plan, pricing and data center availability can be found at [SAP HANA Cloud Service (SAP Discovery Center)](https://discovery-center.cloud.sap/serviceCatalog/sap-hana-cloud?region=all&tab=service_plan). Details on limitations can be found at [System Limitations](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/system-limitations). Compatibility information can be found at [Compatibility with Other SAP HANA Versions](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-migration-guide/compatibility-with-other-sap-hana-versions). Additional details can be found at [What is SAP HANA?](https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html). +- The administration user for SAP HANA Cloud is named DBADMIN while for an SAP HANA 2.0 database it is SYSTEM. For additional details see [Predefined Users](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-security-guide/predefined-users), [SAP HANA Cloud Administrator DBADMIN](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/user-management-with-sap-hana-database-administrator-dbadmin), and [Predefined Users in HANA 2.0](https://help.sap.com/docs/SAP_HANA_PLATFORM/b3ee5778bc2e4a089d3299b82ec762a7/de4ee8bbbb5710148a04f023da147c8d.html). +Information on the instance size steps for SAP HANA Cloud, SAP HANA databases can be found at [Create an SAP HANA Database Instance Using SAP HANA Cloud Central](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/create-sap-hana-database-instance-using-sap-hana-cloud-central). Service plan, pricing and data center availability can be found at [SAP HANA Cloud Service (SAP Discovery Center)](https://discovery-center.cloud.sap/serviceCatalog/sap-hana-cloud?region=all&tab=service_plan). Details on limitations can be found at [System Limitations](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/system-limitations). Compatibility information can be found at [Compatibility with Other SAP HANA Versions](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-migration-guide/compatibility-with-other-sap-hana-versions). Additional details can be found at [What is SAP HANA?](https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html). ### Connect to SAP HANA Cloud + >To complete the tutorials in the mission, an SAP HANA instance is needed. Step 3 and 5 in this tutorial provide two different, free options that can be used to set up an SAP HANA instance. Only one of these steps needs to be completed if you currently do not have access to an SAP HANA instance. -The instructions on how to setup a free SAP HANA Cloud trial or free tier within the SAP Business Technology Platform (SAP BTP), are well covered in a number of other sources listed below. Trial is only available on the US10 landscape and is in a separate SAP BTP trial account whereas free tier is available in multiple production SAP BTP accounts and provides a seamless transition from a free tier to a paid plan. +The instructions on how to setup a free SAP HANA Cloud instance within the SAP Business Technology Platform (SAP BTP) are well covered in a number of other sources listed below. The SAP BTP Trial is available on the US10 and AP21 landscapes. When using the free SAP HANA Cloud service in productive landscapes, there is an option to transition the service from free tier to a paid service. -* [Set Up Your SAP HANA Cloud, SAP HANA Database (free tier or trial) and Understand the Basics](group.hana-cloud-get-started-1-trial) +* [Set Up Your SAP HANA Cloud, SAP HANA Database and Understand the Basics](group.hana-cloud-get-started-1-trial) * [SAP Learning Journey - Provisioning and Administering Databases in SAP HANA Cloud](https://learning.sap.com/learning-journey/provision-and-administer-databases-in-sap-hana-cloud) @@ -99,7 +105,7 @@ For more information on SAP BTP see the following product pages and help documen * [https://help.sap.com/docs/btp](https://help.sap.com/docs/btp) -Continue with this tutorial once you have created an SAP HANA Cloud trial or free tier instance as shown below. +Continue with this tutorial once you have created an SAP HANA Cloud instance as shown below. ![SAP HANA Cloud Trial instance](hana-cloud-instance.png) @@ -108,7 +114,7 @@ Continue with this tutorial once you have created an SAP HANA Cloud trial or fre ![SQL Endpoint](SQLEndpoint.png) - >The SAP HANA Cloud, HANA database free tier or trial instances are shut down on a nightly basis and will need to be restarted before working with them the next day. + >The SAP HANA Cloud, HANA database free tier instances are shut down on a nightly basis and will need to be restarted before working with them the next day. 2. Open a SQL console for your database instance from SAP HANA Cloud Central. @@ -153,7 +159,7 @@ Congratulations! You have connected to SAP HANA Cloud and performed a few querie ### SAP HANA, express edition ->This step only needs to be completed if you currently do not have access to an SAP HANA Instance and did not setup an SAP HANA instance through the SAP HANA Cloud Trial or free tier as explained in step 3. +>This step only needs to be completed if you currently do not have access to an SAP HANA Instance and did not setup an SAP HANA instance through the SAP HANA Cloud free tier as explained in step 3. SAP provides a free streamlined version of SAP HANA that runs on developer laptops called [SAP HANA, express edition](https://www.sap.com/products/technology-platform/hana/express-trial.html). @@ -169,7 +175,7 @@ At this point, you should have a running instance of SAP HANA, express edition. ### Connect to SAP HANA, express edition ->This step only needs to be completed if you currently do not have access to an SAP HANA Instance and did not setup an SAP HANA instance through the SAP HANA Cloud Trial or free tier as explained in step 3. +>This step only needs to be completed if you currently do not have access to an SAP HANA Instance and did not setup an SAP HANA instance using the SAP HANA Cloud free tier as explained in step 3. A default installation will contain one [system](https://help.sap.com/docs/SAP_HANA_PLATFORM/6b94445c94ae495c83a19646e7c3fd56/39da3d057f56427ab1bb7f738ca9e7ce.html) database named **SYSTEMDB** and one [tenant](https://help.sap.com/docs/SAP_HANA_PLATFORM/6b94445c94ae495c83a19646e7c3fd56/623afd167e6b48bf956ebb7f2142f058.html) database named **HXE**. diff --git a/tutorials/hana-clients-hdbsql/hana-clients-hdbsql.md b/tutorials/hana-clients-hdbsql/hana-clients-hdbsql.md index 8365e5f165..243870c12d 100644 --- a/tutorials/hana-clients-hdbsql/hana-clients-hdbsql.md +++ b/tutorials/hana-clients-hdbsql/hana-clients-hdbsql.md @@ -72,7 +72,7 @@ This step demonstrates how to connect to a SAP HANA instance using [HDBSQL](http An example of configuring this setting is shown in [Allow connections to SAP HANA Cloud instance from selected IP addresses — using the command line](https://blogs.sap.com/2020/10/30/allow-connections-to-sap-hana-cloud-instance-from-selected-ip-addresses-using-the-command-line/). - - The SAP HANA Cloud, HANA database trial instance will be automatically stopped overnight. That means you need to restart your instance before working with it each new day. + - The SAP HANA Cloud, HANA database free tier instance will be automatically stopped overnight. That means you need to restart your instance before working with it each new day. - Connections to a HANA Cloud instance must use encryption. The default encryption library on Windows is mscrypto and on Linux and macOS it is OpenSSL. The following example demonstrates how one could use the SAP provided conmmoncrypto library instead of the default encryption library. Note, the following steps require that the SAP HANA Client be downloaded from the SAP Software Downloads as the download includes the SAP Common Crypto library (libsapcrypto). Note that the environment variables can also be set by running source hdbclienv.sh or hdbclienv.bat. diff --git a/tutorials/hana-clients-trace/hana-clients-trace.md b/tutorials/hana-clients-trace/hana-clients-trace.md index 9ee25a03a3..1022e16b5d 100644 --- a/tutorials/hana-clients-trace/hana-clients-trace.md +++ b/tutorials/hana-clients-trace/hana-clients-trace.md @@ -55,7 +55,7 @@ Trace settings can also be configured using environment variables, or via connec The `%p` will be replaced with the process ID of the traced application. Including `%p` in the file name ensures that each process can write its own trace file. - >The next step provides an example of sending the trace output to `stdout` or `stderr`. Another option for Node.js applications is to specify a callback to receive the trace output to using the `onTrace` method which is shown in the tutorial [Connect Using the SAP HANA Node.js Interface](hana-clients-node) + >The next step provides an example of sending the trace output to `stdout` or `stderr`. Another option for Node.js applications is to specify a callback to receive the trace output to using the `onTrace` method which is shown in the tutorial [Connect Using the SAP HANA Node.js Interface](hana-clients-node). Example trace categories include: @@ -112,7 +112,7 @@ Trace settings can also be configured using environment variables, or via connec BUILD MODE: rel APPLICATION: C:\SAP\hdbclient\hdbsql.exe HOST: W-R90XC65K - OS USER: I826567 + OS USER: I234567 CURRENT DIRECTORY: c:\temp\traces TRACE FILE NAME: c:\temp\traces\SQLDBC-55652.txt PROCESS ID: 55652 @@ -144,6 +144,7 @@ Trace settings can also be configured using environment variables, or via connec ```Shell hdbsqldbc_cons TRACE OFF + hdbsqldbc_cons SHOW ALL ``` @@ -163,7 +164,30 @@ The following are some additional options for tracing. hdbsqldbc_cons TRACE ONLY ON ERROR 10 ``` -3. In situations where `hdbsqldbc_cons` is not accessible, perhaps because a driver was installed directly using npm or pip, trace settings can be set using environment variables. +3. Filtering can be used to reduce the size of trace files. Place the following SQL statements into a file named sql.sql to try this out. + + ```SQL + SELECT 'tracetestUSER1' FROM DUMMY; + CONNECT USER2 PASSWORD Password1; + SELECT 'tracetestUSER2' FROM DUMMY; + ``` + + Execute the commands below to reset the trace settings, enable SQL trace for USER2, and then to run the above SQL statements which will execute as USER1 and then as USER2. + + ```Shell + hdbsqldbc_cons TRACE OFF + hdbsqldbc_cons TRACE SQL ON LEVEL INFO + hdbsqldbc_cons TRACE FILTER SQL USER USER2 + hdbsql -U User1UserKey -I sql.sql + ``` + + The expected result is that the resulting trace file only traces the query from USER2. + +4. In situations where `hdbsqldbc_cons` is not accessible, perhaps because a driver was installed directly using npm or pip, trace settings can be set using environment variables. The following values can be used in the trace file name. + + * %p represents the process ID + * %a represents the application user + * %c represents the connection ID ```Shell (Windows) set HDB_SQLDBC_TRACEFILE=c:\temp\traces\SQLDBC-%p.txt @@ -198,7 +222,7 @@ The following are some additional options for tracing. ![Environment Variable Values](EnvironmentVariable.png) -4. Trace information can be directed to `stdout` or `stderr`. See below for a few examples. +5. Trace information can be directed to `stdout` or `stderr`. See below for a few examples. ```Shell hdbsql -U User1UserKey -Z traceFile=stdout -Z traceOptions=sql=warning "SELECT * FROM HOTELS.CUSTOMER" @@ -212,7 +236,7 @@ The following are some additional options for tracing. set HDB_SQLDBC_TRACEFILE= ``` -5. Tracing can also be enabled in an application's connection properties. For further details see `traceFile` and `traceOptions` in [SQLDBC Connection Properties](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/f6fb06ffe4484f6fa61f10082b11663d.html). +6. Tracing can also be enabled in an application's connection properties. For further details see `traceFile` and `traceOptions` in [SQLDBC Connection Properties](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/f6fb06ffe4484f6fa61f10082b11663d.html). ### Tracing a JDBC Connection diff --git a/tutorials/hana-cloud-automation-rest/hana-cloud-automation-rest.md b/tutorials/hana-cloud-automation-rest/hana-cloud-automation-rest.md index 62cdc6ef3c..e684e7b41b 100644 --- a/tutorials/hana-cloud-automation-rest/hana-cloud-automation-rest.md +++ b/tutorials/hana-cloud-automation-rest/hana-cloud-automation-rest.md @@ -70,15 +70,15 @@ The API's can be invoked using a tool such as the [REST Client](https://marketpl #From the clientsecret field in the service binding. @clientsecret = + #Instance ID of a SAP HANA Cloud instance in the same subaccount as the service manager instance + @instanceid = + #Generated by the request bearer token call. Copy the access_token value from the result without the quotes @bearer = - #Instance ID of a SAP HANA Cloud instance in the same subaccount as the service manager instance - @instanceid = - #Authorization REST API call -------------------- - #Request bearer token + #Request bearer token and paste result into the bearer variable above #See also https://help.sap.com/docs/service-manager/sap-service-manager/retrieve-oauth2-access-token #Note that by default the token expires after 1799 seconds or 30 minutes as seen in the response in the expires_in field GET {{uaa_url}}/{{oauth}} @@ -89,7 +89,7 @@ The API's can be invoked using a tool such as the [REST Client](https://marketpl #Service plan query #See also https://help.sap.com/docs/service-manager/sap-service-manager/filtering-parameters-and-operators #See also https://api.sap.com/api/APIServiceManager/resource/Service_Plans - GET {{uri}}/v1/service_plans?fieldQuery=name eq 'hana' + GET {{uri}}/v1/service_plans?fieldQuery=name contains 'hana' Authorization: Bearer {{bearer}} ### diff --git a/tutorials/hana-cloud-data-products-consumption/create-formation-1.png b/tutorials/hana-cloud-data-products-consumption/create-formation-1.png new file mode 100644 index 0000000000..8e043858f8 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/create-formation-1.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/create-formation-2.png b/tutorials/hana-cloud-data-products-consumption/create-formation-2.png new file mode 100644 index 0000000000..8f07e9052f Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/create-formation-2.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/create-formation-3.png b/tutorials/hana-cloud-data-products-consumption/create-formation-3.png new file mode 100644 index 0000000000..ea14085598 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/create-formation-3.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/explore-a-data-product.png b/tutorials/hana-cloud-data-products-consumption/explore-a-data-product.png new file mode 100644 index 0000000000..df41286333 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/explore-a-data-product.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/explore-a-data-product2.png b/tutorials/hana-cloud-data-products-consumption/explore-a-data-product2.png new file mode 100644 index 0000000000..6a1ed4a66f Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/explore-a-data-product2.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/explore-a-data-product3.png b/tutorials/hana-cloud-data-products-consumption/explore-a-data-product3.png new file mode 100644 index 0000000000..6e699ea1de Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/explore-a-data-product3.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/find-data-product.png b/tutorials/hana-cloud-data-products-consumption/find-data-product.png new file mode 100644 index 0000000000..23668758b5 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/find-data-product.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/find-data-product2.png b/tutorials/hana-cloud-data-products-consumption/find-data-product2.png new file mode 100644 index 0000000000..69660e1545 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/find-data-product2.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/find-data-product3.png b/tutorials/hana-cloud-data-products-consumption/find-data-product3.png new file mode 100644 index 0000000000..026bb5fd2c Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/find-data-product3.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/find-data-product4.png b/tutorials/hana-cloud-data-products-consumption/find-data-product4.png new file mode 100644 index 0000000000..5db3a44b97 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/find-data-product4.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/find-data-product5.png b/tutorials/hana-cloud-data-products-consumption/find-data-product5.png new file mode 100644 index 0000000000..d7009a80d9 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/find-data-product5.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/hana-cloud-data-products-consumption.md b/tutorials/hana-cloud-data-products-consumption/hana-cloud-data-products-consumption.md new file mode 100644 index 0000000000..adc843574c --- /dev/null +++ b/tutorials/hana-cloud-data-products-consumption/hana-cloud-data-products-consumption.md @@ -0,0 +1,142 @@ +--- +parser: v2 +auto_validation: true +time: 10 +tags: [ tutorial>beginner, software-product-function>sap-hana-cloud--sap-hana-database, tutorial>license] +primary_tag: software-product>sap-hana-cloud +--- + +# Access and Query a Data Product in SAP HANA Cloud + + Learn how to share a data product that has been published in the SAP Business Data Cloud (SAP BDC) with SAP HANA Cloud so that its contents can be queried as virtual tables. Data products are read-only curated data that has been produced by an SAP application such as SAP S/4HANA, SAP SuccessFactors, SAP Ariba, and Concur among others. They provide access to SAP data without the need for complex data preparation steps. SAP Business Data Cloud (SAP BDC) is a data platform that harmonizes all data from SAP and non-SAP sources, into a unified semantic layer of trusted data, to power advanced analytics and to build AI applications. SAP HANA Cloud is an in-memory database that provides a multi model engine, access to both structured and unstructured data, and embedded libraries for machine learning enabling it to provide real time analytics. + +For additional details on these topics see: + +* [Introducing SAP Business Data Cloud](https://learning.sap.com/courses/introducing-sap-business-data-cloud) +* [Start your free trial of SAP Business Data Cloud](https://www.sap.com/products/data-cloud/trial.html) +* [SAP Business Data Cloud | SAP Community](https://pages.community.sap.com/topics/business-data-cloud) +* [Provisioning and Administering Databases in SAP HANA Cloud](https://learning.sap.com/courses/provisioning-and-administering-databases-in-sap-hana-cloud) +* [Basic Trial - Introduction to SAP HANA Cloud](https://learning.sap.com/courses/prd-hc-introduction) +* [Data Product Support in SAP HANA Cloud | SAP Help Portal](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/data-product-support-in-sap-hana-cloud-internal?state=DRAFT&version=dev) + +## Prerequisites + +* Access to SAP Business Data Cloud and a productive SAP HANA Cloud instance + +## You will learn + +* How to configure SAP Business Data Cloud and SAP HANA Cloud in a formation so that data products can be shared from SAP BDC to a SAP HANA Cloud database +* How to share a selected data product +* How to install the shared data product into SAP HANA Cloud +* How to view the installed data product (in data products tab, see also the data sources) +* How to query data from the shared data product in SAP HANA Cloud + +--- + +### Set up a formation + +A formation is a logical grouping of SAP systems that simplify the connectivity setup and to provide a unified view of the systems. For further details see [How Data Products Become Available in SAP HANA Cloud](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/how-data-products-become-available-in-sap-hana-cloud?state=DRAFT&version=dev). + +1. Navigate to formations in the [SAP Business Technology (SAP BTP) Cockpit](https://cockpit.btp.cloud.sap/cockpit#) and select Create Formation. + + ![Formations in SAP BTP Cockpit](create-formation-1.png) + +2. Create a new formation of type Business Data Cloud. + + ![Step 1 of create formation](create-formation-2.png) + +3. Select the products to be part of the formation. + + ![Step 2 of create formation](create-formation-3.png) + +4. Complete the formation. + +### Locate and examine a data product in SAP BDC + +Now that trust has been established between SAP BDC and SAP HANA Cloud, a data product can be located in SAP BDC and shared to SAP HANA Cloud. + +1. In the SAP BDC cockpit, select Catalog & Marketplace and search for a data product. + + ![Find a data product](find-data-product.png) + +2. The details of the data product including the description and its properties can be examined. + + ![View the description and properties](find-data-product2.png) + +3. Details of the objects included can be displayed by examining the API. + + ![View the objects](find-data-product3.png) + + It is also possible to examine the columns of each object by clicking View Columns. + + ![View the objects](find-data-product4.png) + + ![View the objects](find-data-product5.png) + +### Share a data product to SAP HANA Cloud + +1. Once a data product has been identified that you wish to be able to access from SAP HANA Cloud, select the Share button in the top right of its details page. + + ![Share a data product](share-a-data-product.png) + + Specify the system to share the data product with by pressing Add a Target. + + ![Choose to add a target](share-a-data-product2.png) + + Specify an SAP HANA Cloud system as a target. + + ![Specify the target to be shared to](share-a-data-product3.png) + + Finally complete the process by pressing Share. + + ![Complete the sharing of the data product](share-a-data-product4.png) + +### Install a data product into SAP HANA Cloud + +The data product that was previously shared can now be installed into SAP HANA Cloud which will create a remote source to the data product and create virtual tables for each object in the data product. + +1. Open SAP HANA Cloud Central and select the SAP HANA Cloud instance in which you wish to install the data product. + + ![View the shared data products](install-a-data-product.png) + +2. Select the previously shared data product and choose install. + + ![Install the data product](install-a-data-product2.png) + +### Examine the remote source and virtual tables + +1. Start by selecting the schema of the data product. + + ![Select the schema](explore-a-data-product.png) + +2. The database objects app will now open with a schema filter applied. + + ![database objects app filtered on schema](explore-a-data-product2.png) + + As shown above a virtual table was created for each object in the data product. + +3. A remote source was created that provides the connection to the data product. + + ![database objects app filtered on schema](explore-a-data-product3.png) + + Further details on remote sources can be found at [CREATE REMOTE SOURCE](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/create-remote-source-statement-access-control?locale=en-US). + +### Query the data product using SAP HANA Cloud + +The data in the data product can now be queried using the virtual tables. An example is shown below. + +```SQL +SET SCHEMA "_SAP_DATAPRODUCT_sap_s4com_dataProduct_SalesOrder_v1_5aad3293-2564-4873-8c15-188e653f781b"; +SELECT COUNT(*) FROM "_SAP_DATAPRODUCT_c9429f3e-0d0b-4d0b-9364-cec9e77daebe_salesorder.SalesOrder" AS SALES_ORDER; +SELECT COUNT(*) FROM "_SAP_DATAPRODUCT_c9429f3e-0d0b-4d0b-9364-cec9e77daebe_salesorder.SalesOrderItem" AS SALES_ORDER_ITEM; +SELECT * FROM "_SAP_DATAPRODUCT_c9429f3e-0d0b-4d0b-9364-cec9e77daebe_salesorder.SalesOrder" AS SALES_ORDER; +SELECT * FROM "_SAP_DATAPRODUCT_c9429f3e-0d0b-4d0b-9364-cec9e77daebe_salesorder.SalesOrderItem" AS SALES_ORDER_ITEM; +SELECT "SalesOrderItemText", COUNT("SalesOrderItemText") FROM "_SAP_DATAPRODUCT_c9429f3e-0d0b-4d0b-9364-cec9e77daebe_salesorder.SalesOrderItem" + AS SALES_ORDER_ITEM GROUP BY "SalesOrderItemText" ORDER BY COUNT("SalesOrderItemText") DESC; +``` + +![Query the data product](query-data-product.png) + +### Knowledge check + +Congratulations! You have now used the SAP HANA database explorer extension for Visual Studio Code to create tables and functions within an SAP HANA database and have become familiar with some of the features it provides. diff --git a/tutorials/hana-cloud-data-products-consumption/install-a-data-product.png b/tutorials/hana-cloud-data-products-consumption/install-a-data-product.png new file mode 100644 index 0000000000..8f3ee8a1f7 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/install-a-data-product.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/install-a-data-product2.png b/tutorials/hana-cloud-data-products-consumption/install-a-data-product2.png new file mode 100644 index 0000000000..bdb7be30ba Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/install-a-data-product2.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/query-data-product.png b/tutorials/hana-cloud-data-products-consumption/query-data-product.png new file mode 100644 index 0000000000..b9da128a01 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/query-data-product.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/share-a-data-product.png b/tutorials/hana-cloud-data-products-consumption/share-a-data-product.png new file mode 100644 index 0000000000..95e7387e0b Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/share-a-data-product.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/share-a-data-product2.png b/tutorials/hana-cloud-data-products-consumption/share-a-data-product2.png new file mode 100644 index 0000000000..3455b4e383 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/share-a-data-product2.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/share-a-data-product3.png b/tutorials/hana-cloud-data-products-consumption/share-a-data-product3.png new file mode 100644 index 0000000000..7f219eab60 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/share-a-data-product3.png differ diff --git a/tutorials/hana-cloud-data-products-consumption/share-a-data-product4.png b/tutorials/hana-cloud-data-products-consumption/share-a-data-product4.png new file mode 100644 index 0000000000..60477c8b90 Binary files /dev/null and b/tutorials/hana-cloud-data-products-consumption/share-a-data-product4.png differ diff --git a/tutorials/hana-cloud-mission-trial-1/hana-cloud-mission-trial-1.md b/tutorials/hana-cloud-mission-trial-1/hana-cloud-mission-trial-1.md index c737cfb930..ef93c35973 100644 --- a/tutorials/hana-cloud-mission-trial-1/hana-cloud-mission-trial-1.md +++ b/tutorials/hana-cloud-mission-trial-1/hana-cloud-mission-trial-1.md @@ -8,16 +8,23 @@ tags: [tutorial>beginner, software-product>sap-hana-cloud] primary_tag: software-product>sap-hana-cloud --- -# Sign up for an SAP HANA Cloud Trial account - Learn about the SAP HANA Cloud trial and the process to sign up for it. +# Understand How the SAP HANA Cloud Free Tier Service can be Used in a SAP BTP Trial or Productive Account + + Learn about the process to sign up for a SAP Business Technology Platform (SAP BTP) trial or productive account and the details of the SAP HANA Cloud free tier service plan. + +## Prerequisites + +- You have access to a SAP BTP trial account or a productive account that has SAP HANA Cloud entitlements ## You will learn -- Differences between a trial SAP HANA Cloud instance and a non trial instance -- The process to sign up for a trial SAP BTP account + +- Differences between a SAP BTP trial and productive subaccount +- How to sign up for a SAP BTP account +- Differences between running a free tier SAP HANA Cloud instance in a SAP BTP trial or productive subaccount ## Intro -This tutorial is part of a mission, in which you will learn in a hands-on, end-to-end setting how to use SAP HANA Cloud, SAP HANA database. SAP offers two free options to use SAP HANA Cloud. This tutorial covers the first option, which is signing up for the SAP HANA Cloud trial. The trial allows you to use SAP HANA Cloud in a test environment and does not require payment details to sign up, whereas the free tier option can be easily upgraded to a paid version but is only available in enterprise accounts. If you would like to learn more about the second option of using SAP HANA Cloud free tier, proceed to [this tutorial](hana-cloud-mission-trial-2-ft). +This tutorial is part of a mission, in which you will learn in a hands-on, end-to-end setting how to use SAP HANA Cloud, SAP HANA database. SAP offers a free version of the SAP HANA Cloud service. This free service is offered in both a SAP BTP trial account and in a SAP BTP productive subaccount. The SAP HANA Cloud free tier service when running in a productive subaccount can be easily upgraded to a paid version. >![Alex Banner](banner-alex.png) > @@ -25,48 +32,62 @@ This tutorial is part of a mission, in which you will learn in a hands-on, end-t > > In this mission, we will help Alex, the CEO of a fictitious company called *Best Run Travel* to answer a concrete business question with SAP HANA Cloud, SAP HANA database: > -> * As a global travel agency, Best Run Travel has data from many different affiliates. -> * Alex needs to know the **top 5 partners** of their agency and wants to find out the **days with maximum booking of each partner**. -> * Best Run Travel uses SAP HANA Cloud, SAP HANA database to store and manage all its data. Now, your mission is to help Alex find a subset of the data related to the partner sales and create a way for Alex to share this subset with other departments in Best Run Travel. - +> - As a global travel agency, Best Run Travel has data from many different affiliates. +> - Alex needs to know the **top 5 partners** of their agency and wants to find out the **days with maximum booking of each partner**. +> - Best Run Travel uses SAP HANA Cloud, SAP HANA database to store and manage all its data. Now, your mission is to help Alex find a subset of the data related to the partner sales and create a way for Alex to share this subset with other departments in Best Run Travel. --- - ### Get to know the SAP HANA Cloud trial -- You can use your trial account to test the following components: **SAP HANA Cloud, SAP HANA database** and **SAP HANA Cloud, data lake**. +### Get to know the SAP BTP account types -- If your trial account remains inactive, you will be asked to extend your trial every 30 days. If you regularly log in to your trial account, your trial account will be automatically extended up to 90 days. +- SAP BTP trial allows you to build full applications in a test environment to learn and explore the capabilities of SAP BTP. However, once you are ready to move to productive use a new productive BTP account is required. -- Basic and Advanced trial instances cannot be upgraded to a paid instance; only Free Tier instances have the option to upgrade to a paid instance. +- Customers with a productive SAP BTP account can use free service plans for SAP BTP to explore, learn, and try SAP BTP services (such as SAP HANA Cloud) with a path to productive use. -- If you already use other services in SAP Business Technology Platform, those will not be affected or limited in any way by your participation in the SAP HANA Cloud trial. +- Free service plans provide a means to try out selected services up to a specified capacity limit. In the case of SAP HANA Cloud free tier service, when running in a productive account, it can be switched easily to the paid tier service, enabling additional functionality without losing any work. -- Trial database instances are stopped on a nightly basis. Each time you start working with your trial instance, you need to restart it first. +### Sign up for an SAP BTP account -- If you do not restart your instance within **30 days**, it will be **deleted**. Your trial account, however, will continue to exist and you can easily provision an instance again, if you wish to do so. +In this step, you can learn how to sign up for the SAP BTP trial or a productive account. -- The configuration of your trial instance of SAP HANA Cloud, SAP HANA database is **16 GB of memory, 1 vCPU, and 80 GB of storage**. +To sign up for an SAP BTP trial account follow the below steps. -- Features such as JSON document store and Script Server require larger HANA Cloud configurations (3 vCPUs, 45 GB of memory) and are therefore *not supported* in a trial account. - - -### Sign up for the SAP HANA Cloud trial -In this step, you can learn how to sign up for the trial of SAP HANA Cloud. If you already have an SAP BTP trial account, proceed to the next step to add the appropriate entitlements to your account. - - -1. Click on [this link](https://www.sap.com/products/technology-platform/pricing.html) to get to the try and buy page. +1. Click on [this link](https://www.sap.com/products/technology-platform/pricing.html) to get to the try and buy page. ![Screenshot Trial signup1](ss-01-trial-Signup1.png) Select the Advanced trial option. -2. You will then receive a popup and an email with a link to access the [SAP BTP Trial](https://cockpit.hanatrial.ondemand.com/trial/#/home/trial). +2. You will then receive a popup and an email with a link to access the [SAP BTP Trial](https://cockpit.hanatrial.ondemand.com/trial/#/home/trial). ![Open the trial](ss-02-Trial-Signup2.png) + Select the region that is closest to you. + + ![select region](select-region.png) + >It is important to note that the first time you access your trial, you will need to choose your identity provider (you can choose the default). Additionally, if you have two-factor authentication enabled, you will have to enter the security token that is sent to you based on the method of authentication you have chosen. -Congratulations, you have successfully signed up for the SAP HANA Cloud trial! Learn how you can start using SAP HANA Cloud in the [next tutorial](hana-cloud-mission-trial-2). +Congratulations, you have successfully signed up for the SAP BTP trial account. + +Alternatively, if you wish to instead work in a productive account, select the free tier option on the previously shown try and buy page. Additional details can be found [get an account on SAP BTP to try out free tier service plans](btp-free-tier-account). + +### Get to know the SAP HANA Cloud free tier service + +- You can use your SAP BTP trial or productive account to test the following components: **SAP HANA Cloud, SAP HANA database** and **SAP HANA Cloud, data lake**. + +- If your SAP BTP trial account remains inactive, you will be asked to extend your trial every 30 days. If you regularly log in to your trial account, your trial account will be automatically extended up to 90 days. + +- The SAP HANA Cloud free tier service when running in a SAP BTP productive account can be upgraded to a paid instance. + +- If you already use other services in SAP Business Technology Platform, those will not be affected or limited in any way by your use of the SAP HANA Cloud free tier service. + +- SAP HANA Cloud free tier instances are stopped on a nightly basis. Each day you start working with your free tier instance, you need to restart it first. + +- If you do not restart your instance within 30 days, it will be deleted. You can easily provision a new instance again, if you wish to do so. + +- The configuration of your free tier instance of SAP HANA Cloud, SAP HANA database is 16 GB of memory, 1 vCPU, and 80 GB of storage. +- Features such as JSON document store, triple store, and script server require larger SAP HANA Cloud configurations (3 vCPUs, 45 GB of memory) and are therefore *not supported* in the free tier service. Additional details are available at [SAP HANA Database License](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/sap-hana-database-license). An [alert](https://help.sap.com/docs/alert-notification/sap-alert-notification-for-sap-btp/hdb-free-tier-instance-expiration) is sent if the instance is not started for 15 days. Further details on how to view and receive alerts can be found at [Alerts in SAP HANA Database and Data Lake](https://developers.sap.com/tutorials/hana-cloud-alerts.html). ### Knowledge Check diff --git a/tutorials/hana-cloud-mission-trial-1/select-region.png b/tutorials/hana-cloud-mission-trial-1/select-region.png new file mode 100644 index 0000000000..de6311c750 Binary files /dev/null and b/tutorials/hana-cloud-mission-trial-1/select-region.png differ diff --git a/tutorials/hana-cloud-mission-trial-10/hana-cloud-mission-trial-10.md b/tutorials/hana-cloud-mission-trial-10/hana-cloud-mission-trial-10.md index 3b6e866fba..2145cf9df6 100644 --- a/tutorials/hana-cloud-mission-trial-10/hana-cloud-mission-trial-10.md +++ b/tutorials/hana-cloud-mission-trial-10/hana-cloud-mission-trial-10.md @@ -12,7 +12,6 @@ primary_tag: software-product>sap-hana-cloud Learn how to create a user and grant others access to your calculation view within the SAP HANA database in SAP HANA Cloud. ## Prerequisites -- You have access to [SAP HANA Cloud trial](hana-cloud-mission-trial-2) or [SAP HANA Cloud free tier](hana-cloud-mission-trial-2-ft), or a production environment of SAP HANA Cloud, SAP HANA database - You have completed the tutorial to [provision an instance of SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-3) - You have completed the tutorial to [import the sample data needed for this mission](hana-cloud-mission-trial-5) - You have [set up a development project in SAP Business Application Studio and connected it to your database](hana-cloud-mission-trial-8). diff --git a/tutorials/hana-cloud-mission-trial-2-ft/BTP-entitlement-save-ft.png b/tutorials/hana-cloud-mission-trial-2-ft/BTP-entitlement-save-ft.png deleted file mode 100644 index c48f8751c8..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/BTP-entitlement-save-ft.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/BTP-entitlements-ft.png b/tutorials/hana-cloud-mission-trial-2-ft/BTP-entitlements-ft.png deleted file mode 100644 index 1b0c67c07a..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/BTP-entitlements-ft.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/BTP-global-account.png b/tutorials/hana-cloud-mission-trial-2-ft/BTP-global-account.png deleted file mode 100644 index bd7ebe5af1..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/BTP-global-account.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/add-serv-plans.png b/tutorials/hana-cloud-mission-trial-2-ft/add-serv-plans.png deleted file mode 100644 index bb79f90292..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/add-serv-plans.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/assign-role.png b/tutorials/hana-cloud-mission-trial-2-ft/assign-role.png deleted file mode 100644 index 5b0fad7cfe..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/assign-role.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/banner-alex.png b/tutorials/hana-cloud-mission-trial-2-ft/banner-alex.png deleted file mode 100644 index 366d8c79ce..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/banner-alex.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/create-instance.png b/tutorials/hana-cloud-mission-trial-2-ft/create-instance.png deleted file mode 100644 index 6c37c5f769..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/create-instance.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/hana-cloud-mission-trial-2-ft.md b/tutorials/hana-cloud-mission-trial-2-ft/hana-cloud-mission-trial-2-ft.md deleted file mode 100644 index f22b420460..0000000000 --- a/tutorials/hana-cloud-mission-trial-2-ft/hana-cloud-mission-trial-2-ft.md +++ /dev/null @@ -1,165 +0,0 @@ ---- -parser: v2 -author_name: Dan van Leeuwen -author_profile: https://github.com/danielva -auto_validation: true -time: 10 -tags: [ tutorial>beginner, software-product>sap-hana-cloud, software-product-function>sap-btp-cockpit] -primary_tag: software-product>sap-hana-cloud ---- - -# Start Using SAP HANA Cloud Free Tier in SAP BTP Cockpit - Learn how to get started with SAP HANA Cloud free tier or how to add it to an existing account on SAP Business Technology Platform. - -## Prerequisites -## You will learn -- How to sign up for SAP HANA Cloud free tier -- How to add SAP HANA Cloud to an existing SAP BTP account -- How the SAP BTP Cockpit is structured and where to find SAP HANA Cloud in it - - -## Intro -This tutorial is part of a mission, in which you will learn in a hands-on, end-to-end setting how to use SAP HANA Cloud, SAP HANA database. SAP offers two free options to use SAP HANA Cloud. This tutorial covers the second option, which is using SAP HANA Cloud free tier. The free tier option can be easily upgraded to a paid version but does require payment details, while the trial allows you to use SAP HANA Cloud in a test environment and does not require payment details to sign up. If you would like to learn more about the first option (SAP HANA Cloud trial), navigate to the [previous tutorial](hana-cloud-mission-trial-2). - - ->![Alex Banner](banner-alex.png) -> -> **Help Alex gain business insights using SAP HANA Cloud, SAP HANA database.** -> -> In this mission, we will help Alex, the CEO of a fictitious company called *Best Run Travel* to answer a concrete business question with SAP HANA Cloud, SAP HANA database: -> -> * As a global travel agency, Best Run Travel has data from many different affiliates. -> * Alex needs to know the **top 5 partners** of their agency and wants to find out the **days with maximum booking of each partner**. -> * Best Run Travel uses SAP HANA Cloud, SAP HANA database to store and manage all its data. Now, your mission is to help Alex find a subset of the data related to the partner sales and create a way for Alex to share this subset with other departments in Best Run Travel. - - -In this tutorial, you will learn how to create an SAP Business Technology Platform (BTP) account and then add SAP HANA Cloud free tier services to your SAP BTP account. Having access to SAP HANA Cloud is a prerequisite for all other tutorials in this mission. - -> If you have a **production environment** of SAP HANA Cloud, SAP HANA database, you may also follow the steps described in this mission. - ---- - -### Get to know the SAP HANA Cloud free tier model -- Customers with an enterprise account can use the free service plans for SAP BTP to explore, learn, and try SAP BTP services (such as SAP HANA Cloud) with a path to productive use. - -- The free tier means you can try out selected services up to a specified capacity limit and switch easily to the paid tier, without losing any work. - -- The configuration of your free tier instance of SAP HANA Cloud, SAP HANA database is *16 GB of memory, 1 vCPU, and 80 GB of storage**. - -- If you do not restart your instance within **30 days**, it will be **deleted**. Additional details are available at [SAP HANA Database License](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/sap-hana-database-license). An [alert](https://help.sap.com/docs/alert-notification/sap-alert-notification-for-sap-btp/hdb-free-tier-instance-expiration) is sent if the instance is not started for 15 days. Further details on how to view and receive alerts can be found at [Alerts in SAP HANA Database and Data Lake](https://developers.sap.com/tutorials/hana-cloud-alerts.html). - -- In comparison, SAP BTP trial (introduced in the first tutorial) allows you to build full applications in a test environment to learn and explore the capabilities of SAP BTP. However, once customers and partners are ready to move to the next phase and deploy to production, they will need to get a new productive account and start over. - -- SAP HANA Cloud services are available as both a trial or free tier model – customers and partners can choose the option based on their preferences. Note that this tutorial contains details for the second option: SAP HANA Cloud free tier. - -- Features such as JSON document store, knowledge graph, and Script Server require larger HANA Cloud configurations (3 `vCPUs`, 45G memory) and are therefore *not supported* when using free tier. - -### Create an SAP BTP account to use the free tier model -If you would like to use the free tier model to get started with SAP HANA Cloud, [get an account on SAP BTP to try out free tier service plans](btp-free-tier-account) by following steps 1 to 8 of the linked tutorial. - -In order to use the SAP HANA Cloud free tier model, you will need to have the SAP HANA Cloud service entitlement available in your subaccount. To provision a free tier instance, the free tier service plans must be enabled in your subaccount entitlement (the next step will walk you through this). If you plan to upgrade your instance to a paid tier, the paid tier service plans must also be enabled. No charges will occur if you are only making use of the free tier service plans. However, if you decide to upgrade to a paid tier service plan, applicable charges will occur once the instance has been upgraded. - -Once you have your SAP BTP account setup, proceed to the next step to learn how to add the appropriate entitlements to your account. - -### Add SAP HANA Cloud to an existing SAP BTP account ->If you have an existing SAP BTP account, this section will walk you through adding entitlements to your SAP BTP account so you can start using the appropriate services. - -1. In the SAP BTP cockpit, click on your **subaccount**. - - ![open the subaccount](open-subaccount.png) - -2. Then click on **Entitlements** on the left-hand side menu and search for entitlements for SAP HANA. - - ![BTP Entitlements](BTP-entitlements-ft.png) - -3. Confirm that you have entitlements for the services (and service plans) listed here: - - - SAP HANA Cloud: - * `tools (Application)` - * `hana-free` - * `hana-cloud-connection-free` - * `relational-data-lake-free` - - - SAP HANA Schemas & HDI Containers: - * `hdi-shared` - * `schema` - * `securestore` - -4. If you do not have any of the entitlements above, you need to add them to your account. To do that, click on **Edit** on the top right-hand corner of the screen, then click on **Add Service Plans** in the same area of the screen. - - In the pop-up that opens, type `SAP HANA` in the search box to see all relevant entitlements. - - ![BTP select entitlements](add-serv-plans.png) - - After clicking on **Add X Service Plans**, where X is the number of services you want to add, make sure to click on the **Save** button. - - ![BTP entitlements save](BTP-entitlement-save-ft.png) - -### Add a subscription to SAP HANA Cloud tools - -1. From SAP BTP Cockpit, click on **Services** and then **Service Marketplace**. Search for **SAP HANA Cloud** and click **Create** in the top-right corner. - - ![Create an instance of SAP HANA Cloud](create-instance.png) - -2. Select **SAP HANA Cloud** under Service and **tools** under Plan. - - ![subscribe to tooling](subscribe-to-tooling-existing-acct.png) - -3. To ensure that your desired user has the necessary permissions to manage instances in HANA Cloud Central, navigate to **Security** > **Users** in the left hand side menu. Then click on your user. - - ![user management](user-mgmt.png) - - Click on the **Assign Role Collection** button. - - ![assign role collection](assign-role.png) - - Select **SAP HANA Cloud Administrator** then click Assign Role Collection. - - ![Select SAP HANA admin role](role-selected.png) - -4. Navigate to **Services**, **Instances and Subscriptions** and click on **SAP HANA Cloud** to open SAP HANA Cloud Central. - - ![hana cloud central](hcc-app.png) - -Congratulations, you have added free tier services to your account on SAP BTP! You now have the ability to [provision your free tier instance of SAP HANA Cloud](hana-cloud-mission-trial-3) and start your journey. - - -### Get to know SAP BTP cockpit -SAP BTP cockpit is a web-based interface used to manage SAP cloud applications, such as SAP HANA Cloud. This is where you can manage your SAP Business Technology Platform account and users as well as create new instances whenever necessary. - -Use the **Help** button at the top right-hand corner of the screen once you are logged in. This will open a **Help Topics** pane where areas that you can get help custom to the page will appear, as well as embedded links to guided answers and documentation. - -![BTP Help](BTP-help.png) - -For further details, consult our documentation material [here](https://help.sap.com/docs/btp). - - -### Understand Accounts, Directories, and Subaccounts -Your account on SAP Business Technology Platform is called a **global account**. As the administrator, you will have full control of your global account and be able to create directories, subaccounts, and instances. Subaccounts are a smaller part of your global account. Directories group subaccounts under the global account. - -![BTP Global Account](BTP-global-account.png) - -Below you can see a simplified diagram of a global account in SAP BTP Cockpit with different ways in which directories, subaccounts, are used to organize SAP HANA database and data lake instances. Of course, once you use SAP HANA Cloud, you will most likely have many more databases, subaccounts, and perhaps even global accounts. These levels will then help you keep everything well-organized. - -![BTP Illustration](btp-illustration.png) - -> **Global Account**: Your account on the SAP BTP Platform is called a global account. As the administrator, you will have full control of your global account and be able to create subaccounts, spaces, and instances. -> -> **Directories**: Directories group subaccounts into a folder and are useful to organize them. For example, if your subaccounts are geographical regions such as countries, your directories could be continents. -> -> **Subaccounts**: Subaccounts are a smaller part of your global account. For example, if your global account is your whole organization, your subaccounts could be either your geographical regions or specific departments, depending on what your internal structure requires. -> -> **Instances**: You can create and access instances of SAP HANA Cloud, SAP HANA database and SAP HANA Cloud, data lake. -> -> **Spaces**: You can choose to optionally provision an SAP HANA Cloud instance into the Cloud Foundry runtime. If you do, multiple Cloud Foundry spaces can be used to further organize instances. - -*Well done!* - -You have completed the second tutorial of this mission! Learn in the [next tutorial](hana-cloud-mission-trial-3) how to provision an instance of SAP HANA Cloud, SAP HANA database. - - - -### Knowledge Check - - ---- diff --git a/tutorials/hana-cloud-mission-trial-2-ft/hcc-app.png b/tutorials/hana-cloud-mission-trial-2-ft/hcc-app.png deleted file mode 100644 index 501080de19..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/hcc-app.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/open-subaccount.png b/tutorials/hana-cloud-mission-trial-2-ft/open-subaccount.png deleted file mode 100644 index ef4ba7bb7a..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/open-subaccount.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/role-selected.png b/tutorials/hana-cloud-mission-trial-2-ft/role-selected.png deleted file mode 100644 index 0e962639aa..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/role-selected.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/subscribe-to-tooling-existing-acct.png b/tutorials/hana-cloud-mission-trial-2-ft/subscribe-to-tooling-existing-acct.png deleted file mode 100644 index 8a6d0803e4..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/subscribe-to-tooling-existing-acct.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/user-mgmt.png b/tutorials/hana-cloud-mission-trial-2-ft/user-mgmt.png deleted file mode 100644 index 375060f19a..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2-ft/user-mgmt.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2/BTP-entitlement-save-ft.png b/tutorials/hana-cloud-mission-trial-2/BTP-entitlement-save-ft.png new file mode 100644 index 0000000000..afe8fbdcc4 Binary files /dev/null and b/tutorials/hana-cloud-mission-trial-2/BTP-entitlement-save-ft.png differ diff --git a/tutorials/hana-cloud-mission-trial-2/BTP-entitlements-ft.png b/tutorials/hana-cloud-mission-trial-2/BTP-entitlements-ft.png new file mode 100644 index 0000000000..2139061592 Binary files /dev/null and b/tutorials/hana-cloud-mission-trial-2/BTP-entitlements-ft.png differ diff --git a/tutorials/hana-cloud-mission-trial-2/BTP-entitlements.png b/tutorials/hana-cloud-mission-trial-2/BTP-entitlements.png deleted file mode 100644 index 4fcce3d58d..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2/BTP-entitlements.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2/BTP-global-account.png b/tutorials/hana-cloud-mission-trial-2/BTP-global-account.png new file mode 100644 index 0000000000..3da60b8029 Binary files /dev/null and b/tutorials/hana-cloud-mission-trial-2/BTP-global-account.png differ diff --git a/tutorials/hana-cloud-mission-trial-2/BTP-global-account2.png b/tutorials/hana-cloud-mission-trial-2/BTP-global-account2.png deleted file mode 100644 index 7373ad4827..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2/BTP-global-account2.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2/BTP-help-trial.png b/tutorials/hana-cloud-mission-trial-2/BTP-help-trial.png deleted file mode 100644 index 0a28cbdca0..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2/BTP-help-trial.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/BTP-help.png b/tutorials/hana-cloud-mission-trial-2/BTP-help.png similarity index 100% rename from tutorials/hana-cloud-mission-trial-2-ft/BTP-help.png rename to tutorials/hana-cloud-mission-trial-2/BTP-help.png diff --git a/tutorials/hana-cloud-mission-trial-2/BTP-trial-period.png b/tutorials/hana-cloud-mission-trial-2/BTP-trial-period.png deleted file mode 100644 index d9fa70ed05..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2/BTP-trial-period.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2/add-serv-plans.png b/tutorials/hana-cloud-mission-trial-2/add-serv-plans.png new file mode 100644 index 0000000000..1c9c950f78 Binary files /dev/null and b/tutorials/hana-cloud-mission-trial-2/add-serv-plans.png differ diff --git a/tutorials/hana-cloud-mission-trial-2/assign-role.png b/tutorials/hana-cloud-mission-trial-2/assign-role.png index b65e51060b..fd0b9f23db 100644 Binary files a/tutorials/hana-cloud-mission-trial-2/assign-role.png and b/tutorials/hana-cloud-mission-trial-2/assign-role.png differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/btp-illustration.png b/tutorials/hana-cloud-mission-trial-2/btp-illustration.png similarity index 100% rename from tutorials/hana-cloud-mission-trial-2-ft/btp-illustration.png rename to tutorials/hana-cloud-mission-trial-2/btp-illustration.png diff --git a/tutorials/hana-cloud-mission-trial-2/btp-org-illustration.png b/tutorials/hana-cloud-mission-trial-2/btp-org-illustration.png deleted file mode 100644 index ee98091a23..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2/btp-org-illustration.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2/create-instance.png b/tutorials/hana-cloud-mission-trial-2/create-instance.png deleted file mode 100644 index 18a21fe559..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2/create-instance.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2/create-subscription.png b/tutorials/hana-cloud-mission-trial-2/create-subscription.png new file mode 100644 index 0000000000..dd90de5928 Binary files /dev/null and b/tutorials/hana-cloud-mission-trial-2/create-subscription.png differ diff --git a/tutorials/hana-cloud-mission-trial-2-ft/deletion-warning.png b/tutorials/hana-cloud-mission-trial-2/deletion-warning.png similarity index 100% rename from tutorials/hana-cloud-mission-trial-2-ft/deletion-warning.png rename to tutorials/hana-cloud-mission-trial-2/deletion-warning.png diff --git a/tutorials/hana-cloud-mission-trial-2/hana-cloud-mission-trial-2.md b/tutorials/hana-cloud-mission-trial-2/hana-cloud-mission-trial-2.md index 5a2470fdb9..14d4773cad 100644 --- a/tutorials/hana-cloud-mission-trial-2/hana-cloud-mission-trial-2.md +++ b/tutorials/hana-cloud-mission-trial-2/hana-cloud-mission-trial-2.md @@ -8,19 +8,22 @@ tags: [ tutorial>beginner, software-product>sap-hana-cloud, software-product-fun primary_tag: software-product>sap-hana-cloud --- -# Start Using SAP HANA Cloud Trial in SAP BTP Cockpit - Learn how to configure entitlements and create a subscription for SAP HANA Cloud. +# Start Using SAP HANA Cloud Free Tier Service in SAP BTP Cockpit + + Learn how to get started with SAP HANA Cloud free tier service in the SAP Business Technology Platform (SAP BTP). ## Prerequisites -- You have signed up for an [SAP HANA Cloud trial account](hana-cloud-mission-trial-1) + +- You have access to a SAP BTP trial account or a productive account that has SAP HANA Cloud entitlements ## You will learn -- How to add SAP HANA Cloud to an existing SAP BTP trial account -- How the SAP BTP cockpit is structured and where to find SAP HANA Cloud in it + +- How to subscribe to the SAP HANA Tools +- About the SAP BTP Cockpit and SAP BTP subaccount ## Intro -This tutorial is part of a mission, in which you will learn in a hands-on, end-to-end setting how to use SAP HANA Cloud, SAP HANA database. SAP offers two free options to use SAP HANA Cloud. This tutorial covers the first option, which is using SAP HANA Cloud trial. The free tier option can be easily upgraded to a paid version but does require payment details, while the trial allows you to use SAP HANA Cloud in a test environment and does not require payment details to sign up. If you would like to learn more about the free tier option (SAP HANA Cloud trial), navigate to the [next tutorial](hana-cloud-mission-trial-2-ft). +This tutorial is part of a mission, in which you will learn in a hands-on, end-to-end setting how to use SAP HANA Cloud, SAP HANA database. In this tutorial you will learn how to work with the entitlements and role collections required for the SAP HANA Cloud tooling as well as get an overview of the SAP BTP Cockpit and subaccount. >![Alex Banner](banner-alex.png) > @@ -28,50 +31,58 @@ This tutorial is part of a mission, in which you will learn in a hands-on, end-t > > In this mission, we will help Alex, the CEO of a fictitious company called *Best Run Travel* to answer a concrete business question with SAP HANA Cloud, SAP HANA database: > -> * As a global travel agency, Best Run Travel has data from many different affiliates. -> * Alex needs to know the **top 5 partners** of their agency and wants to find out the **days with maximum booking of each partner**. -> * Best Run Travel uses SAP HANA Cloud, SAP HANA database to store and manage all its data. Now, your mission is to help Alex find a subset of the data related to the partner sales and create a way for Alex to share this subset with other departments in Best Run Travel. +> - As a global travel agency, Best Run Travel has data from many different affiliates. +> - Alex needs to know the **top 5 partners** of their agency and wants to find out the **days with maximum booking of each partner**. +> - Best Run Travel uses SAP HANA Cloud, SAP HANA database to store and manage all its data. Now, your mission is to help Alex find a subset of the data related to the partner sales and create a way for Alex to share this subset with other departments in Best Run Travel. - In this tutorial, you will learn how to add the new multi-environment tooling SAP HANA Cloud to new or existing trial accounts of SAP Business Technology Platform. Having access to SAP HANA Cloud is a prerequisite for all other tutorials in this mission. +--- -> If you have a **production environment** of SAP HANA Cloud, SAP HANA database, you may also follow the steps described in this mission. +### Examine the SAP HANA Cloud entitlements -### Examine entitlements for SAP HANA Cloud +Before a service can be used in the SAP BTP Cockpit, it must have its entitlements enabled. -1. In the SAP BTP Cockpit, click on your **subaccount**. - - ![open the trial subaccount](subaccount2.png) +1. In the SAP BTP cockpit, click on your **subaccount**. - > Currently, the trial version of SAP HANA Cloud is offered only in AWS US East. + ![open the subaccount](open-subaccount.png) -2. Then click on **Entitlements** on the left-hand side menu and search for entitlements for SAP HANA. +2. Then click on **Entitlements** on the left-hand side menu and search for entitlements for SAP HANA Cloud. - ![BTP Entitlements](BTP-entitlements.png) + ![BTP Entitlements](BTP-entitlements-ft.png) -3. Notice that the following entitlements are shown. +3. Confirm that you have entitlements for the services and plans listed here: - - SAP HANA Cloud: - * `tools (Application)` - * `hana-cloud-connection` - * `hana` - * `relational-data-lake` + - SAP HANA Cloud: + - `tools (Application)` + - `hana-free` + - `hana-cloud-connection-free` + - `relational-data-lake-free` - SAP HANA Schemas & HDI Containers: - * `hdi-shared` - * `schema` - * `securestore` + - `hdi-shared` + - `schema` + - `securestore` + +4. If you do not have any of the entitlements above, you need to add them to your account. To do that, click on **Edit** on the top right-hand corner of the screen, then click on **Add Service Plans** in the same area of the screen. + + In the pop-up that opens, type `SAP HANA` in the search box to see all relevant entitlements. + + ![BTP select entitlements](add-serv-plans.png) + + After clicking on **Add X Service Plans**, where X is the number of services you want to add, make sure to click on the **Save** button. + + ![BTP entitlements save](BTP-entitlement-save-ft.png) ### Add a subscription to SAP HANA Cloud tools 1. From SAP BTP Cockpit, click on **Services** and then **Service Marketplace**. Search for **SAP HANA Cloud** and click **Create** in the top-right corner. - ![Create an instance of SAP HANA Cloud](create-instance.png) + ![Create an instance of SAP HANA Cloud](create-subscription.png) 2. Select **SAP HANA Cloud** under Service and **tools** under Plan. ![subscribe to tooling](subscribe-to-tooling-existing-acct.png) -3. To ensure that your desired user has the necessary permissions to manage instances in HANA Cloud Central, navigate to **Security** > **Users** in the left-hand side menu. Then click on your user. +3. To ensure that your desired user has the necessary permissions to manage instances in HANA Cloud Central, navigate to **Security** > **Users** in the left hand side menu. Then click on your user. ![user management](user-mgmt.png) @@ -83,50 +94,32 @@ This tutorial is part of a mission, in which you will learn in a hands-on, end-t ![Select SAP HANA admin role](role-selected.png) -4. Navigate to **Instances**, **Instances and Subscriptions** and click on **SAP HANA Cloud** to open SAP HANA Cloud Central. +4. Navigate to **Services**, **Instances and Subscriptions** and click on **SAP HANA Cloud** to open SAP HANA Cloud Central. ![hana cloud central](hcc-app.png) +Congratulations, you have added free tier services to your account on SAP BTP! You now have the ability to [provision your free tier instance of SAP HANA Cloud](hana-cloud-mission-trial-3) and start your journey. -Congratulations, you have added the SAP HANA Cloud entitlements and subscribed to the multi-environment tools. You now have the ability to [provision your trial instance of SAP HANA Cloud](hana-cloud-mission-trial-3) and start your journey. - -### Get to know SAP BTP Cockpit -SAP BTP Cockpit is a web-based interface used to manage SAP cloud applications, such as SAP HANA Cloud. This is where you can manage your SAP Business Technology Platform account and users as well as create new instances whenever necessary. +### Get to know SAP BTP cockpit -![Screenshot Trial home page](ss-09-trial-home-page.png) +SAP BTP cockpit is a web-based interface used to manage SAP cloud applications, such as SAP HANA Cloud. This is where you can manage your SAP Business Technology Platform account and users as well as create new instances whenever necessary. -When you first access your trial account, you will see the [**Trial Home Page**](https://account.hanatrial.ondemand.com/trial/#/home/trial). +Use the **Help** button at the top right-hand corner of the screen once you are logged in. This will open a **Help Topics** pane where areas that you can get help custom to the page will appear, as well as embedded links to guided answers and documentation. -> In a production environment, you do not see the Trial Home Page. +![BTP Help](BTP-help.png) -This is where you can enter your account but also find helpful resources to get to know the SAP BTP Cockpit in detail: +For further details, consult our documentation material [here](https://help.sap.com/docs/btp). -- Take the virtual tour once you start your trial for the first time. +### Understand Accounts, Directories, and Subaccounts - ![Screenshot Trial home page Tour](ss-10-trial-home-page-tour.png) +Your account on SAP Business Technology Platform is called a **global account**. As the administrator, you will have full control of your global account and be able to create directories, subaccounts, and instances. Subaccounts are a smaller part of your global account. Directories group subaccounts under the global account. -There is also some built-in functionality that can help you with using SAP BTP Cockpit and provide you with more information: +![BTP Global Account](BTP-global-account.png) -- Use the **Help** button at the top right-hand corner of the screen once you are logged in. This will open a **Help Topics** pane where areas that you can get help custom to the page will appear, as well as embedded links to guided answers and documentation. +Below you can see a simplified diagram of a global account in SAP BTP Cockpit with different ways in which directories, subaccounts, are used to organize SAP HANA database and data lake instances. Of course, once you use SAP HANA Cloud, you will most likely have many more databases, subaccounts, and perhaps even global accounts. These levels will then help you keep everything well-organized. - ![BTP Help](BTP-help-trial.png) - -- Use **Trial Period** to get more information about your SAP BTP Trial. - - ![BTP Help](BTP-trial-period.png) - -- For further details, consult our documentation material [here](https://help.sap.com/docs/btp). - - -### Understand Accounts, Directories, Subaccounts, and Spaces -Your account on SAP Business Technology Platform is called a **global account**. As the administrator, you will have full control of your global account and be able to create directories, subaccounts, and instances. Subaccounts are a smaller part of your global account. Directories are groups of subaccounts under the global account. - -![BTP Global Account](BTP-global-account2.png) - -Below you can see a simplified diagram of a global account in SAP BTP cockpit with different ways in which directories and subaccounts are used to organize SAP HANA database and data lake instances. Of course, once you use SAP HANA Cloud, you will most likely have many more databases, subaccounts, and perhaps even global accounts. These levels will then help you keep everything well-organized. - -![BTP Illustration](btp-org-illustration.png) +![BTP Illustration](btp-illustration.png) > **Global Account**: Your account on the SAP BTP Platform is called a global account. As the administrator, you will have full control of your global account and be able to create subaccounts, spaces, and instances. > @@ -134,15 +127,15 @@ Below you can see a simplified diagram of a global account in SAP BTP cockpit wi > > **Subaccounts**: Subaccounts are a smaller part of your global account. For example, if your global account is your whole organization, your subaccounts could be either your geographical regions or specific departments, depending on what your internal structure requires. > -> **Instances**: You can create and access instances of SAP HANA Cloud, SAP HANA database, and SAP HANA Cloud, data lake. +> **Instances**: You can create and access instances of SAP HANA Cloud, SAP HANA database and SAP HANA Cloud, data lake. > > **Spaces**: You can choose to optionally provision an SAP HANA Cloud instance into the Cloud Foundry runtime. If you do, multiple Cloud Foundry spaces can be used to further organize instances. *Well done!* -You have completed the first tutorial of this mission! Proceed to the [fourth tutorial](hana-cloud-mission-trial-3) in this mission to learn how to provision an instance of SAP HANA Cloud, SAP HANA database. +You have completed the second tutorial of this mission! Learn in the [next tutorial](hana-cloud-mission-trial-3) how to provision an instance of SAP HANA Cloud, SAP HANA database. -### Knowledge Check +### Knowledge Check --- diff --git a/tutorials/hana-cloud-mission-trial-2/hcc-app.png b/tutorials/hana-cloud-mission-trial-2/hcc-app.png index c10904f618..ff4f2cec80 100644 Binary files a/tutorials/hana-cloud-mission-trial-2/hcc-app.png and b/tutorials/hana-cloud-mission-trial-2/hcc-app.png differ diff --git a/tutorials/hana-cloud-mission-trial-2/open-subaccount.png b/tutorials/hana-cloud-mission-trial-2/open-subaccount.png new file mode 100644 index 0000000000..b06952a155 Binary files /dev/null and b/tutorials/hana-cloud-mission-trial-2/open-subaccount.png differ diff --git a/tutorials/hana-cloud-mission-trial-2/role-selected.png b/tutorials/hana-cloud-mission-trial-2/role-selected.png index 1a87eed9a1..31d6e54950 100644 Binary files a/tutorials/hana-cloud-mission-trial-2/role-selected.png and b/tutorials/hana-cloud-mission-trial-2/role-selected.png differ diff --git a/tutorials/hana-cloud-mission-trial-2/ss-09-trial-home-page.png b/tutorials/hana-cloud-mission-trial-2/ss-09-trial-home-page.png deleted file mode 100644 index 18d851edb7..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2/ss-09-trial-home-page.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2/ss-10-trial-home-page-tour.png b/tutorials/hana-cloud-mission-trial-2/ss-10-trial-home-page-tour.png deleted file mode 100644 index 53acc361b6..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2/ss-10-trial-home-page-tour.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2/subaccount2.png b/tutorials/hana-cloud-mission-trial-2/subaccount2.png deleted file mode 100644 index 4b9615686e..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-2/subaccount2.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-2/subscribe-to-tooling-existing-acct.png b/tutorials/hana-cloud-mission-trial-2/subscribe-to-tooling-existing-acct.png index d0dea7e896..f73fa6db16 100644 Binary files a/tutorials/hana-cloud-mission-trial-2/subscribe-to-tooling-existing-acct.png and b/tutorials/hana-cloud-mission-trial-2/subscribe-to-tooling-existing-acct.png differ diff --git a/tutorials/hana-cloud-mission-trial-2/user-mgmt.png b/tutorials/hana-cloud-mission-trial-2/user-mgmt.png index 9999bdd7ba..1becfc489f 100644 Binary files a/tutorials/hana-cloud-mission-trial-2/user-mgmt.png and b/tutorials/hana-cloud-mission-trial-2/user-mgmt.png differ diff --git a/tutorials/hana-cloud-mission-trial-3/estimator-tiers.png b/tutorials/hana-cloud-mission-trial-3/estimator-tiers.png index de5b8f7398..a00f84508a 100644 Binary files a/tutorials/hana-cloud-mission-trial-3/estimator-tiers.png and b/tutorials/hana-cloud-mission-trial-3/estimator-tiers.png differ diff --git a/tutorials/hana-cloud-mission-trial-3/hana-cloud-mission-trial-3.md b/tutorials/hana-cloud-mission-trial-3/hana-cloud-mission-trial-3.md index a5bbbf1c49..775d8acba1 100644 --- a/tutorials/hana-cloud-mission-trial-3/hana-cloud-mission-trial-3.md +++ b/tutorials/hana-cloud-mission-trial-3/hana-cloud-mission-trial-3.md @@ -9,25 +9,28 @@ primary_tag: software-product>sap-hana-cloud --- # Provision an Instance of SAP HANA Cloud, SAP HANA Database + Learn how to provision an instance of SAP HANA Cloud, SAP HANA database. ## Prerequisites -- You have access to [SAP HANA Cloud trial](hana-cloud-mission-trial-2), [SAP HANA Cloud free tier](hana-cloud-mission-trial-2-ft), or a production environment of SAP HANA Cloud, SAP HANA database +- You have access to a SAP BTP trial account or a productive account that has SAP HANA Cloud entitlements ## You will learn -- How to provision an instance of SAP HANA Cloud, SAP HANA database + +- How the provisioning wizard in SAP HANA Cloud can be used to configure the settings and features of an SAP HANA Cloud database instance. ## Intro -A few notes to remember about free tier model and trial accounts: -- If you are using a free tier model or trial account, you will only be able to create one instance with a predefined size (16 GB of memory, 1 vCPU, and 80 GB of storage for trial). However, the process to create the instance is very similar to production environments, the difference being that in a production environment you have the ability to further customize your instance. For example, you are able to change advanced settings for your SAP HANA Cloud instance. +A few notes to remember about free tier instances: + +- If you are using a free tier instance, you will only be able to create one instance with a predefined size (16 GB of memory, 1 vCPU, and 80 GB of storage). However, the process to create the instance is very similar to production environments, the difference being that in a production environment you can further customize your instance. For example, you can change advanced settings for your SAP HANA Cloud instance. -- Free tier model and trial instances will be **stopped on a nightly basis**. Each time you start working with your free tier model or trial instance, you need to restart it. +- Free tier instances will be **stopped on a nightly basis**. Each time you start working with your free tier instance, you need to restart it. -- If you do not restart your trial instance within **30 days**, it will be **deleted**. Your BTP account, however, will continue to exist and you can easily provision an instance again, if you wish to do so. +- If you do not restart your free tier instance within **30 days**, it will be **deleted**. Your BTP account, however, will continue to exist and you can easily provision an instance again, if you wish to do so. -- The instance summary card: Trial (left) and free tier (middle) does not display a cost estimate. If you are using free tier, ensure you see the free tier indicator icon since paid tier (right) will show you a cost estimate meaning charges will be incurred if you create an instance. +- The instance summary card for a free tier instance does not display a cost estimate. If you are using free tier, ensure you see the free tier indicator icon since paid tier (right) will show you a cost estimate meaning charges will be incurred if you create an instance. ![Estimator for each tier](estimator-tiers.png) @@ -35,28 +38,6 @@ A few notes to remember about free tier model and trial accounts: ### Start the Provisioning Wizard -[OPTION BEGIN [Trial]] - -To create your first instance of SAP HANA Cloud, SAP HANA database, you need to follow these steps: - -1. In SAP BTP cockpit, open SAP HANA Cloud Central by clicking on the subscription to SAP HANA Cloud in the **Subscriptions** tab. - - ![HCC ME tooling](hcc-app.png) - -2. On the top-right corner of the screen, click on **Create Instance**. - - ![Create instance in SAP HANA Cloud Central](hcc-create-instance.png) - -3. Here you must choose the **Type** of instance to create. Select **SAP HANA Database**. With the trial account, you have the option to manually configure your SAP HANA Database. - - > If you would like to learn more about **SAP HANA Cloud, Data Lake**, and [Get Started with a Standalone SAP HANA Cloud, Data Lake](mission.hana-cloud-data-lake-get-started), navigate to the linked mission for the basics. - - ![Trial Provisioning Wizard](trial-step-1.png) - -4. Click on **Next Step** to continue. - -[OPTION END] - [OPTION BEGIN [Free Tier]] To create your first instance of SAP HANA Cloud, SAP HANA database, you need to follow these steps: @@ -65,19 +46,19 @@ To create your first instance of SAP HANA Cloud, SAP HANA database, you need to ![HCC ME tooling](hcc-app.png) -2. On the top-right corner of the screen, click on **Create Instance**. +2. On the top-right corner of the screen, click on **Create Instance**. ![Create instance in SAP HANA Cloud Central](hcc-create-instance.png) -3. Here you must choose the **Type** of instance to create. Select **SAP HANA Database**. - - Note that if you have enabled only one type of service plan in your SAP HANA Cloud entitlement (e.g. free tier only), the License section does not appear and that service plan type will be used automatically. +3. Here you must choose the **Type** of instance to create. Select **SAP HANA Database**. + + Note that if you have enabled only one type of service plan in your SAP HANA Cloud entitlement (e.g. free tier only), the License section does not appear, and that service plan type will be used automatically. > If you would like to learn more about **SAP HANA Cloud, Data Lake**, and [Get Started with a Standalone SAP HANA Cloud, Data Lake](mission.hana-cloud-data-lake-get-started), navigate to the linked mission for the basics. ![Free Tier Provisioning Wizard](free-tier-step-1.png) -4. Click on **Next Step** to continue. +4. Click on **Next Step** to continue. [OPTION END] @@ -85,37 +66,37 @@ To create your first instance of SAP HANA Cloud, SAP HANA database, you need to To create your first instance of SAP HANA Cloud, SAP HANA database, you need to follow these steps: -1. In SAP BTP cockpit, open SAP HANA Cloud Central by clicking on the subscription to SAP HANA Cloud in the **Subscriptions** tab. +1. In SAP BTP cockpit, open SAP HANA Cloud Central by clicking on the subscription to SAP HANA Cloud in the **Subscriptions** tab. - ![HCC ME tooling](hcc-app.png) + ![HCC ME tooling](open-hcc.png) -2. On the top-right corner of the screen, click on **Create Instance**. +2. On the top-right corner of the screen, click on **Create Instance**. ![Create instance in SAP HANA Cloud Central](hcc-create-instance.png) -3. Here you must choose the **Type** of instance to create. - +3. Here you must choose the **Type** of instance to create. + A **License** section will appear. To use the free tier model, click on **Free Tier** so that it is highlighted as shown below. Select **SAP HANA Database**. You have multiple options to configure your instance. Select **Configure manually**. - + Note that if you have enabled only one type of service plan in your SAP HANA Cloud entitlement (e.g. free tier only), the License section does not appear and that service plan type will be used automatically. > If you would like to learn more about **SAP HANA Cloud, Data Lake**, and [Get Started with a Standalone SAP HANA Cloud, Data Lake](mission.hana-cloud-data-lake-get-started), navigate to the linked mission for the basics. ![Paid Tier Provisioning Wizard](paid-tier-step-1.png) -4. Click on **Next Step** to continue. +4. Click on **Next Step** to continue. [OPTION END] ### Choose your license, instance name, and password -1. In the **Basics** section, enter a name for your instance in the field **Instance Name**, such as `HC_HDB`. +1. In the **Basics** section, enter a name for your instance in the field **Instance Name**, such as `HC_HDB`. > This field does not allow any spaces in the name. Keep in mind that you will not be able to change the name after the instance has been created. -2. Insert a password in the **Administrator Password** field. +2. Insert a password in the **Administrator Password** field. -3. Confirm it by typing it again in the **Confirm Administrator Password** field. +3. Confirm it by typing it again in the **Confirm Administrator Password** field. ![HANA step 1](hdb-instance-name.png) @@ -123,21 +104,29 @@ To create your first instance of SAP HANA Cloud, SAP HANA database, you need to 4. You may also choose the runtime environment. Further details can be found at [What Runtime Environment is my SAP HANA Cloud Instance Using?](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/runtime-environments-for-sap-hana-cloud) - -5. Now click on **Next Step** to continue. - +5. Now click on **Next Step** to continue. ### Set up the size of your database -> There are different instructions available to you depending on whether you are using a free tier model or trial account versus a production environment. Please make sure to select the one that applies to your situation to get the most out of this tutorial. +> There are different instructions available to you depending on whether you are using a free tier instance versus a productive instance. Please make sure to select the one that applies to your situation to get the most out of this tutorial. In this step of the provisioning wizard, you can set up the size of your SAP HANA database in SAP HANA Cloud. +[OPTION BEGIN [Free Tier]] + +For a free tier instance, the size allocation is predefined to 16 GB for memory, 80 GB for storage and 1 vCPU for computation. + +![SAP HANA Database Memory Allocation](hdb-memory2.png) + +Click on **Next Step** to continue. + +[OPTION END] + [OPTION BEGIN [Production]] In a production environment, you are able to select a performance class and choose the initial size of your instance. -1. Here, you can select how much **Memory** you wish to allocate to this instance. +1. Here, you can select how much **Memory** you wish to allocate to this instance. ![HDB Memory](2-ss-04-HDB-Memory.png) @@ -147,197 +136,184 @@ In a production environment, you are able to select a performance class and choo Follow this [link](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-administration-guide/sap-hana-database-size) to learn more about the memory allocation. -2. Click on **Next Step** to continue. +2. Click on **Next Step** to continue. [OPTION END] -[OPTION BEGIN [Free Tier/Trial]] +### Specify database availability zone and replicas -For a free tier and trial instance, the size allocation is predefined to 16 GB for memory, 80 GB for storage and 1 vCPUs for computation. +> There are different instructions available to you depending on whether you are using a free tier instance versus a productive instance. Please make sure to select the one that applies to your situation to get the most of this tutorial. +Here, you can select in this step if you want to create **replicas** of your instance to increase your system availability. These replicas are exact duplicates of your instance that will be managed in the background and automatically synchronized. In case of issues, you can take over a replica of your instance to ensure minimal interruption. -![SAP HANA Database Memory Allocation](hdb-memory2.png) +[OPTION BEGIN [Free Tier]] -Click on **Next Step** to continue. +In a free tier instance, availability zone and replicas are not supported. -[OPTION END] +![HANA database replicas](hdb-replicas2.png) +To read more about increasing system availability, you can check this [technical documentation](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/increasing-system-availability). -### Specify database availability zone and replicas +Click on **Next Step** to continue. -> There are different instructions available to you depending on whether you are using a free tier model or trial account versus a production environment. Please make sure to select the one that applies to your situation to get the most of this tutorial. +> Keep in mind that you cannot change the availability zone of the instance after it has been created. To update replicas, you need to delete and re-create them. -Here, you can select in this step if you want to create **replicas** of your instance to increase your system availability. These replicas are exact duplicates of your instance that will be managed in the background and automatically synchronized. In case of issues, you can take over a replica of your instance to ensure minimal interruption. +[OPTION END] [OPTION BEGIN [Production]] -1. Select the availability zone for your instance and optionally, include a replica. +1. Select the availability zone for your instance and optionally, include a replica. ![Availability Zone](avail-zone2.png) To read more about increasing system availability, you can check this [technical documentation](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/increasing-system-availability). -2. Click on **Next Step** to continue. +2. Click on **Next Step** to continue. > Keep in mind that you cannot change the **availability zone of the instance** after it has been created. To update replicas, you need to delete and re-create the instance. [OPTION END] -[OPTION BEGIN [Free Tier/Trial]] -In a free tier model or trial environment, availability zone and replicas are not supported. +### Check the advanced settings + +> There are different instructions are available to you depending on whether you are using a free tier instance vs a productive instance. Please make sure to select the one that applies to your situation to get the most of this tutorial. -![HANA database replicas](hdb-replicas2.png) +[OPTION BEGIN [Free Tier]] -To read more about increasing system availability, you can check this [technical documentation](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/increasing-system-availability). +Now you can configure the **Advanced Settings**. -Click on **Next Step** to continue. +1. The Predictive Analysis Library (PAL) is not required for this tutorial mission. Further details can be found at [Hands-on Tutorial: Machine Learning with SAP HANA Cloud](https://community.sap.com/t5/artificial-intelligence-and-machine-learning-blogs/hands-on-tutorial-machine-learning-with-sap-hana-cloud/ba-p/13683430). -> Keep in mind that you cannot change the availability zone of the instance after it has been created. To update replicas, you need to delete and re-create them. +2. The Data Provisioning Server is not required in this tutorial mission. -[OPTION END] +3. You may manage the allowed connections for your SAP HANA database instance, i.e. allowing access to your SAP HANA database instance from outside of the SAP Business Technology Platform (SAP BTP). Selecting Allow only BTP IP addresses denies all IP addresses outside SAP BTP. You may choose to allow access to specific applications by inserting one or more specific IP addresses or you can allow connections from all IP addresses. +4. Next, you can also choose to enable the SAP Cloud Connector, which makes it easier to connect this SAP HANA database instance to an SAP HANA on-premises database. You can also set the connection preferences for your cloud connector under **Allowed connections**. + > Keep in mind that you can still change your configurations here at a later point, if you decide to do so. -### Check the advanced settings + ![HDB advanced settings](hdb-advanced-settings2.png) + +5. Instance mapping enables an instance provisioned into the SAP BTP subaccount to be mapped into a runtime environment such as Cloud Foundry. Step-by-step instructions can be found in the [Create a Development Project in SAP Business Application Studio](hana-cloud-mission-trial-8) tutorial. + +6. Click on **Next Step** in the bottom left corner to continue. -> There are different instructions are available to you depending on whether you are using a free tier model or trial account versus a production environment. Please make sure to select the one that applies to your situation to get the most of this tutorial. +[OPTION END] [OPTION BEGIN [Production]] -1. Under **Advanced Settings**, you can choose to enable additional features such as the **Script Server**, **Document Store**, **Triple Store**, **Natural Language Processing (NLP)**, and **Data Provisioning Server**. If your database does not have the required `vCPUs` for either of the first two options, you can click on the link on the error message, which will change your original setup and add more `vCPUs` automatically. +1. Under **Advanced Settings**, you can choose to enable additional features such as the **Script Server**, **Document Store**, **Triple Store**, **Natural Language Processing (NLP)**, and **Data Provisioning Server**. If your database does not have the required `vCPUs` for either of the first two options, you can click on the link on the error message, which will change your original setup and add more `vCPUs` automatically. ![Advanced Settings](prod-advanced-settings2.png) -2. You can now manage the allowed connections for your SAP HANA database instance, i.e., you can choose to allow access to your SAP HANA database instance from outside of the SAP Business Technology Platform. You can either limit it to SAP Business Technology Platform by denying all IP addresses, or allow specific applications to access it by inserting one or more specific IP addresses. Finally, you can also allow all connections from all IP addresses. +2. You can now manage the allowed connections for your SAP HANA database instance, i.e., you can choose to allow access to your SAP HANA database instance from outside of the SAP Business Technology Platform. You can either limit it to SAP Business Technology Platform by denying all IP addresses or allow specific applications to access it by inserting one or more specific IP addresses. Finally, you can also allow all connections from all IP addresses. -3. Next, you can also choose to enable the **SAP Cloud Connector**, which makes it easier to connect this SAP HANA database instance to an SAP HANA on-premise database. +3. Next, you can also choose to enable the **SAP Cloud Connector**, which makes it easier to connect this SAP HANA database instance to an SAP HANA on-premise database. > To get familiar with the **Cloud Connector**, you can check the [technical documentation](https://help.sap.com/docs/connectivity/sap-btp-connectivity-cf/cloud-connector). > >Select whether you want your SAP HANA database to connect to your on-premises remote sources through the cloud connector. For details, see the [SAP HANA Database Connectivity Documentation](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-data-access-guide/data-access-in-sap-hana-cloud-sap-hana-database?locale=en-US). > > Keep in mind that you can still change your configurations here at a later point, if you decide to do so. - -4. Instance mapping enables an instance provisioned into the SAP BTP subaccount to be mapped into a runtime environment such as Cloud Foundry. Step-by-step instructions can be found in the [Create a Development Project in SAP Business Application Studio](hana-cloud-mission-trial-8) tutorial. - -5. Click on **Next Step** in the bottom left corner to continue. - -[OPTION END] -[OPTION BEGIN [Free Tier/Trial]] - -Now you can configure the **Advanced Settings**. - -1. The Predictive Analysis Library (PAL) is not required for this tutorial mission. Further details can be found at [Hands-on Tutorial: Machine Learning with SAP HANA Cloud](https://community.sap.com/t5/artificial-intelligence-and-machine-learning-blogs/hands-on-tutorial-machine-learning-with-sap-hana-cloud/ba-p/13683430). - -2. The Data Provisioning Server is not required in this tutorial mission. - -3. You may manage the allowed connections for your SAP HANA database instance, i.e. allowing access to your SAP HANA database instance from outside of the SAP Business Technology Platform (SAP BTP). Selecting Allow only BTP IP addresses denies all IP addresses outside SAP BTP. You may choose to allow access to specific applications by inserting one or more specific IP addresses or you can allow connections from all IP addresses. - -4. Next, you can also choose to enable the SAP Cloud Connector, which makes it easier to connect this SAP HANA database instance to an SAP HANA on-premises database. You can also set the connection preferences for your cloud connector under **Allowed connections**. - - > Keep in mind that you can still change your configurations here at a later point, if you decide to do so. - - ![HDB advanced settings](hdb-advanced-settings2.png) -5. Instance mapping enables an instance provisioned into the SAP BTP subaccount to be mapped into a runtime environment such as Cloud Foundry. Step-by-step instructions can be found in the [Create a Development Project in SAP Business Application Studio](hana-cloud-mission-trial-8) tutorial. +4. Instance mapping enables an instance provisioned into the SAP BTP subaccount to be mapped into a runtime environment such as Cloud Foundry. Step-by-step instructions can be found in the [Create a Development Project in SAP Business Application Studio](hana-cloud-mission-trial-8) tutorial. -6. Click on **Next Step** in the bottom left corner to continue. +5. Click on **Next Step** in the bottom left corner to continue. [OPTION END] - ### Enable the SAP HANA Cloud, data lake (optional) In the last step of the provisioning wizard, you have the option of also provisioning a managed data lake. If you enable the data lake in this step, this data lake will have maximum compatibility with SAP HANA and a remote connection between your SAP HANA database and the data lake will be created automatically during provisioning. > If you do not wish to enable a data lake, you can skip this step by clicking on **Review and Create** in the bottom-right corner. -[OPTION BEGIN [Production]] -1. If you click on **Create data lake**, a managed SAP HANA Cloud, data lake will be provisioned alongside your SAP HANA database in SAP HANA Cloud and will include a data lake Files instance. +[OPTION BEGIN [Free Tier]] - ![Data Lake Enabled](hdl-prod-create2.png) +1. Once you select **Create Data Lake** option, two more menu options will appear in the wizard with additional steps. Note that a data lake Files instance is not included in the free tier plan. -2. Next, give your data lake instance a name under **Instance Name**. + ![Create Data Lake](hdl-create2.png) - ![Data lake name](hdl-prod-name2.png) +2. Next, give your data lake instance a name under **Instance Name**. - > When you add a managed data lake, the HDLADMIN user is automatically created and is given the same password as DBADMIN, which you set in the first step. If later you decide to change the password of one user, the password of the other user will **not** be automatically changed. + >When you add a managed data lake, the HDLADMIN user is automatically created and is given the same password as DBADMIN, which you set in the first step. If later you decide to change the password of one user, the password of the other user will **not** be automatically changed. -3. Click on **Next Step** to continue. + ![Name Data Lake](hdl-name2.png) -4. This is where you can adjust how many **coordinators** and **workers** you want for your data lake, as well the amount of **storage** you wish to allocate to this instance. +3. In production environment this is where you can adjust how many **coordinators** and **workers** you want for your data lake, as well the amount of **storage** you wish to allocate to this instance. But for a free tier instance, you can't change these as they are predefined settings. - ![Data Lake IQ](hdl-prod-dlre2.png) + > Please remember that you can enable or disable the data lake later as well if you prefer. + > + > The coordinator and worker size, as well as the number of workers will affect instance pricing. For details, see [SAP HANA Cloud Capacity Unit Estimator](https://hcsizingestimator.cfapps.eu10.hana.ondemand.com/). - > The coordinator and worker size, as well as the number of workers will affect instance pricing. For details, see SAP HANA Cloud Capacity Unit Estimator. + ![Data lake size](hdl-size2.png) -5. Click on **Next Step** to continue. +4. Click on **Next Step** to continue. -6. Now you can set up the **Advanced Settings** for the data lake. Here you can manage the allowed connections and choose - just like you did for your SAP HANA database in SAP HANA Cloud - if you want to allow only BTP IP addresses, all IP addresses or, specific IP addresses. The last option also gives you the option to **Copy IP addresses from the SAP HANA database** choosing again, who can have access to your data lake instance. +5. Now you can set up the **Advanced Settings** for the data lake instance. Here you can manage the allowed connections and chose - just like for your SAP HANA database in SAP HANA Cloud - if you want to allow only BTP IP addresses, all IP addresses or specific IP addresses. - ![HDL Connections](hdl-prod-review2.png) + Note that backups are not available for free tier instances. + + ![Data lake advanced](hdl-advanced2.png) + +6. Lastly, click on **Review and Create** to finish the provisioning process and **Create Instance**. -7. Lastly, click on **Review and Create** to finish the provisioning process. + ![Data Lake Create Instances](hdl-create-instance2.png) [OPTION END] -[OPTION BEGIN [Free Tier/Trial]] -1. Once you select **Create Data Lake** option, two more menu options will appear in the wizard with additional steps. Note that a data lake Files instance is not included in free tier or trial. +[OPTION BEGIN [Production]] + +1. If you click on **Create data lake**, a managed SAP HANA Cloud, data lake will be provisioned alongside your SAP HANA database in SAP HANA Cloud and will include a data lake Files instance. - ![Create Data Lake](hdl-create2.png) + ![Data Lake Enabled](hdl-prod-create2.png) 2. Next, give your data lake instance a name under **Instance Name**. - >When you add a managed data lake, the HDLADMIN user is automatically created and is given the same password as DBADMIN, which you set in the first step. If later you decide to change the password of one user, the password of the other user will **not** be automatically changed. - - ![Name Data Lake](hdl-name2.png) + ![Data lake name](hdl-prod-name2.png) -3. In production environment this is where you can adjust how many **coordinators** and **workers** you want for your data lake, as well the amount of **storage** you wish to allocate to this instance. But in a free tier model or trial account, you can't change these as they are predefined settings. + > When you add a managed data lake, the HDLADMIN user is automatically created and is given the same password as DBADMIN, which you set in the first step. If later you decide to change the password of one user, the password of the other user will **not** be automatically changed. - > Please remember that you can enable or disable the data lake later as well if you prefer. - > - > The coordinator and worker size, as well as the number of workers will affect instance pricing. For details, see [SAP HANA Cloud Capacity Unit Estimator](https://hcsizingestimator.cfapps.eu10.hana.ondemand.com/). +3. Click on **Next Step** to continue. - ![Data lake size](hdl-size2.png) +4. This is where you can adjust how many **coordinators** and **workers** you want for your data lake, as well the amount of **storage** you wish to allocate to this instance. -4. Click on **Next Step** to continue. + ![Data Lake IQ](hdl-prod-dlre2.png) -5. Now you can set up the **Advanced Settings** for the data lake instance. Here you can manage the allowed connections and chose - just like for your SAP HANA database in SAP HANA Cloud - if you want to allow only BTP IP addresses, all IP addresses or specific IP addresses. + > The coordinator and worker size, as well as the number of workers will affect instance pricing. For details, see SAP HANA Cloud Capacity Unit Estimator. - Note that backups are not available for instances under free tier or trial accounts. +5. Click on **Next Step** to continue. - ![Data lake advanced](hdl-advanced2.png) +6. Now you can set up the **Advanced Settings** for the data lake. Here you can manage the allowed connections and choose - just like you did for your SAP HANA database in SAP HANA Cloud - if you want to allow only BTP IP addresses, all IP addresses or, specific IP addresses. The last option also gives you the option to **Copy IP addresses from the SAP HANA database** choosing again, who can have access to your data lake instance. -6. Lastly, click on **Review and Create** to finish the provisioning process and **Create Instance**. + ![HDL Connections](hdl-prod-review2.png) - ![Data Lake Create Instances](hdl-create-instance2.png) +7. Lastly, click on **Review and Create** to finish the provisioning process. [OPTION END] - You are done! Your first SAP HANA Cloud, SAP HANA database and data lake instances will be created, and you can monitor their status to see when they will be ready to be used. This process usually takes a few minutes. - ### Start and stop your instance The final step is learning how to stop and start your instance. -> In a free tier or trial account, your instance will be automatically stopped on a nightly basis, according to the server region time zone. That means you need to restart your instance before you start working with your free tier model or trial every day. +> A free tier instance will be automatically stopped on a nightly basis, according to the server region time zone. That means you need to restart your instance before you start working with your instance every day. -1. To stop an instance, just click on **Stop** in the three dots menu next to the SAP HANA Cloud instance line in SAP HANA Cloud Central. Once your instance is stopped, the menu item will be updated to **Start**. +1. To stop an instance, just click on **Stop** in the three dots menu next to the SAP HANA Cloud instance line in SAP HANA Cloud Central. Once your instance is stopped, the menu item will be updated to **Start**. ![Three Dots](three-dots2.png) -2. To restart the instance, simply click on the **Start** menu item. Once it's ready to be used, it will show a green **Created** status on SAP BTP Cockpit, and a **Running** status on the SAP HANA Cloud Central. +2. To restart the instance, simply click on the **Start** menu item. Once it's ready to be used, it will show a green **Created** status on SAP BTP Cockpit, and a **Running** status on the SAP HANA Cloud Central. >Note that all these processes take a few minutes to be completed and to show an updated status. You can use the auto-refresh button to select how often you would like your instances list to periodically refresh. -> ![Refresh Instances](time-refresh2.png) +> ![Refresh Instances](time-refresh2.png) > -### Upgrade to Paid Tier (Free Tier Only) +### Upgrade to Paid Tier -When you are ready to upgrade your free tier instance to Paid Tier, you can also choose the three dots menu (under Actions) next to the SAP HANA Cloud instance line in SAP HANA Cloud Central. From here, click on **Upgrade to Paid Tier**. Note that paid tier plans must be enabled in your SAP HANA Cloud entitlement in order for the **Upgrade to Paid Tier** menu item to appear. +When you are ready to upgrade your free tier instance running in a productive SAP BTP account to a Paid Tier, you can choose the three dots menu (under Actions) next to the SAP HANA Cloud instance line in SAP HANA Cloud Central. From here, click on **Upgrade to Paid Tier**. Note that paid tier plans must be enabled in your SAP HANA Cloud entitlement for the **Upgrade to Paid Tier** menu item to appear. ![upgrade to paid tier](upgrade-paid-tier-2.png) @@ -347,11 +323,6 @@ A dialog box will appear indicating that there will be costs associated with the Now you know how to provision an instance of SAP HANA Cloud using SAP BTP Cockpit and SAP HANA Cloud Central. In the next tutorial, learn about the tools that help to manage and access your database instance. - ### Knowledge Check - - - - --- diff --git a/tutorials/hana-cloud-mission-trial-3/hcc-app.png b/tutorials/hana-cloud-mission-trial-3/hcc-app.png index e193cc0f55..ff4f2cec80 100644 Binary files a/tutorials/hana-cloud-mission-trial-3/hcc-app.png and b/tutorials/hana-cloud-mission-trial-3/hcc-app.png differ diff --git a/tutorials/hana-cloud-mission-trial-3/open-hcc.png b/tutorials/hana-cloud-mission-trial-3/open-hcc.png new file mode 100644 index 0000000000..d6c34c352e Binary files /dev/null and b/tutorials/hana-cloud-mission-trial-3/open-hcc.png differ diff --git a/tutorials/hana-cloud-mission-trial-3/trial-step-1.png b/tutorials/hana-cloud-mission-trial-3/trial-step-1.png deleted file mode 100644 index 5be390df31..0000000000 Binary files a/tutorials/hana-cloud-mission-trial-3/trial-step-1.png and /dev/null differ diff --git a/tutorials/hana-cloud-mission-trial-4/hana-cloud-mission-trial-4.md b/tutorials/hana-cloud-mission-trial-4/hana-cloud-mission-trial-4.md index 85cc360104..8a0fbcdb2d 100644 --- a/tutorials/hana-cloud-mission-trial-4/hana-cloud-mission-trial-4.md +++ b/tutorials/hana-cloud-mission-trial-4/hana-cloud-mission-trial-4.md @@ -9,14 +9,15 @@ primary_tag: software-product>sap-hana-cloud --- # Tools to Manage and Access the SAP HANA Cloud, SAP HANA Database + To get started with SAP HANA Cloud, SAP HANA database, you will need to use a few different tools. Learn here what you can use them for. ## Prerequisites -- You have access to [SAP HANA Cloud trial](hana-cloud-mission-trial-2), [SAP HANA Cloud free tier](hana-cloud-mission-trial-2-ft), or a production environment of SAP HANA Cloud, SAP HANA database -- You have completed the tutorial to [provision an instance of SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-3) +- You have completed the tutorial to [provision an instance of SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-3) ## You will learn + - How to use SAP HANA Cloud Central - How to access SAP HANA database explorer - How to access SAP Business Application Studio @@ -39,50 +40,49 @@ SAP HANA Cloud Central is your main administration tool for all SAP HANA Cloud i **How to open SAP HANA Cloud Central** -- In SAP BTP cockpit, open SAP HANA Cloud Central by clicking on the subscription to SAP HANA Cloud in the Subscriptions tab. +- In SAP BTP cockpit, open SAP HANA Cloud Central by clicking on the subscription to SAP HANA Cloud in the Subscriptions tab. ![BTP Manage SAP HANA Cloud](hcc-app.png) -- SAP HANA Cloud Central will open in a new tab, where you can manage this instance. +- SAP HANA Cloud Central will open in a new tab, where you can manage this instance. **What you can do in SAP HANA Cloud Central** -- *Get an overview of all SAP HANA Cloud instances in a subaccount* - -- *Create SAP HANA Cloud instances* +- *Get an overview of all SAP HANA Cloud instances in a subaccount* -- *Find an instance using the instance ID* +- *Create SAP HANA Cloud instances* -- *Check the status of an instance* +- *Find an instance using the instance ID* -- *Review notifications* +- *Check the status of an instance* -- *Check the memory, compute, and storage consumption* +- *Review notifications* -- *Start and stop instances* +- *Check the memory, compute, and storage consumption* -- *Manage and delete instances* +- *Start and stop instances* -- *Perform SAP HANA database migrations* +- *Manage and delete instances* -- *View alerts in the Alerts app* +- *Perform SAP HANA database migrations* -- *Run queries in the SQL console tab* +- *View alerts in the Alerts app* -- *Explore the schema of the database using the database objects app* +- *Run queries in the SQL console tab* +- *Explore the schema of the database using the database objects app* **How to find your instances** -- In SAP HANA Cloud Central you can see all your instances. If you want to manage and maintain multiple instances, you can use the filters and search options on the top center area of the screen. Use **Adapt Filters** to modify the types of filters displayed. +- In SAP HANA Cloud Central you can see all your instances. If you want to manage and maintain multiple instances, you can use the filters and search options on the top center area of the screen. Use **Adapt Filters** to modify the types of filters displayed. ![HCC filters](hcc-filters.png) **Manage your instances** -- You can open many options by clicking on the **three dots** under the **Actions** column to each instance on the list. This includes options to manage configurations, start or stop the instance, or delete it. From this menu, you can also open the other tools you can use with your instances, such as SAP HANA database explorer. +- You can open many options by clicking on the **three dots** under the **Actions** column to each instance on the list. This includes options to manage configurations, start or stop the instance, or delete it. From this menu, you can also open the other tools you can use with your instances, such as SAP HANA database explorer. -- One of the most important options you can get is the **SQL Endpoint** of your instance. To do so, click **Copy SQL Endpoint**. You will need this for multiple tasks, such as connecting to other systems. +- One of the most important options you can get is the **SQL Endpoint** of your instance. To do so, click **Copy SQL Endpoint**. You will need this for multiple tasks, such as connecting to other systems. ![HCC SQL Endpoint](hcc-sqlend2.png) @@ -92,16 +92,16 @@ SAP HANA Cloud Central is your main administration tool for all SAP HANA Cloud i Click on an instance to see further details of an instance including: - - *Memory* - * *Compute* - * *Network* - * *Storage* - * *Consumption* - * *User & Authorization Management* - * *Workload Management* - * *Data Replication* - * *Auditing* - * *Performance Details including expensive statements* + - *Memory* + - *Compute* + - *Network* + - *Storage* + - *Consumption* + - *User & Authorization Management* + - *Workload Management* + - *Data Replication* + - *Auditing* + - *Performance Details including expensive statements* ![HCC Instance details](HCC-instance-details.png) @@ -136,20 +136,19 @@ SAP HANA database explorer allows you to interact with SAP HANA databases, as we The SAP HANA database explorer offers a graphical interface and the SQL console, allowing you to freely access and manage your data. - In SAP HANA database explorer, you can: -- *Browse the database catalog* +- *Browse the database catalog* -- *Execute SQL statements* +- *Execute SQL statements* -- *Debug stored procedures* +- *Debug stored procedures* -- *Add, remove, or manage remote sources* +- *Add, remove, or manage remote sources* -- *Import, and export data* +- *Import, and export data* -- *View diagnostic files* +- *View diagnostic files* If you want to view, add, or manage any of the catalog items, right click on the item and choose from the available options. @@ -159,15 +158,15 @@ An important part of the SAP HANA database explorer is the **Catalog** browser. **How to open SAP HANA database explorer** -1. Open SAP HANA Cloud Central. +1. Open SAP HANA Cloud Central. -2. In the row of the SAP HANA Cloud database instance you want to open in SAP HANA database explorer, click on the **three dots** in the **Actions** column. +2. In the row of the SAP HANA Cloud database instance you want to open in SAP HANA database explorer, click on the **three dots** in the **Actions** column. -3. Then, click on **Open in SAP HANA database explorer**. +3. Then, click on **Open in SAP HANA database explorer**. ![HCC Open DBX](hcc-open-dbx2.png) -4. The SAP HANA database explorer will open on a new tab. If this is the first-time you are accessing it, you will need to enter the credentials of your DBADMIN user. +4. The SAP HANA database explorer will open on a new tab. If this is the first-time you are accessing it, you will need to enter the credentials of your DBADMIN user. > In this mission, you will use the SAP HANA database explorer for many tasks, so we recommend you bookmark it for easy access. @@ -178,48 +177,43 @@ For more information on how to use the SAP HANA database explorer, you can also SAP Business Application Studio is a development environment available for users with SAP HANA Cloud, SAP HANA database. There, you can create your development projects and model your data, including calculation views. This is also the tool you can use to build custom applications that connect and make use of your SAP HANA Cloud databases. -Using SAP Business Application Studio is not strictly necessary to use your trial instance, but if you would like to use calculation views and create applications it is strongly recommended. In this mission, you will learn to use it. +Using SAP Business Application Studio is not strictly necessary to use your SAP HANA Cloud instance, but if you would like to use calculation views and create applications it is strongly recommended. In this mission, you will learn to use it. **What you can do in SAP Business Application Studio** The SAP Business Application Studio provides tools specific to building business applications within the SAP ecosystem, covering the end-to-end development cycle. You can: -- *Create development spaces* - -- *Clone an existing project* +- *Create development spaces* -- *Create a new project using a template* +- *Clone an existing project* -- *Use editors for SAP-specific technologies* +- *Create a new project using a template* -- *Test your application while consuming services from remote sources* +- *Use editors for SAP-specific technologies* -- *Build and deploy you application as a multi-target application* +- *Test your application while consuming services from remote sources* +- *Build and deploy you application as a multi-target application* -> To use SAP Business Application Studio, you need be subscribed to this service within the SAP BTP Cockpit. You must also have Cloud Foundry enabled to add the SAP Business Application Studio entitlement to your trial account. -> -> If you are using a *trial account*, you can subscribe automatically via the **quick tool access**. -> -> If you are **not** using a trial account or you have added SAP HANA Cloud to an existing SAP BTP trial, you need to **subscribe manually**. +> To use SAP Business Application Studio, you need be subscribed to this service within the SAP BTP Cockpit. You must also have Cloud Foundry enabled to add the SAP Business Application Studio entitlement. > > Select the option that applies to you by clicking on the options below the step title. [OPTION BEGIN [Quick tool access]] -**Quick tool access in trial** +**Quick tool access** -1. Go to the [SAP BTP Cockpit trial home page](https://account.hanatrial.ondemand.com/trial/#/home/trial). +1. Go to the [SAP BTP Cockpit trial home page](https://account.hanatrial.ondemand.com/trial/#/home/trial). ![Trial Home Page Quick Access BAS](ss-10-Trial-home-page-quick-access-BAS.png) -2. After logging in, click on the **SAP Business Application Studio** button under the **Quick Tool Access** area. +2. After logging in, click on the **SAP Business Application Studio** button under the **Quick Tool Access** area. -5. A new tab will open with SAP Business Application Studio. +3. A new tab will open with SAP Business Application Studio. -6. Click **OK** to accept the privacy statement if this is your first-time accessing SAP Business Application Studio. +4. Click **OK** to accept the privacy statement if this is your first-time accessing SAP Business Application Studio. -7. We recommend that you bookmark this URL so you can easily return to the SAP Business Application Studio. +5. We recommend that you bookmark this URL so you can easily return to the SAP Business Application Studio. > You can learn more about the SAP Business Application Studio by visiting the documentation [here](https://help.sap.com/docs/bas/sap-business-application-studio/what-is-sap-business-application-studio). @@ -228,15 +222,15 @@ The SAP Business Application Studio provides tools specific to building business **Manually subscribe to SAP Business Application Studio** -1. Navigate to your **Subaccount**. +1. Navigate to your **Subaccount**. -2. Click on **Service Marketplace** on the left side of the screen. +2. Click on **Service Marketplace** on the left side of the screen. -3. Scroll down or use the search bar to find **SAP Business Application Studio** and click on the three dots and choose **Create** to add a subscription. If you can see the option **Go to Application**, you are already subscribed. +3. Scroll down or use the search bar to find **SAP Business Application Studio** and click on the three dots and choose **Create** to add a subscription. If you can see the option **Go to Application**, you are already subscribed. ![BTP Marketplace](ss-11-BTP-marketplace.png) -4. Click on **Security** and then **Users**. +4. Click on **Security** and then **Users**. ![Users](users.png) @@ -244,14 +238,13 @@ The SAP Business Application Studio provides tools specific to building business ![Assign role collection](role-collection.png) -5. Open the SAP Business Application Studio. +5. Open the SAP Business Application Studio. ![Open BAS](start-bas.png) +6. Click on **OK** to accept the privacy statement if this is your first-time accessing SAP Business Application Studio. -6. Click on **OK** to accept the privacy statement if this is your first-time accessing SAP Business Application Studio. - -7. We recommend that you bookmark this URL so you can easily return to the SAP Business Application Studio. +7. We recommend that you bookmark this URL so you can easily return to the SAP Business Application Studio. > You can learn more about SAP Business Application Studio [here](https://help.sap.com/docs/bas/sap-business-application-studio/what-is-sap-business-application-studio). @@ -261,14 +254,6 @@ Well done! You have completed the fourth tutorial of this mission! Now you know how to access the tools you need to make the best use of your SAP HANA Cloud, SAP HANA database instances. Learn in the next tutorial how to import data into your SAP HANA Cloud database. - - - ### Knowledge Check - - - - - --- diff --git a/tutorials/hana-cloud-mission-trial-5/hana-cloud-mission-trial-5.md b/tutorials/hana-cloud-mission-trial-5/hana-cloud-mission-trial-5.md index 2671d28b0b..3de02b82b5 100644 --- a/tutorials/hana-cloud-mission-trial-5/hana-cloud-mission-trial-5.md +++ b/tutorials/hana-cloud-mission-trial-5/hana-cloud-mission-trial-5.md @@ -9,14 +9,15 @@ primary_tag: software-product>sap-hana-cloud --- # Import Data into SAP HANA Cloud, SAP HANA Database + Learn in this tutorial how to use the SAP HANA database explorer to import the sample data needed for this mission from a tar.gz file. ## Prerequisites -- You have access to [SAP HANA Cloud trial](hana-cloud-mission-trial-2) or [SAP HANA Cloud free tier](hana-cloud-mission-trial-2-ft), or a production environment of SAP HANA Cloud, SAP HANA database -- You have completed the tutorial to [provision an instance of SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-3) +- You have completed the tutorial to [provision an instance of SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-3) ## You will learn + - How to import catalog objects from your local machine to your database using the SAP HANA database explorer ## Intro @@ -31,50 +32,47 @@ primary_tag: software-product>sap-hana-cloud ### Download the sample data set - SAP provides a free data model focused on flight data for anyone to use. We're going to import this sample data and use it to help you complete the mission for Best Run Travel. Download the [SFLIGHT sample data](https://github.com/SAP/hana-xsa-opensap-hana7/raw/snippets_2.3.2/ex2/sflight_hana.tar.gz) from the public SAP GitHub repository and save it on your local machine. Note the location of the file. - ### Open the SAP HANA database explorer -1. Under Instances and Subscriptions, open SAP HANA Cloud Central. - +1. Under Instances and Subscriptions, open SAP HANA Cloud Central. + ![HCC application](hcc-app.png) -2. In the **Actions** column, click on the **three dots** and select the option to **Open in SAP HANA Database Explorer**. +2. In the **Actions** column, click on the **three dots** and select the option to **Open in SAP HANA Database Explorer**. ![Open the SAP HANA database explorer](open-dbx.png) -3. SAP HANA database explorer will open in a new tab. - +3. SAP HANA database explorer will open in a new tab. ### Import the data to your catalog -1. In the pane on the left, expand your database and right-click on **Catalog**. +1. In the pane on the left, expand your database and right-click on **Catalog**. -2. Click on **Import Catalog Objects**. +2. Click on **Import Catalog Objects**. ![DBX - import catalog objects](ss-02-dbx-import-catalog-objects.png) -3. Where it says **Local archive**, click on **Browse** and select the `SFLIGHT` file you previously downloaded to your local machine. +3. Where it says **Local archive**, click on **Browse** and select the `SFLIGHT` file you previously downloaded to your local machine. ![Browse](ss-03-browse.png) -4. Wait until the archive is uploaded completely. You can see the status of the upload next to the **Browse** button. +4. Wait until the archive is uploaded completely. You can see the status of the upload next to the **Browse** button. ![DBX uploading archive](ss-04-dbx-uploading-archive.png) -5. Once the upload is completed, you will see a list of **Catalog Objects**. All of the objects will be automatically selected for import. +5. Once the upload is completed, you will see a list of **Catalog Objects**. All of the objects will be automatically selected for import. ![DBX catalog objects](ss-05-dbx-catalog-objects.png) -6. Keep all options as they are and then click on **Import**. +6. Keep all options as they are and then click on **Import**. -7. Once the import is completed, you will see a confirmation notification on the top right-hand side of the screen. +7. Once the import is completed, you will see a confirmation notification on the top right-hand side of the screen. ![DBX import completed successfully](ss-06-dbx-import-completed-successfully.png) @@ -90,7 +88,6 @@ Note the location of the file. > > ![Import CSV3.png](ss-09-import-CSV3.png) - ### Preview the data Once the data is imported, you can take a look at it. @@ -125,12 +122,6 @@ You have completed the fifth tutorial of this mission! Now you know how to impor Learn in the next tutorial how to create and manage users and privileges. - ### Knowledge Check - - - - - --- diff --git a/tutorials/hana-cloud-mission-trial-6/hana-cloud-mission-trial-6.md b/tutorials/hana-cloud-mission-trial-6/hana-cloud-mission-trial-6.md index 68e5e3fae3..e0340df4cc 100644 --- a/tutorials/hana-cloud-mission-trial-6/hana-cloud-mission-trial-6.md +++ b/tutorials/hana-cloud-mission-trial-6/hana-cloud-mission-trial-6.md @@ -9,20 +9,21 @@ primary_tag: software-product>sap-hana-cloud --- # Create Users and Manage Roles and Privileges + Learn how to create users and assign roles and privileges using SQL or SAP HANA Cloud Central. ## Prerequisites -- You have access to [SAP HANA Cloud trial](hana-cloud-mission-trial-2) or [SAP HANA Cloud free tier](hana-cloud-mission-trial-2-ft), or a production environment of SAP HANA Cloud, SAP HANA database + - You have completed the tutorial to [provision an instance of SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-3) - You have completed the tutorial to [import data in SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-5) ## You will learn + - The basics about the role-based security model in SAP HANA Cloud, SAP HANA database - How to create users using SQL or the User Management app - How to assign roles and privileges using SQL statements or in SAP HANA Cloud Central - ## Intro > > ![Alex Banner](banner-alex.png) @@ -35,24 +36,22 @@ primary_tag: software-product>sap-hana-cloud ### Understand roles and privileges - SAP HANA Cloud, SAP HANA database defines user permissions and privileges using a **role-based security model**. Roles and privileges can be granted to users or revoked from users. A role is a set of privileges that can, as a group, be assigned to a user. Then, as the role's privileges change, the user's privileges change accordingly. Roles can be broken down as follows: -- **User-Defined Roles** are a custom collection, often created to group privileges and tasks -- **System Roles** are built-in and automatically created with a new database +- **User-Defined Roles** are a custom collection, often created to group privileges and tasks +- **System Roles** are built-in and automatically created with a new database A privilege provides the ability to perform an operation on the system. A permission, on the other hand, is that ability in the given environment. A user may not have permission to perform a task if they have the privilege, but not on the currently acted on object. Privileges are broken down as follows: -- **System privileges** give you the right to perform the action -- **Object-level privileges** restrict your right to perform the action to the specified objects, on which the privilege is granted. +- **System privileges** give you the right to perform the action +- **Object-level privileges** restrict your right to perform the action to the specified objects, on which the privilege is granted. When a new object is created, the owner can be defined, otherwise, the creator becomes the owner. This gives privileges to modify the structure of the table and grant other privileges to other database users. Ownership of a table is not sufficient to load the table with data. The user must also have `INSERT` permission on the table. - ### Create users and roles and manage privileges Before you add users to an instance, you should create user roles that fit your needs. You can leverage some of the default user roles, edit them, or create completely customized ones. @@ -65,7 +64,7 @@ In this step, you can find instructions on both of these options. Click on **SQL **Create users and roles using the SQL console in HANA Cloud Central** -1. Open SAP HANA Cloud Central. Then navigate to the **SQL console** tab for the SAP HANA Cloud, SAP HANA database instance. +1. Open SAP HANA Cloud Central. Then navigate to the **SQL console** tab for the SAP HANA Cloud, SAP HANA database instance. ![SQL Console tab in HANA Cloud Central](sql-console-tab.png) @@ -73,7 +72,7 @@ In this step, you can find instructions on both of these options. Click on **SQL ![SQL console UI](sql-console-ui.png) -2. Users can be created with this simplified statement. You can replace the contents inside the `<>` placeholders to set your desired credentials for your new user. The username must be unique in the database and the password must contain lower case, upper case, and a digit. +2. Users can be created with this simplified statement. You can replace the contents inside the `<>` placeholders to set your desired credentials for your new user. The username must be unique in the database and the password must contain lower case, upper case, and a digit. ``` CREATE USER PASSWORD ""; @@ -88,7 +87,7 @@ In this step, you can find instructions on both of these options. Click on **SQL CREATE USER UPS_GRANTOR PASSWORD "Password1" NO FORCE_FIRST_PASSWORD_CHANGE SET USERGROUP DEFAULT; ``` -3. To grant this user roles and privileges, you can use the `GRANT` statement. To use this statement to grant a certain privilege, you must have the privilege and permissions required to grant this privilege. +3. To grant this user roles and privileges, you can use the `GRANT` statement. To use this statement to grant a certain privilege, you must have the privilege and permissions required to grant this privilege. First create `genericRoleForOO` and `genericRoleForAP` roles. These are generic roles for an object owner (OO) and application user (AP), which will be later used in a later tutorial with SAP Business Application Studio. @@ -133,19 +132,19 @@ In this step, you can find instructions on both of these options. Click on **SQL **Create users and roles in the users and roles apps** -1. Within SAP HANA Cloud Central, select your instance by clicking on it and scroll to the **User & Authorization Management** app. +1. Within SAP HANA Cloud Central, select your instance by clicking on it and scroll to the **User & Authorization Management** app. ![Open cockpit from HCC](open-cockpit-hcc.png) 2. Click on **Roles** to get started. -3. You will be directed to the Role Management page, where you can see a list of all existing user roles as well as role groups. If you click on one of them, you will see the details of this role on the right-hand side of the screen. Clicking on one of the roles allows you to edit them, for example, you can assign System, Object and Analytic Privileges and more. +3. You will be directed to the Role Management page, where you can see a list of all existing user roles as well as role groups. If you click on one of them, you will see the details of this role on the right-hand side of the screen. Clicking on one of the roles allows you to edit them, for example, you can assign System, Object and Analytic Privileges and more. ![HANA cockpit Role Management submenu](role-list-hcc.png) -4. To create a new user role, click on the **Create role** button. +4. To create a new user role, click on the **Create role** button. -5. This opens the role creation wizard on the right-hand side of the screen. First create a role named `genericRoleForOO`. Leave the rest of the settings as is. This role will be used in a later tutorial when you create a development project using SAP Business Application Studio. +5. This opens the role creation wizard on the right-hand side of the screen. First create a role named `genericRoleForOO`. Leave the rest of the settings as is. This role will be used in a later tutorial when you create a development project using SAP Business Application Studio. Click on **Create** at the bottom right corner of the screen. @@ -153,7 +152,7 @@ In this step, you can find instructions on both of these options. Click on **SQL 6. Create another role named `genericRoleForAP`, which represents a generic role for an application user. Leave the rest of the settings as is. This role will be used in a later tutorial when you create a development project using SAP Business Application Studio. -7. Now that you created the necessary roles, it's time to assign privileges to it. You have a few options here. You can add some of the existing roles into this one, combining the privileges into one single role. You can also select individual privileges, be it system, object, or analytic privileges. +7. Now that you created the necessary roles, it's time to assign privileges to it. You have a few options here. You can add some of the existing roles into this one, combining the privileges into one single role. You can also select individual privileges, be it system, object, or analytic privileges. For the `genericRoleForAP` user, go to the **Object Privileges** tab and select **Edit Object Privileges**, then **Add Object** at the top of the table. @@ -162,18 +161,18 @@ In this step, you can find instructions on both of these options. Click on **SQL >For more technical details on creating roles and deciding on privileges, please see our technical documentation [here](https://help.sap.com/viewer/c82f8d6a84c147f8b78bf6416dae7290/LATEST/en-US/dec8d273bb571014b4c2b771d3e0f166.html). 8. Under **Object**, search for `SFLIGHT`. Select the result with Object Type **SCHEMA**. - + ![Select SLFIGHT object](select-sflight-hcc.png) Press **Select** at the bottom-right corner. -9. Under **Select Privileges**, scroll to find **SELECT** and click on the checkbox. This will grant SELECT privileges to your user. +9. Under **Select Privileges**, scroll to find **SELECT** and click on the checkbox. This will grant SELECT privileges to your user. ![Select privileges for user](select-privileges-hcc.png) Press **OK** when done. Then press **Save** to ensure that your changes are saved. -10. Repeat steps 8 - 9 for the `genericRoleForOO` role. When you reach the **Add Objects with Privileges** pop-up, scroll to `SELECT` and click the checkbox **and** enable the toggle under **Grantable to Others**. +10. Repeat steps 8 - 9 for the `genericRoleForOO` role. When you reach the **Add Objects with Privileges** pop-up, scroll to `SELECT` and click the checkbox **and** enable the toggle under **Grantable to Others**. ![Add select privileges with grant option](select-privileges-w-grant-option-hcc.png) @@ -181,15 +180,15 @@ In this step, you can find instructions on both of these options. Click on **SQL *Your first big step is done! Now it's time to create individual users.* -11. To get started, switch to the **User Management** app. +11. To get started, switch to the **User Management** app. ![Select User Management](user-mgmt-card-hcc.png) -12. This screen works just like the Role Management page, so click on the **Create User** to add a new user. +12. This screen works just like the Role Management page, so click on the **Create User** to add a new user. ![HANA cockpit security user mgmt](create-user-hcc.png) -13. Give the User Name `UPS_GRANTOR`. +13. Give the User Name `UPS_GRANTOR`. ![Create a user in cockpit](user-create-hcc.png) @@ -203,11 +202,10 @@ In this step, you can find instructions on both of these options. Click on **SQL >To know more about creating user and restricted users, visit the documentation [here](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-database-administration-with-sap-hana-cockpit/create-restricted-database-user). -14. Click on **Role Assignment** in the top-right corner. +14. Click on **Role Assignment** in the top-right corner. ![Role assignment dropdown](role-assignment-hcc.png) - 15. Click **Edit Assigned Roles**, then **Add**. ![Add role assignment](add-role-assignment-hcc.png) @@ -217,7 +215,7 @@ In this step, you can find instructions on both of these options. Click on **SQL ![Select generic roles](select-roles-hcc.png) 17. Under the **Grantable to Others** column, enable the toggles by clicking on them. - + ![Enable the toggles to be grantable to others](grantable-to-others-toggle-hcc.png) Press **Save** at the top of the table when finished. @@ -232,16 +230,8 @@ You have completed the fourth tutorial of this mission! Now you know how you can You now know all the basics to start working with our sample data and help Alex gain business insights about their company, **Best Run Travel**. - Learn in the next tutorial how to query the database using SQL statements. - - ### Knowledge Check - - - - - --- diff --git a/tutorials/hana-cloud-mission-trial-7/hana-cloud-mission-trial-7.md b/tutorials/hana-cloud-mission-trial-7/hana-cloud-mission-trial-7.md index 3dd773b584..9ff2e87639 100644 --- a/tutorials/hana-cloud-mission-trial-7/hana-cloud-mission-trial-7.md +++ b/tutorials/hana-cloud-mission-trial-7/hana-cloud-mission-trial-7.md @@ -12,7 +12,6 @@ primary_tag: software-product>sap-hana-cloud Learn how to create new tables, view table details, join tables, and extract specific data from tables using SQL statements in the SAP HANA database explorer. ## Prerequisites -- You have access to [SAP HANA Cloud trial](hana-cloud-mission-trial-2) or [SAP HANA Cloud free tier](hana-cloud-mission-trial-2-ft), or a production environment of SAP HANA Cloud, SAP HANA database - You have completed the tutorial to [provision an instance of SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-3) - You have completed the tutorial to [import the sample data needed for this mission](hana-cloud-mission-trial-5) - Optional: You can [download the code snippets](https://github.com/SAP-samples/hana-cloud-learning/blob/4ac0be770033d3425cc30a2f22f8f5c0823bb810/Mission:%20SAP%20HANA%20Database%20in%20SAP%20HANA%20Cloud/Tutorial%206/Tutorial%206%20Queries.txt) used in this tutorial from our public GitHub repository diff --git a/tutorials/hana-cloud-mission-trial-8/hana-cloud-mission-trial-8.md b/tutorials/hana-cloud-mission-trial-8/hana-cloud-mission-trial-8.md index c77ee517e6..c258f74000 100644 --- a/tutorials/hana-cloud-mission-trial-8/hana-cloud-mission-trial-8.md +++ b/tutorials/hana-cloud-mission-trial-8/hana-cloud-mission-trial-8.md @@ -12,7 +12,6 @@ primary_tag: software-product>sap-hana-cloud Create a development project, establish a connection to a database, create a user-provided service and .hdbgrants file, and deploy your project. ## Prerequisites -- You have access to [SAP HANA Cloud trial](hana-cloud-mission-trial-2) or [SAP HANA Cloud free tier](hana-cloud-mission-trial-2-ft), or a production environment of SAP HANA Cloud, SAP HANA database - You have completed the tutorial to [provision an instance of SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-3) - You have completed the tutorial to [import the sample data needed for this mission](hana-cloud-mission-trial-5) - [Download the sample code](https://github.com/SAP-samples/hana-cloud-learning/blob/4ac0be770033d3425cc30a2f22f8f5c0823bb810/Mission:%20SAP%20HANA%20Database%20in%20SAP%20HANA%20Cloud/Tutorial%206/Tutorial%206%20Queries.txt) files from our public GitHub repository diff --git a/tutorials/hana-cloud-mission-trial-9/hana-cloud-mission-trial-9.md b/tutorials/hana-cloud-mission-trial-9/hana-cloud-mission-trial-9.md index 7dfa52e253..92fa5e2c43 100644 --- a/tutorials/hana-cloud-mission-trial-9/hana-cloud-mission-trial-9.md +++ b/tutorials/hana-cloud-mission-trial-9/hana-cloud-mission-trial-9.md @@ -12,7 +12,6 @@ primary_tag: software-product>sap-hana-cloud Learn how to create your own calculation views in SAP HANA Cloud, SAP HANA database with SAP Business Application Studio using Join and Rank nodes. ## Prerequisites -- You have access to [SAP HANA Cloud trial](hana-cloud-mission-trial-2) or [SAP HANA Cloud free tier](hana-cloud-mission-trial-2-ft), or a production environment of SAP HANA Cloud, SAP HANA database - You have completed the tutorial to [provision an instance of SAP HANA Cloud, SAP HANA database](hana-cloud-mission-trial-3) - You have completed the tutorial to [import the sample data needed for this mission](hana-cloud-mission-trial-5) - You have [set up a development project in SAP Business Application Studio and connected it to your database](hana-cloud-mission-trial-8) diff --git a/tutorials/hana-dbx-browse/hana-dbx-browse.md b/tutorials/hana-dbx-browse/hana-dbx-browse.md index 4db940f7b5..eb872544e4 100644 --- a/tutorials/hana-dbx-browse/hana-dbx-browse.md +++ b/tutorials/hana-dbx-browse/hana-dbx-browse.md @@ -7,21 +7,23 @@ primary_tag: software-product>sap-hana-cloud --- # Browse Schema with the Database Browser in SAP HANA Database Explorer + See how the database browser can be used to explore and examine objects in an SAP HANA database. ## Prerequisites -- An SAP HANA database such as SAP HANA Cloud trial or the SAP HANA, express edition that includes the SAP HANA database explorer + +- An SAP HANA database such as SAP HANA Cloud free tier or the SAP HANA, express edition that includes the SAP HANA database explorer - You have completed the first 3 tutorials in this group ## You will learn - - How a schema filter can be used in the database browser - - How to explore and examine objects in an SAP HANA database + +- How a schema filter can be used in the database browser +- How to explore and examine objects in an SAP HANA database --- ### Schemas - 1. Many objects within an SAP HANA database belong to a schema. A schema allows objects, like tables, views, functions, and stored procedures, to be grouped together. The current schema in the SQL console is shown at the top of the SQL console. ![Current Schema](CurrentSchema.png) diff --git a/tutorials/hana-dbx-connections/hana-dbx-connections.md b/tutorials/hana-dbx-connections/hana-dbx-connections.md index a757a7c322..a04697ac99 100644 --- a/tutorials/hana-dbx-connections/hana-dbx-connections.md +++ b/tutorials/hana-dbx-connections/hana-dbx-connections.md @@ -7,16 +7,20 @@ primary_tag: software-product>sap-hana-cloud --- # Add Databases to the SAP HANA Database Explorer + This tutorial will explore different instance types, such as SAP HANA Cockpit Database, SAP HANA Cloud, data lake Relational Engine, data lake Files, and SAP HANA Deployment Infrastructure (HDI) that can be added, along with the different operations that can be performed on them. ## Prerequisites -- An SAP HANA database such as SAP HANA Cloud free tier, trial or the SAP HANA, express edition that includes the SAP HANA database explorer + +- An SAP HANA database such as SAP HANA Cloud free tier or the SAP HANA, express edition that includes the SAP HANA database explorer ## You will learn + - How to add different instance types in the SAP HANA database explorer - Additional operations that can be performed on an instance ## Intro + Instances in the SAP HANA database explorer represent SAP HANA, data lake Relational Engine, or data lake Files connections that you browse and interact with. SQL consoles are associated with a database instance. @@ -28,7 +32,8 @@ SQL consoles are associated with a database instance. ### Add an SAP HANA cockpit database instance Instances shown in SAP HANA Cloud Central or in the SAP HANA cockpit can be opened in the SAP HANA database explorer. -1. From SAP HANA Cloud Central, choose **Open in SAP HANA Database Explorer**. +1. From SAP HANA Cloud Central, choose **Open in SAP HANA Database Explorer**. + ![Open in the database explorer](from-directory.png) @@ -47,19 +52,20 @@ Instances shown in SAP HANA Cloud Central or in the SAP HANA cockpit can be open Hover over the database to see a summary and note that the type is Cockpit Database. ### Add an SAP HANA database connection + Instances can also be added directly to the SAP HANA database explorer. To connect to an SAP HANA Cloud or on-premise database, the host, port, user name, and password must be provided. -1. In the SAP HANA database explorer, press the **+** button to add a new instance. +1. In the SAP HANA database explorer, press the **+** button to add a new instance. ![Add a new database](new-connection0.png) -2. For Instance Type, choose **SAP HANA Database**. +2. For Instance Type, choose **SAP HANA Database**. ![Database types](connection-type.png) >An SAP HANA, express edition or on-premise database can have two types of databases; system and tenant. This is known as multitenant. System databases are used to manage one or more tenant databases and are only applicable to on-premise systems. For further details, see [Server Architecture of Tenant Databases](https://help.sap.com/docs/SAP_HANA_PLATFORM/78209c1d3a9b41cd8624338e42a12bf6/f9aba40d6c4c4ae48cce461db4d42d88.html). -3. Provide the host, port, user name, password, and name to show in display. Below are instructions on how to obtain the host name and port number. +3. Provide the host, port, user name, password, and name to show in display. Below are instructions on how to obtain the host name and port number. ![encrypted connection](encrypted.png) @@ -96,7 +102,7 @@ Instances can also be added directly to the SAP HANA database explorer. To conn >Instructions on using X.509 certificate are provided at [Authenticate to SAP HANA Cloud using X.509](tutorials/hana-clients-x509). -4. After pressing OK, a new instance will appear whose type is SAP HANA Database. +4. After pressing OK, a new instance will appear whose type is SAP HANA Database. ![new database](new-connection.png) @@ -122,7 +128,7 @@ Instances can also be added directly to the SAP HANA database explorer. To conn > >For additional details, see [Add Instances to the SAP HANA Database Explorer](https://help.sap.com/docs/hana-cloud/sap-hana-database-explorer/add-instances-to-sap-hana-database-explorer) and the [SET Statement](https://help.sap.com/docs/HANA_CLOUD_DATABASE/c1d3f60099654ecfb3fe36ac93c121bb/20fd82b675191014b22c8af08d0b319c.html). -5. It is also possible to connect using an X.509 certificate. Instructions can be found at [Authenticate to SAP HANA Cloud using X.509](hana-clients-x509) on how to create a client certificate and how to configure SAP HANA Cloud for use with certificate authentication. +5. It is also possible to connect using an X.509 certificate. Instructions can be found at [Authenticate to SAP HANA Cloud using X.509](tutorials/hana-clients-x509) on how to create a client certificate and how to configure SAP HANA Cloud for use with certificate authentication. ![X.509 certificate authentication](cert-auth.png) @@ -162,7 +168,7 @@ A data lake Relational Engine is a column oriented, disk based relational store Diagnostic files can also be viewed in the Logs directory. -4. It is also possible to connect using an X.509 certificate. Instructions can be found at [Authenticate to SAP HANA Cloud using X.509](hana-clients-x509) on how to create a certificate. The below SQL can be used to configure the data lake Relational Engine to enable X.509 certificate authentication. +4. It is also possible to connect using an X.509 certificate. Instructions can be found at [Authenticate to SAP HANA Cloud using X.509](tutorials/hana-clients-x509) on how to create a certificate. The below SQL can be used to configure the data lake Relational Engine to enable X.509 certificate authentication. ```SQL CREATE LOGIN POLICY X509Policy LOGIN_MODE=X509; --valid for 180 days by default @@ -181,7 +187,7 @@ A data lake Relational Engine is a column oriented, disk based relational store ### Add a data lake Files container (Optional) A [data lake Files container](https://help.sap.com/docs/hana-cloud-data-lake/user-guide-for-data-lake-files/understanding-data-lake-files) provides storage for non structured files such as images or PDF documents. It can also store structured files such as CSV, parquet, or ORC files and with the use of [SQL on Files](https://help.sap.com/docs/hana-cloud-data-lake/administration-guide-for-sql-on-files/using-sql-on-files), queries can be performed on the data contained in those files. An example of using the data lake Files container is shown as a target for an export operation at [Export and Import Data and Schema with SAP HANA Database Explorer](hana-dbx-export-import). -1. A connection can be added to a data lake Files container. A data lake Files container is not currently available in trial or free tier instances of SAP HANA Cloud. +1. A connection can be added to a data lake Files container. A data lake Files container is not currently available in free tier instances of SAP HANA Cloud. ![Add a data lake Files container](add-data-lake-file-container.png) diff --git a/tutorials/hana-dbx-create-schema/hana-dbx-create-schema.md b/tutorials/hana-dbx-create-schema/hana-dbx-create-schema.md index 6f7b8c8bf4..6f43e2b218 100644 --- a/tutorials/hana-dbx-create-schema/hana-dbx-create-schema.md +++ b/tutorials/hana-dbx-create-schema/hana-dbx-create-schema.md @@ -7,22 +7,27 @@ primary_tag: software-product>sap-hana-cloud --- # Create Database Objects with SAP HANA Database Explorer + Create a user group, users, roles, and populate a sample schema that includes tables, views, functions and procedures using the SQL console. ## Prerequisites - - An SAP HANA database such as SAP HANA Cloud free trial, free tier, or the SAP HANA, express edition that includes the SAP HANA database explorer + +- An SAP HANA database such as SAP HANA Cloud free tier, or the SAP HANA, express edition that includes the SAP HANA database explorer ## You will learn - - How to create a user group, users, roles, and a schema - - How to create tables and import data using insert statements - - How to create views, functions, and stored procedures + +- How to create a user group, users, roles, and a schema +- How to create tables and import data using insert statements +- How to create views, functions, and stored procedures ## Intro + The following steps will create a sample hotel dataset using create and insert statements. The next tutorial will demonstrate some of the ways these objects can be exported or imported. --- ### Create a usergroup, users, roles, and a schema + 1. In the SAP HANA database explorer, select the database HC_HDB and open a SQL console. ![Open SQL console](open-sql-console.png) @@ -110,7 +115,7 @@ The following steps will create a sample hotel dataset using create and insert s DROP TABLE TEST; ``` -5. The following statements can be used to delete the schema and objects it contains as well as the users, user group and roles once the tutorials are complete. +5. The following statements can be used to delete the schema and objects it contains as well as the users, user group and roles once the tutorials are complete. **Do not execute the below until the tutorials are complete**. @@ -123,9 +128,9 @@ The following steps will create a sample hotel dataset using create and insert s DROP ROLE HOTEL_ADMIN; DROP ROLE HOTEL_READER; ``` - ### Create and populate tables + 1. Create tables that represent a basic hotel administration system by running the SQL statements below in a SQL console connected to USER1 in the schema of HOTELS. ```SQL @@ -289,7 +294,7 @@ The following steps will create a sample hotel dataset using create and insert s For additional details see [CREATE Table statement](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/create-table-statement-data-definition) and [Insert Statement](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/insert-statement-data-manipulation). - 3. The data can now be queried. +3. The data can now be queried. Identifiers such as table names are automatically upper cased unless they are within "". @@ -303,12 +308,11 @@ The following steps will create a sample hotel dataset using create and insert s For further details, consult [Identifiers and case sensitivity](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/introduction-to-sql#loio209f5020751910148fd8fe88aa4d79d9__identifiers_case). - ### Explore auto-commit -Auto-commit is a setting that when enabled, causes each SQL statement to be immediately committed to the database. When auto-commit is turned off, multiple statements can be executed and then they can all be committed together, or they can all be rolled back. There are two auto-commit settings in an SAP HANA database. -The first setting which can be set in the SQL console, applies to SQL statements that manipulate data such as insert, update, or delete statements. These types of statements are known as Data Manipulation Language (DML). The second setting can be set via SQL applies to SQL statements that modify database schema such create table statements or alter table statements. These types of statements are known as Data Definition Language (DDL). +Auto-commit is a setting that when enabled, causes each SQL statement to be immediately committed to the database. When auto-commit is turned off, multiple statements can be executed and then they can all be committed together, or they can all be rolled back. There are two auto-commit settings in an SAP HANA database. +The first setting which can be set in the SQL console, applies to SQL statements that manipulate data such as insert, update, or delete statements. These types of statements are known as Data Manipulation Language (DML). The second setting can be set via SQL applies to SQL statements that modify database schema such create table statements or alter table statements. These types of statements are known as Data Definition Language (DDL). The following steps will demonstrate these settings. @@ -354,7 +358,7 @@ The following steps will demonstrate these settings. Additional details can be found at [ROLLBACK Statement](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/rollback-statement-transaction-management) and [COMMIT Statement](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/commit-statement-transaction-management). -3. Execute the following SQL statements. +4. Execute the following SQL statements. ```SQL SET TRANSACTION AUTOCOMMIT DDL OFF; @@ -384,7 +388,7 @@ The following steps will demonstrate these settings. Additional details can be found at [SET TRANSACTION AUTOCOMMIT DDL Statement](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/set-transaction-autocommit-ddl-statement-transaction-management). -4. Ensure both settings are back to their default values before continuing. +5. Ensure both settings are back to their default values before continuing. ![autocommit on](autocommit-on.png) @@ -393,6 +397,7 @@ The following steps will demonstrate these settings. ``` ### Create a partition + Partitions can be created to divide the data in a large table into smaller parts. 1. Execute the following SQL statement to create one partition that contains older reservations and one that contains reservations made in 2020 or later. @@ -431,8 +436,8 @@ For further information see [Reduce the Memory Footprint Using Page-Loadable Col Another option for data that is accessed less frequently is the SAP HANA Data Lake. Additional information on when to use Native Store Extensions and Data Lake can be found at [Storage Options](https://help.sap.com/docs/hana-cloud/sap-hana-cloud-getting-started-guide/storage-options). - ### Create views + 1. Views can be created to combine columns from multiple tables into one view or to provide access to certain columns of a table. Executing the following SQL statements creates a view that displays all information from the reservation table. The joins allow for more information about the customer and hotel to be displayed. ```SQL @@ -484,8 +489,8 @@ Another option for data that is accessed less frequently is the SAP HANA Data La For additional details see [CREATE VIEW Statement (Data Definition)](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/create-view-statement-data-definition). - ### Create functions and stored procedures + 1. User-defined functions and procedures can be used to save a set of SQL statements. Functions are considered read-only in that they cannot make modifications to the data. Stored procedures can modify the data using DDL or DML statements. Execute the following SQL to create a function that calculates the average price of a specific room type. @@ -618,7 +623,23 @@ Another option for data that is accessed less frequently is the SAP HANA Data La For additional details see [Procedures](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-sqlscript-reference/procedures). +### Examine the created objects using the monitoring views + +There are multiple monitoring views that contain data about the objects within a database. Further details can be found at [Monitoring Views](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/monitoring-views?locale=en-US). Try out the below queries. + +```SQL +--List of tables and record counts in the schema HOTELS +SELECT SCHEMA_NAME,TABLE_NAME, RECORD_COUNT, TABLE_SIZE +FROM M_TABLES WHERE SCHEMA_NAME = 'HOTELS' ORDER BY RECORD_COUNT DESC; + +--List of columns and data types for the tables in schema HOTELS +SELECT SCHEMA_NAME,TABLE_NAME, COLUMN_NAME, DATA_TYPE_NAME +FROM TABLE_COLUMNS WHERE SCHEMA_NAME = 'HOTELS' ORDER BY TABLE_NAME ASC, COLUMN_NAME ASC; + +``` + ### Schedule a stored procedure + Procedures can also be scheduled in SAP HANA Cloud. Schedule a job using the code provided below. ```SQL @@ -638,6 +659,6 @@ Details about the scheduled job can also be viewed including its properties, par For additional details see [Scheduling Administrative Tasks](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-administration-guide/scheduling-administrative-tasks) and [CREATE SCHEDULER JOB Statement](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-sql-reference-guide/create-scheduler-job-statement-data-definition). - ### Knowledge check + Congratulations! You have now created tables and inserted data, as well as created partitions, views, functions, stored procedures, and scheduled jobs. diff --git a/tutorials/hana-dbx-database-objects/hana-dbx-database-objects.md b/tutorials/hana-dbx-database-objects/hana-dbx-database-objects.md index 666dcd6e77..3f41bc67d9 100644 --- a/tutorials/hana-dbx-database-objects/hana-dbx-database-objects.md +++ b/tutorials/hana-dbx-database-objects/hana-dbx-database-objects.md @@ -2,160 +2,130 @@ parser: v2 auto_validation: true time: 10 -tags: [ tutorial>beginner, software-product-function>sap-hana-cloud--sap-hana-database, software-product>sap-hana] +tags: [ tutorial>beginner, software-product-function>sap-hana-cloud--sap-hana-database, software-product-function>sap-hana-cloud--data-lake] primary_tag: software-product>sap-hana-cloud --- - - # Browse and Explore Catalog Objects with the Database Objects App - Dive into using the Database Objects tool to explore and inspect objects in an SAP HANA database. -## Prerequisites -- An SAP HANA Cloud database such as SAP HANA Cloud trial where the Database Objects tool is available. -- You have completed the first 3 tutorials in this group + Dive into using the database objects app to explore and inspect schema objects in an SAP HANA Cloud, SAP HANA database or data lake Relational Engine. + +## Prerequisites + +- An SAP HANA Cloud database such as SAP HANA Cloud free tier +- You have completed the first 3 tutorials in this group - +## You will learn + +- How to filter for specific tables and schemas within an instance +- How to inspect and explore objects in an SAP HANA Cloud database +- How to generate SQL Statements -## You will learn -- How to filter for specific tables and schemas within an instance -- How to inspect and explore objects in an SAP HANA Cloud database -- Generating SQL Statements for specific schemas for selected database objects --- +### Introduction + +The database objects app is a built-in tool in SAP HANA Cloud Central that enables you to search, view metadata, and generate SQL for catalog objects. -### Introduction ->Database Objects is a built-in tool in SAP HANA Cloud Central that enables you to search, view metadata, and generate SQL for catalog objects, right from SAP HANA Cloud Central. +### Filters and navigation - -### Filters and Navigation +1. To navigate to the database objects app, click on the icon for it on the left-hand side of the instances page. -1. To navigate to the Database Objects tool, click on the icon for it on the left-hand side of the instances page. - - - ![DBObj Navigation](DbObjNav.png) + ![DBObj Navigation](DbObjNav.png) -2. Upon opening Database Objects all filters are empty except the **Instance Type** which pre-selects all types you have existing instances for. +2. Upon opening database objects all filters are empty except the **Instance Type** which pre-selects all types you have existing instances for. - - ![DB Obj Filters](DBObjFilters.png) - Click the drop down under the **Instance** filter to select your SAP HANA Database instance. + ![DB Obj Filters](DBObjFilters.png) + Click the drop down under the **Instance** filter to select your SAP HANA Database instance. - - ![Instances](Instances.png) + ![Instances](Instances.png) Once selected, the **Schema** and **Search** filter are both available to use. Select the **Schema** filter and search for the HOTELS schema. - - ![Hotels Schema](SelectSchema.png) + ![Hotels Schema](SelectSchema.png) You can also directly search for the schema or any other objects directly in the **Search** filter. In this case after searching navigate to the **Schemas** tab directly to view the metadata for the HOTELS schema. This data includes ownership, privileges and create time. - - ![Schema Data](SchemaData.png) + ![Schema Data](SchemaData.png) - +### Explore tables -### Explore Tables - -Database Objects table features can be leveraged to view table information such as columns, indexes, properties, runtime information and SQL CREATE Statements. +Information for tables includes columns, indexes, properties, runtime information and SQL CREATE Statements. 1. Select the **Tables** tab to view all associated tables of the HOTELS schema. The page now displays all tables in the schema HOTELS and their table type. - ![Tables View](TableView.png) 2. Select the **RESERVATION** table to explore it further. Click the full screen icon on the top right of the screen to maximize the page and view all tabs. - - ![Table Data](TableData.png) + ![Table Data](TableData.png) By default you should see the column details for the table. - ![Column Data](ColumnData.png) 3. Explore the **Runtime Information** tab, where further information about the table can be found. This information includes the total number of rows, disk size, partitions and memory consumption for the table, as well as individual columns. - - - ![Runtime Information](RuntimeInformation.png) + + ![Runtime Information](RuntimeInformation.png) 4. Examine the other tabs, such as **CREATE Statements**, where SQL code to generate the table can be found. - - - ![Create Statement](CreateStatement.png) + + ![Create Statement](CreateStatement.png) 5. Select the Generate SQL Statement dropdown to see the three ways to have SQL generated for the table. - - - ![SQL Generation](GenerateSQL.png) - + ![SQL Generation](GenerateSQL.png) -### Explore Functions and Procedures +### Explore functions and procedures 1. Navigate to settings and enable the functions object type to view functions in the Database Objects app. ![Settings ](Settings.png) 2. Open the **Functions** tab and select AVERAGE_PRICE to examine it further. - - - ![Average Price Function](AvgPrice.png) + + ![Average Price Function](AvgPrice.png) Select the Generate SQL Statement dropdown and click SELECT Statement to navigate to the SQL Console. - Input *'suite'* in the single quotes of the SELECT statement to get the average price for suites. - - - ![Function Call](FuncCall.png) + Input *'suite'* in the single quotes of the SELECT statement to get the average price for suites. + ![Function Call](FuncCall.png) 3. Navigate back to the Database Objects app and open the **Procedure** tab. Select RESERVATION_GENERATOR to examine it further. - - - ![Procedure Data](ProcedureData.png) -4. Click Generate SQL to get SQL that runs the stored procedure. - - - ![Run Procedure](Procedure.png) + ![Procedure Data](ProcedureData.png) -To learn more about exploring database instances in Database Explorer refer to the [Browse Schema with the Database Browser in SAP HANA Database Explorer Tutorial](hana-dbx-browse) +4. Click Generate SQL to get SQL that runs the stored procedure. + ![Run Procedure](Procedure.png) -### Additional Features - +To learn more about exploring database instances in Database Explorer refer to the [Browse Schema with the Database Browser in SAP HANA Database Explorer Tutorial](hana-dbx-browse) + +### Additional features 1. Select the **Recent** tab to view all the recent objects you opened. - - - ![Recents](Recent.png) + + ![Recents](Recent.png) 2. Navigate to an object and click the star icon on the top right of the screen to favorite it. Allows for easy access to the object through the **Favorites** tab. - - - ![Favorite Icon](FavIcon.png) + + ![Favorite Icon](FavIcon.png) Once selected as a favorite. Navigate to the **Favorites** tab to see it. - - - ![Favorite](Fav.png) -3. Click All/Selected Instance toggle to filter favorites. - - - ![Filter Favorites](FilterFav.png) + ![Favorite](Fav.png) + +3. Click All/Selected Instance toggle to filter favorites. + + ![Filter Favorites](FilterFav.png) 4. Navigate to HANA Cloud Central settings to customize preferences for the Database Objects App. - - - ![settings](Settings.png) + ![settings](Settings.png) ### Knowledge check -Congratulations! You have now successfully navigated the Database Objects app and learned about the various features and tools available to you right from SAP HANA Cloud Central. - +Congratulations! You have now successfully navigated the Database Objects app and learned about the various features and tools available to you right from SAP HANA Cloud Central. \ No newline at end of file diff --git a/tutorials/hana-dbx-export-import/hana-dbx-export-import.md b/tutorials/hana-dbx-export-import/hana-dbx-export-import.md index c40b16b564..62df4487ad 100644 --- a/tutorials/hana-dbx-export-import/hana-dbx-export-import.md +++ b/tutorials/hana-dbx-export-import/hana-dbx-export-import.md @@ -7,14 +7,17 @@ primary_tag: software-product>sap-hana-cloud --- # Export and Import Data and Schema with SAP HANA Database Explorer + Use wizards or SQL statements to export and import data and schema using CSV, Apache Parquet, or binary formats. ## Prerequisites -- An SAP HANA database such as SAP HANA Cloud trial, free tier, or the SAP HANA, express edition that includes the SAP HANA database explorer + +- An SAP HANA database such as SAP HANA Cloud free tier, or the SAP HANA, express edition that includes the SAP HANA database explorer - Data lake Files, Amazon AWS, Google Cloud, or Microsoft Azure accounts will be needed for optional steps in this tutorial. - You have completed the first 3 tutorials in this group. ## You will learn + - How to export and import data using the export and import data wizards, SQL statements export into and import from, and the download option in the SQL console results tab - How to export and import schema objects using export and import catalog wizards and the SQL statements export and import - How to use cloud storage providers as a target when exporting or importing @@ -152,7 +155,8 @@ The following steps are for illustrative purposes only and are not meant to be f ``` ### Use data lake Files for export and import from an SAP HANA Cloud, SAP HANA database (optional) -The following steps walk through the process of exporting to and importing data using data lake Files with a SAP HANA Cloud, SAP HANA database. This step requires a productive SAP HANA Cloud data lake instance as data lake files is currently not part of free tier or trial. + +The following steps walk through the process of exporting to and importing data using data lake Files with a SAP HANA Cloud, SAP HANA database. This step requires a productive SAP HANA Cloud data lake instance as data lake files is currently not included in the free tier service plan. 1. Complete steps 3 and 4 in the [Getting Started with Data Lake Files HDLFSCLI](data-lake-file-containers-hdlfscli) tutorial to configure the trust setup of the data lake Files container. @@ -271,7 +275,7 @@ The following steps walk through the process of exporting to and importing data ``` ### Use data lake Files for export and import from an SAP HANA Cloud, data lake Relational Engine database (optional) -The following steps walk through the process of exporting to and importing data using data lake Files with a SAP HANA Cloud, data lake Relational Engine database. This step requires a productive SAP HANA Cloud data lake instance as data lake files is currently not part of free tier or trial. The following steps assume you have followed the first two sub steps in the previous step so that a data lake Files connection has been added to the SAP HANA database explorer. +The following steps walk through the process of exporting to and importing data using data lake Files with a SAP HANA Cloud, data lake Relational Engine database. This step requires a productive SAP HANA Cloud data lake instance as data lake files is currently not part of free tier. The following steps assume you have followed the first two sub steps in the previous step so that a data lake Files connection has been added to the SAP HANA database explorer. 1. Create a database credential for the data lake Files container. This step is required if you wish to export to a data lake Files instance that is not the one associated with the data lake Relational Engine. Further details are described at [Unloading Data to Data Lake Files from Data Lake Relational Engine](https://help.sap.com/docs/hana-cloud-data-lake/load-and-unload-management/unloading-data-to-data-lake-files). Open a SQL Console connected to a data lake Relational Engine instance and execute the below SQL statements. diff --git a/tutorials/hana-dbx-extension/.vscode/settings.json b/tutorials/hana-dbx-extension/.vscode/settings.json deleted file mode 100644 index aea2d6c64e..0000000000 --- a/tutorials/hana-dbx-extension/.vscode/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "SAP HANA Database Explorer.Use Objects Definition For SQL Generation": true -} \ No newline at end of file diff --git a/tutorials/hana-dbx-extension/hana-dbx-extension.md b/tutorials/hana-dbx-extension/hana-dbx-extension.md index 9db750cd0d..8d8c6bf13f 100644 --- a/tutorials/hana-dbx-extension/hana-dbx-extension.md +++ b/tutorials/hana-dbx-extension/hana-dbx-extension.md @@ -7,22 +7,25 @@ primary_tag: software-product>sap-hana-cloud --- # Use the SAP HANA Database Explorer Extension - Learn how the SAP HANA database explorer for Visual Studio Code extension can be used to connect to both SAP HANA Cloud and on-premise databases, about related general Visual Studio Code features, how to use the catalog browser, and how to execute SQL queries. The SAP HANA database explorer for Visual Studio Code extension contains similar functionality to that in the web-based SAP HANA database explorer although not all functionality is available. + Learn how the SAP HANA database explorer for Visual Studio Code extension can be used to connect to both SAP HANA Cloud and on-premise databases, about related general Visual Studio Code features, how to use the catalog browser, and how to execute SQL queries. The SAP HANA database explorer for Visual Studio Code extension contains similar functionality to that in the web-based SAP HANA database explorer although not all functionality is available. ## Prerequisites -- An SAP HANA database such as SAP HANA Cloud (free tier or trial) or an on-premise SAP HANA database such as the SAP HANA, express edition + +- An SAP HANA database such as SAP HANA Cloud free tier or an on-premise SAP HANA database such as the SAP HANA, express edition - You have completed the first 3 tutorials in this group ## You will learn - - How to setup the Visual Studio Code SAP HANA database explorer extension - - How to connect to an SAP HANA Cloud database, SAP HANA database and SAP HANA User store (to retrieve connection details) - - How to explore and examine objects in an SAP HANA database + +- How to setup the Visual Studio Code SAP HANA database explorer extension +- How to connect to an SAP HANA Cloud database, SAP HANA database and SAP HANA User store (to retrieve connection details) +- How to explore and examine objects in an SAP HANA database --- -### Set up -1. If needed, download [Visual Studio Code](https://code.visualstudio.com/download) for your computer. +### Set up + +1. If needed, download [Visual Studio Code](https://code.visualstudio.com/download) for your computer. ![Download Visual Studio Code](downloadVSCode.png) @@ -43,7 +46,8 @@ primary_tag: software-product>sap-hana-cloud * SAP HANA Database Explorer Connections are database connections retrieved by logging into Cloud Foundry and querying for the set of connections that the Cloud Foundry, web-based SAP HANA database explorer have created. -### Add a local database connection +### Add a local database connection + The SAP HANA database explorer extension can connect to SAP HANA Cloud and on-premise databases as well as an SAP HANA User Store. In this tutorial, a connection to an SAP HANA Cloud database will be made, but the steps to connect to the other types are very similar. Adding local connections do not require authentication to the SAP Business Technology Platform (BTP) or Cloud Foundry. 1. Hover over the **Database List** section and click the **+** button to **Add SAP HANA Database**. @@ -52,7 +56,7 @@ The SAP HANA database explorer extension can connect to SAP HANA Cloud and on-pr A form to add a database will open. -2. Select **SAP HANA Cloud** as your database type and enter values for the **Host**, **Port**, **User** and **Password**, such as USER1 and Password1. You may also change the display name, as desired. +2. Select **SAP HANA Cloud** as your database type and enter values for the **Host**, **Port**, **User** and **Password**, such as USER1 and Password1. You may also change the display name, as desired. This tutorial uses the HOTELS schema. Set the default schema value in the **Advanced Options** as shown below. Subsequent SQL consoles you open will now start with this schema value. diff --git a/tutorials/hana-dbx-hcc/hana-dbx-hcc.md b/tutorials/hana-dbx-hcc/hana-dbx-hcc.md index 6d1c7cc168..b7bece1691 100644 --- a/tutorials/hana-dbx-hcc/hana-dbx-hcc.md +++ b/tutorials/hana-dbx-hcc/hana-dbx-hcc.md @@ -7,29 +7,33 @@ primary_tag: software-product>sap-hana-cloud --- # Query Databases Using the SQL Console in SAP HANA Cloud Central + Learn how the SQL console can be used within SAP HANA Cloud Central to quickly query a selected database. ## Prerequisites + - An SAP HANA Cloud database - You have completed [this](hana-dbx-create-schema) tutorial which creates a database schema for an SAP HANA Cloud, SAP HANA database. - You have completed [this](hana-cloud-dl-clients-overview) tutorial which creates a database schema for an SAP HANA Cloud, data lake Relational Engine ## You will learn - - How to open a SQL console, specify the credentials, and set the current schema - - An overview of the functionality provided in the SQL console + +- How to open a SQL console, specify the credentials, and set the current schema +- An overview of the functionality provided in the SQL console --- ### Open a SQL console + This step demonstrates how a SQL console can quickly be opened from within SAP HANA Cloud Central and how to change the SQL console's credentials and schema. -1. In **SAP HANA Cloud Central** open a SQL console by selecting **SQL Console** in the left pane. Notice that the SQL console is not associated with a database when opened in this way. +1. In **SAP HANA Cloud Central** open a SQL console by selecting **SQL Console** in the left pane. Notice that the SQL console is not associated with a database when opened in this way. ![open SQL console](open-sql-console.png) Additional SQL consoles can also be opened by selecting the **+** icon. -2. This time select **Instances**, select a database, and choose **Open SQL Console** from the actions menu. +2. This time select **Instances**, select a database, and choose **Open SQL Console** from the actions menu. ![open SQL console from an instance](open-sql-console-instance.png) @@ -45,8 +49,7 @@ This step demonstrates how a SQL console can quickly be opened from within SAP H ![Current user](current-user.png) - -4. If you wish to connect to the database using a different set of credentials, select the **Connect this SQL console to a different instance** icon, select the current database and uncheck **Use cached credentials if possible**. +4. If you wish to connect to the database using a different set of credentials, select the **Connect this SQL console to a different instance** icon, select the current database and uncheck **Use cached credentials if possible**. ![Change credentials](change-credentials.png) @@ -71,7 +74,7 @@ This step demonstrates how a SQL console can quickly be opened from within SAP H ![Show current user for a data lake Relational Engine](current-user-dl.png) -5. The current schema can be set and viewed for a SAP HANA database using the SQL statements below. +5. The current schema can be set and viewed for a SAP HANA database using the SQL statements below. ```SQL SET SCHEMA HOTELS; @@ -96,6 +99,7 @@ This step demonstrates how a SQL console can quickly be opened from within SAP H ![available themes](themes.png) ### Execute SQL + This step demonstrates how to execute a SQL query, examine the statement help, view the query results, messages, and history tabs within a SQL console. 1. Execute the following SQL statements. @@ -133,7 +137,7 @@ This step demonstrates how to execute a SQL query, examine the statement help, v ![statement help panel](statement-help.png) - Notice that for SAP HANA Cloud, SAP HANA databases, links to the related documentation and details on the objects used in the SQL statement are shown. + Notice that for SAP HANA Cloud, SAP HANA databases, links to the related documentation and details on the objects used in the SQL statement are shown including a link which will open the database objects app where additional details of the object can be viewed. 4. Commonly used shortcut keys are listed below. Try a few of them out. @@ -171,7 +175,7 @@ This step demonstrates how to execute a SQL query, examine the statement help, v ![connection settings](connection-settings.png) - * Execute the following SQL which is used to illustrate the result behavior settings. + - Execute the following SQL which is used to illustrate the result behavior settings. ```SQL SELECT * FROM M_SYSTEM_INFORMATION_STATEMENTS; @@ -192,7 +196,7 @@ This step demonstrates how to execute a SQL query, examine the statement help, v ![one thousand row limit](settings-result2.png) - * Execute the following SQL which is used to illustrate the result display display settings. + - Execute the following SQL which is used to illustrate the result display display settings. ```SQL SELECT CURRENT_DATE, CURRENT_TIMESTAMP(7), RAND() * 10 FROM DUMMY; @@ -263,9 +267,8 @@ This step demonstrates how to execute a SQL query, examine the statement help, v ![download and import](download-and-import.png) - - ### Statement library + The statement library is a convenient location in the SQL Console to store and retrieve frequently executed SQL statements. It provides a place to store statements that are used frequently as to not type them in repeatedly. The library is pre-populated with useful statements called ‘SYSTEM’ statements. @@ -273,6 +276,7 @@ The library is pre-populated with useful statements called ‘SYSTEM’ statemen ![Statement Library System Statements](statement_libaray_system.png) You may also define custom statements that are only available to you. These are ‘USER’ statements. + ```SQL /* @@ -298,10 +302,12 @@ SELECT * FROM RESERVATION ![Statement Library View User Statements](statement_libaray_user.png) -3. To run a statement, select one from the statement library and click the Run button. +3. To run a statement, select one from the statement library and click the Run button. ![Run Saved Statement](run_saved_statement.png) + If you select multiple saved statements, you additionally have the option to open them together in one tab or in individual tabs. + > It is also possible to export and import SQL statements directly to/from the file system > > ![Import or Export Statements](export_import_statements.png) @@ -312,32 +318,26 @@ User-defined statements can be edited. From the Statement library, select the de ![Modify Saved Statements](replace_statement.png) - - ### A few things to note -The SQL console within SAP HANA Cloud Central appears similar to the one within the SAP HANA database explorer but there are some differences. -* Opening the SQL console within the SAP HANA Cloud Central can be done much quicker than opening the full SAP HANA database explorer. - -* The SQL console that you access from within SAP HANA Cloud Central can only connect to databases that are within the same BTP subaccount as SAP HANA Cloud Central. +The SQL console within SAP HANA Cloud Central appears similar to the one within the SAP HANA database explorer but there are some differences. -* The SQL console in SAP HANA Cloud Central has the following additional features +- The SQL console that you access from within SAP HANA Cloud Central can only connect to databases that are within the same BTP subaccount as SAP HANA Cloud Central. - * Ability to format results - * Support for SAP Morning and Evening Horizon themes - * Additional details such as time of execution, duration, rows returned, and success or failure in the history tab +- The SQL console in SAP HANA Cloud Central has the following additional features -* The SAP HANA database explorer has some additional functionality + - Ability to format results + - Support for SAP Morning and Evening Horizon themes + - Additional details such as time of execution, duration, rows returned, and success or failure in the history tab - * Persistency of SQL tabs and their contents - * SQL debugging - * Code completion of schema objects - * Viewer for spatial and graph data - * Analysis tab for tables and views - * Ability to search for database objects across multiple databases - * Ability to run statements in the background - * Ability to run statements against multiple instances +- The SAP HANA database explorer has some additional functionality + - SQL debugging + - Code completion of schema objects + - Viewer for spatial + - Analysis tab for tables and views + - Ability to search for database objects across multiple databases + - Ability to run statements against multiple instances ### Knowledge check diff --git a/tutorials/hana-dbx-hcc/run_saved_statement.png b/tutorials/hana-dbx-hcc/run_saved_statement.png index d1097f70ed..fc3250f372 100644 Binary files a/tutorials/hana-dbx-hcc/run_saved_statement.png and b/tutorials/hana-dbx-hcc/run_saved_statement.png differ diff --git a/tutorials/hana-dbx-hcc/save_custom_statement.png b/tutorials/hana-dbx-hcc/save_custom_statement.png index 2eab9c0988..18c6c0559a 100644 Binary files a/tutorials/hana-dbx-hcc/save_custom_statement.png and b/tutorials/hana-dbx-hcc/save_custom_statement.png differ diff --git a/tutorials/hana-dbx-hcc/save_statement.png b/tutorials/hana-dbx-hcc/save_statement.png index 0b37f1dc5d..7b94d77b19 100644 Binary files a/tutorials/hana-dbx-hcc/save_statement.png and b/tutorials/hana-dbx-hcc/save_statement.png differ diff --git a/tutorials/hana-dbx-hcc/statement-help.png b/tutorials/hana-dbx-hcc/statement-help.png index 75cf06578c..b5ce43b6b1 100644 Binary files a/tutorials/hana-dbx-hcc/statement-help.png and b/tutorials/hana-dbx-hcc/statement-help.png differ diff --git a/tutorials/hana-dbx-multi-model/hana-dbx-multi-model.md b/tutorials/hana-dbx-multi-model/hana-dbx-multi-model.md index db4dad6ce4..22f7188601 100644 --- a/tutorials/hana-dbx-multi-model/hana-dbx-multi-model.md +++ b/tutorials/hana-dbx-multi-model/hana-dbx-multi-model.md @@ -7,17 +7,21 @@ primary_tag: software-product>sap-hana-cloud --- # Try Out Multi-Model Functionality with the SAP HANA Database Explorer and Database Objects App + Explore knowledge graph, property graph, JSON document store, and spatial capabilities in the SAP HANA database explorer. ## Prerequisites + - A productive SAP HANA Cloud database - You have completed the first 3 tutorials in this group. ## You will learn - - How to create a knowledge graph, a property graph, a document store, and import spatial data. - - How the SAP HANA database explorer and the database objects app can be used with multi-model data. + +- How to create a knowledge graph, a property graph, a document store, and import spatial data. +- How the SAP HANA database explorer and the database objects app can be used with multi-model data. ## Intro + A [knowledge graph](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-knowledge-graph-guide/sap-hana-cloud-sap-hana-database-knowledge-graph-engine-guide) can be used to store facts in triples providing additional meaning and relationships. A [property graph](https://help.sap.com/docs/hana-cloud-database/sap-hana-cloud-sap-hana-database-property-graph-engine-reference/sap-hana-cloud-sap-hana-database-property-graph-engine-reference) can be used to show the connections between items such as the connections between airports or between people or groups in a social network. @@ -28,8 +32,8 @@ This tutorial is meant to be an introduction to this topic. For additional cont --- +### Enable the triple store and Create a knowledge graph -### Enable the triple store and create a knowledge graph The following steps will create a knowledge graph that provides information on additional hotel amenities, explore the created knowledge graph using the database objects app, and then will perform a query on the knowledge graph. Before you can create a knowledge graph, please ensure your HANA Instance is version 2025.2 or above, and your instance has triple store activated. Here are the steps to doing this: @@ -46,7 +50,7 @@ Before you can create a knowledge graph, please ensure your HANA Instance is ver ![Add Triple Store](add_triple_store.png) - *The knowledge graph feature is not available for trial or free tier users.* + *The knowledge graph feature is not available for free tier instances.* To learn more about knowledge graphs see [Connecting the Facts: SAP HANA Cloud’s Knowledge Graph Engine for Business Context](https://community.sap.com/t5/technology-blogs-by-sap/connecting-the-facts-sap-hana-cloud-s-knowledge-graph-engine-for-business/ba-p/13888597) and [Choosing Between Knowledge Graphs and Property Graphs in SAP HANA Cloud and Why Both Matter](https://community.sap.com/t5/technology-blogs-by-sap/choosing-between-knowledge-graphs-and-property-graphs-in-sap-hana-cloud-and/ba-p/14074575). @@ -369,7 +373,7 @@ SAP HANA provides the ability to store and query JSON data. This can be useful The following steps will demonstrate how to create a JSON collection that can be used to collect notes about customers staying at a hotel. ->The creation of a JSON collection is not supported in the SAP HANA Cloud free tier or trial. +>The creation of a JSON collection is not supported in the SAP HANA Cloud free tier. 1. Enable the JSON document store. diff --git a/tutorials/hana-dbx-overview/hana-dbx-overview.md b/tutorials/hana-dbx-overview/hana-dbx-overview.md index c9cff2c4a9..14582ccc83 100644 --- a/tutorials/hana-dbx-overview/hana-dbx-overview.md +++ b/tutorials/hana-dbx-overview/hana-dbx-overview.md @@ -7,19 +7,23 @@ primary_tag: software-product>sap-hana-cloud --- # SAP HANA Database Explorer Overview - Learn about the SAP HANA database explorer and how to start using it with SAP HANA Cloud trial, free tier, SAP HANA, express edition, or SAP HANA Cloud basic trial. + + Learn about the SAP HANA database explorer and how to start using it with SAP HANA Cloud free tier, SAP HANA, express edition, or SAP HANA Cloud basic trial. ## Prerequisites - - A machine that can run SAP HANA, express edition if the other options are not used + +- A machine that can run SAP HANA, express edition if the other options are not used ## You will learn - - About the features provided by the SAP HANA database explorer - - Details about the version differences between the SAP HANA database explorer in SAP HANA Cloud and in an on-premise installation such as SAP HANA, express edition - - How to get started with SAP HANA Cloud trial, free tier, SAP HANA, express edition, or SAP HANA Cloud basic trial ---- +- About the features provided by the SAP HANA database explorer +- Details about the version differences between the SAP HANA database explorer in SAP HANA Cloud and in an on-premise installation such as SAP HANA, express edition +- How to get started with SAP HANA Cloud free tier, SAP HANA, express edition, or SAP HANA Cloud basic trial + +--- ## Intro + > Access help from the SAP community or provide feedback on this tutorial by navigating to the "Feedback" link located on the top right of this page. ### SAP HANA database explorer overview @@ -104,13 +108,13 @@ The SAP Software download links (requires an S-User ID to access) below are for -### SAP HANA Cloud trial or free tier +### SAP HANA Cloud free tier -To complete the tutorials in this group, an SAP HANA instance is needed. Steps 3 and 4 in this tutorial provide two different, free options that can be used to set up an SAP HANA instance. Only one of these steps needs to be completed if you currently do not have access to an SAP HANA instance. Alternatively, step 7 provides a quick and easy way to try out SAP HANA Cloud although you will be given access to a user with fewer permissions. Trial is only available on the US10 landscape and is in a separate SAP BTP trial account whereas free tier is available in multiple production SAP BTP accounts and provides a seamless transition from a free tier to a paid plan. +To complete the tutorials in this group, an SAP HANA instance is needed. Steps 3 and 4 in this tutorial provide two different, free options that can be used to set up an SAP HANA instance. Only one of these steps needs to be completed if you currently do not have access to an SAP HANA instance. Alternatively, step 7 provides a quick and easy way to try out SAP HANA Cloud although you will be given access to a user with fewer permissions. The SAP BTP Trial is available on the US10 and AP21 landscapes. If a free tier instance is used in a productive subaccount, a seamless transition from a free tier to a paid plan is available. ![SAP HANA Cloud Trial instance](hana-cloud-instance.png) ->SAP HANA Cloud trial or free tier instances are shut down overnight (i.e. 10:00 PM based on the location where your instance was provisioned) and will need to be restarted before working with them the next day. The tutorial group [Automating SAP HANA Cloud Tasks](https://developers.sap.com/group.sap-hana-cloud-automating.html) provides some examples of using tools such as the BTP CLI or the SAP Automation Pilot to help with repetitive tasks such as starting and stopping instances. +>SAP HANA Cloud free tier instances are shut down overnight (i.e. 10:00 PM based on the location where your instance was provisioned) and will need to be restarted before working with them the next day. The tutorial group [Automating SAP HANA Cloud Tasks](https://developers.sap.com/group.sap-hana-cloud-automating.html) provides some examples of using tools such as the BTP CLI or the SAP Automation Pilot to help with repetitive tasks such as starting and stopping instances. >--- @@ -118,21 +122,21 @@ To complete the tutorials in this group, an SAP HANA instance is needed. Steps 3 The instructions on how to setup a free SAP HANA Cloud trial or free tier within SAP BTP are well covered in several other sources listed below. - * [Set Up Your SAP HANA Cloud, SAP HANA Database (free tier or trial) and Understand the Basics](group.hana-cloud-get-started-1-trial) +- [Set Up Your SAP HANA Cloud, SAP HANA Database and Understand the Basics](group.hana-cloud-get-started-1-trial) - * [SAP Learning Journey - Provisioning and Administering Databases in SAP HANA Cloud](https://learning.sap.com/learning-journey/provision-and-administer-databases-in-sap-hana-cloud) +- [SAP Learning Journey - Provisioning and Administering Databases in SAP HANA Cloud](https://learning.sap.com/learning-journey/provision-and-administer-databases-in-sap-hana-cloud) - * [SAP Discovery Center - SAP HANA Cloud, SAP HANA Database Fundamentals](https://discovery-center.cloud.sap/protected/index.html#/missiondetail/3643/) +- [SAP Discovery Center - SAP HANA Cloud, SAP HANA Database Fundamentals](https://discovery-center.cloud.sap/protected/index.html#/missiondetail/3643/) - * [Help Thomas Get Started with SAP HANA](hana-trial-advanced-analytics) (Only the first 3 steps of this tutorial are needed for basic setup of SAP HANA Cloud.) +- [Help Thomas Get Started with SAP HANA](hana-trial-advanced-analytics) (Only the first 3 steps of this tutorial are needed for basic setup of SAP HANA Cloud.) For more information on the SAP BTP see the following: - * + - - * + - - * + - Continue on to the next tutorial in this group once you have access to an SAP HANA instance. @@ -140,7 +144,7 @@ Continue on to the next tutorial in this group once you have access to an SAP HA >This step only needs to be completed if you currently do not have access to an SAP HANA instance and did not setup an SAP HANA instance through the SAP HANA Cloud as explained in step 3. -An alternative option to using the SAP HANA Cloud trial or free tier is to use the SAP HANA, express edition. SAP provides a free, streamlined version of SAP HANA that runs on developer laptops called [SAP HANA, express edition](https://www.sap.com/products/technology-platform/hana/express-trial.html). +An alternative option to using the SAP HANA Cloud free tier is to use the SAP HANA, express edition. SAP provides a free, streamlined version of SAP HANA that runs on developer laptops called [SAP HANA, express edition](https://www.sap.com/products/technology-platform/hana/express-trial.html). SAP HANA runs on a few versions of Linux. SAP HANA, express edition provides a binary install as well as virtual machine images that can be run on Microsoft Windows, macOS and Linux machines. This is described in the [Getting Started with SAP HANA 2.0, express edition (Binary Installer Method)](https://help.sap.com/docs/SAP_HANA,_EXPRESS_EDITION/32c9e0c8afba4c87814e61d6a1141280) or [Getting Started with SAP HANA 2.0, express edition (Virtual Machine Method)](https://help.sap.com/docs/SAP_HANA,_EXPRESS_EDITION/8c3bbc4a904d42efac77c09da0bccf64). The **Applications** option adds XS Advanced, the SAP HANA cockpit, the SAP HANA database explorer, and the SAP HANA Web IDE for SAP HANA. @@ -155,6 +159,7 @@ Once installed, a useful starting point is the page below. It contains links to the SAP Web IDE for SAP HANA, SAP HANA cockpit, and the SAP HANA cockpit manager. ### SAP HANA Cloud Basic Trial + The SAP HANA Cloud Basic Trial provides a database user and password that has access to a specific schema free for 30 days. The database user can be used with the SAP HANA database explorer. The provided database user can be used to create database objects within the provided schema but cannot create new schemas or users. To get started, click on Try Now on Discover SAP HANA Cloud section of the trial page of [SAP HANA Cloud](https://www.sap.com/products/technology-platform/hana/trial.html). ![experience SAP HANA Cloud](experience.png) @@ -169,6 +174,6 @@ A tutorial is available to be used with the basic trial. ### Knowledge check -Congratulations! You have configured an instance of SAP HANA, either through the SAP HANA Cloud trial, free tier, or SAP HANA, express edition. You've also learned how to start, stop, and manage an instance of SAP HANA Cloud via the Cloud Foundry Command Line Interface. +Congratulations! You have configured an instance of SAP HANA, either through the SAP HANA Cloud free tier, or SAP HANA, express edition. You've also learned how to start, stop, and manage an instance of SAP HANA Cloud via the Cloud Foundry Command Line Interface. --- diff --git a/tutorials/hana-dbx-query/hana-dbx-query.md b/tutorials/hana-dbx-query/hana-dbx-query.md index af792ba765..c8b0b43afe 100644 --- a/tutorials/hana-dbx-query/hana-dbx-query.md +++ b/tutorials/hana-dbx-query/hana-dbx-query.md @@ -7,19 +7,24 @@ primary_tag: software-product>sap-hana-cloud --- # Query with the SQL Console in SAP HANA Database Explorer + Explore features of the SQL console and see how it facilitates querying an SAP HANA database. ## Prerequisites - - An SAP HANA database such as SAP HANA Cloud trial or the SAP HANA, express edition that includes the SAP HANA database explorer - - You have completed the first 3 tutorials in this group. + +- An SAP HANA database such as SAP HANA Cloud trial or the SAP HANA, express edition that includes the + SAP HANA database explorer +- You have completed the first 3 tutorials in this group. ## You will learn - - How to run SQL queries using the SQL console and add filters to the results - - How to use different features of the SQL console including keyboard shortcuts, autocomplete, statement help, and the statement library + +- How to run SQL queries using the SQL console and add filters to the results +- How to use different features of the SQL console including keyboard shortcuts, autocomplete, statement help, and the statement library --- ### Execute SQL + 1. Select a connection and open the SQL console. ![open SQL console](open-sql-console.png) diff --git a/tutorials/hana-dbx-sof/hana-dbx-sof.md b/tutorials/hana-dbx-sof/hana-dbx-sof.md index 349de19e1a..16138bb272 100644 --- a/tutorials/hana-dbx-sof/hana-dbx-sof.md +++ b/tutorials/hana-dbx-sof/hana-dbx-sof.md @@ -109,7 +109,7 @@ Follow the steps below to connect to the database using the SQL Console. ![Add a database with a different user](add-database-with-different-user.png) ### Connect to the data lake Files instance -Once the data lake Files instance has been created and configured, it can be accessed using the data lake Files app in SAP HANA Cloud Central, [REST API](https://help.sap.com/doc/9d084a41830f46d6904fd4c23cd4bbfa/2024_3_QRC/en-US/html/index.html), or [hdlfscli](https://help.sap.com/docs/hana-cloud-data-lake/user-guide-for-data-lake-files/hdlfscli-data-lake-files-utility). +Once the data lake Files instance has been created and configured, it can be accessed using the data lake Files app in SAP HANA Cloud Central, [REST API](https://help.sap.com/doc/9d084a41830f46d6904fd4c23cd4bbfa/latest/en-US/index.html), or [hdlfscli](https://help.sap.com/docs/hana-cloud-data-lake/user-guide-for-data-lake-files/hdlfscli-data-lake-files-utility). 1. From SAP HANA Cloud Central, select the **Data Lake Files** app. diff --git a/tutorials/hana-dbx-troubleshooting/hana-dbx-troubleshooting.md b/tutorials/hana-dbx-troubleshooting/hana-dbx-troubleshooting.md index 8f37ba243e..40b2fc7bcc 100644 --- a/tutorials/hana-dbx-troubleshooting/hana-dbx-troubleshooting.md +++ b/tutorials/hana-dbx-troubleshooting/hana-dbx-troubleshooting.md @@ -215,6 +215,12 @@ Explain plan provides a compiled plan in tabular form without executing it. Thi ![Explain plan Results](explainPlanResults.png) + To clear any cached parameters the below SQL can be run. + + ```SQL + ALTER SYSTEM CLEAR SQL PLAN CACHE; + ``` + For further details see the links below. [View Execution Plans for SQL Statements, Procedures, and Anonymous Blocks](https://help.sap.com/docs/hana-cloud/sap-hana-database-explorer/view-execution-plans-for-sql-statements-procedures-and-anonymous-blocks-sap-hana-cloud-database) diff --git a/tutorials/odata-dd-1-origins/odata-dd-1-origins.md b/tutorials/odata-dd-1-origins/odata-dd-1-origins.md new file mode 100644 index 0000000000..9adf9e3ea6 --- /dev/null +++ b/tutorials/odata-dd-1-origins/odata-dd-1-origins.md @@ -0,0 +1,462 @@ +--- +parser: v2 +author_name: DJ Adams +author_profile: https://github.com/qmacro +auto_validation: false +primary_tag: software-product>sap-business-technology-platform +tags: [ software-product>sap-business-technology-platform, topic>cloud, programming-tool>odata, tutorial>beginner ] +time: 20 +--- + +# Learn about OData's origins + + Discover OData's origins in RSS and Atom. + +## You will learn + +- Where OData came from +- Why OData looks and acts the way it does + +## Intro + +*This series of tutorials on OData is to replace the original "Take a Deep Dive into OData" which you may already know, and which we're now retiring. We're building out the content of this new series in the open, as a work in progress, and would love to hear your feedback, what you would like to see and what you think of the content as we create it. As you can see, it's very early days. Please let us know your thoughts on this new mission [via this issue link](https://github.com/sap-tutorials/Tutorials/issues/new?title=Early%20feedback%20on%20the%20new%20OData%20mission&body=Let%20us%20know%20your%20thoughts%20on%20this%20new%20series%20-%20what%20you%20like,%20dislike,%20would%20like%20to%20see.%20Thank%20you!).* + +OData is an open standard that is both a data format and a protocol for consuming and manipulating data in a uniform way. It's ISO/IEC approved and managed by the [OASIS organization](https://www.oasis-open.org/). + +OData has its origins in the world of weblogs and syndication, but now serves to power a great deal of the API and integration activities in typical SAP enterprise environments. This tutorial will help you understand OData's origins. + +--- + +### Examine RSS, an ancestor of OData + +You can understand OData as being the combination of two essential parts. The first is the format, the second is the protocol. The format defines how data is structured, described and serialized. The protocol defines how that data is retrieved, manipulated, and maintained. + +The origin of OData's format comes from the world of weblogs: blogging and syndication. The Rich Site Summary (RSS) format was defined to describe a blog and the posts available in it, typically with the newest posts first, but in XML format for machine consumption. + +> RSS is also known as "RDF Site Summary" or "Really Simple Syndication". + +Let's look at an example of RSS. The British Broadcasting Corporation (BBC) maintains a number of [news feeds](https://www.bbc.co.uk/news/10628494), one of which is for [World News](https://feeds.bbci.co.uk/news/world/rss.xml). + +The content of this feed looks something like this (reduced to just a few items for brevity): + +```xml + + + + <![CDATA[BBC News]]> + + https://www.bbc.co.uk/news/world + + https://news.bbcimg.co.uk/nol/shared/img/bbc_news_120x60.gif + BBC News + https://www.bbc.co.uk/news/world + + RSS for Node + Mon, 19 Jan 2026 15:14:13 GMT + + + + 15 + + <![CDATA[IMF warns of trade tension risk to global growth]]> + + https://www.bbc.com/news/articles/c0r47ey0d1vo?at_medium=RSS&at_campaign=rss + https://www.bbc.com/news/articles/c0r47ey0d1vo#0 + Mon, 19 Jan 2026 11:04:56 GMT + + + + <![CDATA[Japan PM Takaichi calls snap election three months after taking office]]> + + https://www.bbc.com/news/articles/c1dk0x0v6pdo?at_medium=RSS&at_campaign=rss + https://www.bbc.com/news/articles/c1dk0x0v6pdo#0 + Mon, 19 Jan 2026 12:00:48 GMT + + + + <![CDATA[South African team helps search for politician swept away by Mozambique floodwaters]]> + + https://www.bbc.com/news/articles/c62nen4n971o?at_medium=RSS&at_campaign=rss + https://www.bbc.com/news/articles/c62nen4n971o#1 + Mon, 19 Jan 2026 14:22:15 GMT + + + + <![CDATA[China's birth rate hits record low as population continues to shrink]]> + + https://www.bbc.com/news/articles/c79r7v7qr53o?at_medium=RSS&at_campaign=rss + https://www.bbc.com/news/articles/c79r7v7qr53o#1 + Mon, 19 Jan 2026 07:12:01 GMT + + + + +``` + +Observe the structure of the XML document. + +- Following the XML declaration (first line), `` is the outermost enclosing element, and in the opening tag, comes with a number of namespace (`xmlns`) declarations and a version. Think of this as the "envelope". +- Nested a level within the `` element is the `` element, which is the encoded representation of this feed resource, with elements that one would expect here, conveying the feed's title, image link, last updated date, and so on. Think of this as the "header". +- Also within the `` element are multiple `` elements, each representing an individual news item in the context of the channel, i.e. world news items. Each item has elements conveying the details, such as news item title, short description, publication date, and so on. + +Here's the structure in simple terms: + +```text +rss + | + +-- channel + | + +-- item + | + +-- item + | + +-- ... +``` + +Within the RSS envelope, this is indeed much like a document (in the ERP sense), with a header and items. + +Beyond news feeds like this, the archetypal use case for RSS (and indeed Atom) is for weblogs, where a channel represents a weblog and the items represent the individual posts. + +### Examine the Atom Syndication Format + +Atom is a format very similar to RSS, serving the same purpose, that came about for reasons that are not relevant for this tutorial (but see the Further Info section for a link to more background details if you're curious). It's known as the [Atom Syndication Format](https://tools.ietf.org/html/rfc4287). + +Some may call Atom a successor to RSS. Unlike RSS, which is just a _format_ specification, Atom also has a related _protocol_ which we'll look at shortly. + +Like RSS, the vast majority of Atom use is as machine readable representations of weblogs. + +Here's an example of the Atom format, representing the weblog at (the Atom feed itself is at ); just two entries are shown, for brevity: + +```xml + + + DJ Adams + Reserving the right to be wrong + + + 2026-01-14T00:00:00Z + https://qmacro.org/blog/ + + DJ Adams + + + Modules, modularity & reuse in CDS models - part 3 - publishing the simple reuse package + + 2026-01-14T00:00:00Z + https://qmacro.org/blog/posts/2026/01/14/modules-modularity-and-reuse-in-cds-models-part-3-publishing-the-simple-reuse-package/ + <p>(Get to all the parts in this series via the <a href="https://qmacro.org/blog/posts/2026/01/01/modules-modularity-and-reuse-in-cds-models/">series + post</a>.)</p><p>What we have from <a href="https://qmacro.org/blog/posts/2026/01/07/modules-modularity-and-reuse-in-cds-models-part-2-creating-a-simple-reuse-package/"> + ... (the rest of the blog post content) + + + + Modules, modularity & reuse in CDS models - part 2 - creating a simple reuse package + + 2026-01-07T00:00:00Z + https://qmacro.org/blog/posts/2026/01/07/modules-modularity-and-reuse-in-cds-models-part-2-creating-a-simple-reuse-package/ + <p>(Get to all the parts in this series via the <a href="https://qmacro.org/blog/posts/2026/01/01/modules-modularity-and-reuse-in-cds-models/">series post</a>.)</p> + <p>In <a href="https://qmacro.org/blog/posts/2026/01/01/modules-modularity-and-reuse-in-cds-models-part-1-an-introduction/#wrapping-up"> + ... (the rest of the blog post content) +1</a> + + + +``` + +Notice that in both RSS and Atom feeds, the item can contain just a short summary, as in the BBC World News RSS example, or the entire content, as in this weblog Atom example - although for brevity, again, the content has been elided. + +The Atom structure is very similar to that of RSS; apart from the element names themselves, the main difference is that there's no "envelope" element enclosing everything - the outermost element here is ``: + +```text +feed + | + +-- entry + | + +-- entry + | + +-- ... +``` + +While the XML representation of RSS is not namespaced, Atom's is - notice the non-qualified (i.e. default) `xmlns` attribute in the opening `` tag: + +```xml + +``` + +This, formally, is very much an Atom feed. Indeed, if you're curious, you may have opened that URL to see what it is. If you haven't yet, go ahead now :-) . + +### Examine the Atom Publishing Protocol + +Complementing the Atom Syndication Format is a protocol, designed to enable the manipulation of data stored in Atom-formatted resources. This was originally designed for weblog authoring - using tools that spoke the protocol one could create, edit and push posts to remote blogging systems for publication. + +Officially called the [Atom Publishing Protocol](https://tools.ietf.org/html/rfc5023), this protocol is alternatively known as AtomPub, or simply APP for short. + +AtomPub's Request For Comments (RFC) document ([RFC5023](https://tools.ietf.org/html/rfc5023)) describes a series of standard operations that can be performed on entries in an Atom feed - in other words, operations on XML representations of blog posts that are in the form of `entry` elements. + +These operations are for listing (querying) multiple entries, and creating, editing, retrieving & deleting individual entries, and they correspond to the standard HTTP methods (GET, POST, PUT and DELETE). + +> And if you're thinking these operations sound familiar, you'd be on exactly the right track - the same five operations are defined in OData. + +The Atom Publishing Protocol specification also includes the concept of a service document that describes what collections of entries that are available. Here's an example of an Atom service document, from that same RFC document: + +```xml + + + + Main Site + + My Blog Entries + + + + Pictures + image/png + image/jpeg + image/gif + + + +``` + +You will see that these fundamental building blocks of Atom are alive and well in the OData protocol today. In fact, this example Atom Publishing Protocol service document ... was taken from an [OData Specification Document](https://docs.oasis-open.org/odata/odata-atom-format/v4.0/cs01/odata-atom-format-v4.0-cs01.html#_Toc365464533). + +### Consider the basics of OData + +The ideas in Atom formed the foundation of OData. The [Wikipedia page](https://en.wikipedia.org/wiki/Open_Data_Protocol) has a good overview, but at a simple level, there is: + +- a service document describing the data available in a given OData service +- the concept of entity sets and entities, which are direct parallels of feeds and entries, respectively, in Atom +- a basic set of operations: Create, Read, Update, Delete and Query (commonly referred to as CRUD+Q) + +Since [OData has been under the stewardship of OASIS](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=odata), it has [moved through a few iterations](https://github.com/qmacro/odata-specs/blob/master/overview.md), the most current major version of which is 4. + +### Look at the public Northwind service + +There is a [publicly available set of OData services](https://services.odata.org) maintained by the OASIS organisation. They are known as the **Northwind** services because they offer a data set based on a business scenario that revolves around a company called **Northwind Traders**. This data set contains entities such as customers, products and suppliers. + +### Retrieve the Northwind service's service document + +Head to the OData V4 flavor of the Northwind service at . + +As is standard, the resource at an OData service's root URL is the service document, and it looks like this (some collections have been left out, for brevity): + +```xml + + + + Default + + Categories + + + Products + + + Suppliers + + + Territories + + + Alphabetical_list_of_products + + + +``` + +Compare this to the Atom service document earlier - from a structural point of view it's almost identical. From a content perspective, while the previous Atom service document example described blog content, this OData service document describes business entities such as products and suppliers. + +### Retrieve entity data + +The business entities are available from a resource address perspective by appending the name, such as `Suppliers`, onto the service's root URL. Go ahead and do this, to retrieve data for a handful of suppliers, by following this link: . + +Technically speaking in OData terms, by following this link you are performing an OData query operation on the `Suppliers` entity set, limiting the results to 3 via the `$top` system query option. We'll dig into these terms and much more in subsequent tutorials, but for now, take a look at what is returned, which is something like this: + +```json +{ + "@odata.context": "https://services.odata.org/V4/Northwind/Northwind.svc/$metadata#Suppliers", + "value": [ + { + "SupplierID": 1, + "CompanyName": "Exotic Liquids", + "ContactName": "Charlotte Cooper", + "ContactTitle": "Purchasing Manager", + "Address": "49 Gilbert St.", + "City": "London", + "Region": null, + "PostalCode": "EC1 4SD", + "Country": "UK", + "Phone": "(171) 555-2222", + "Fax": null, + "HomePage": null + }, + { + "SupplierID": 2, + "CompanyName": "New Orleans Cajun Delights", + "ContactName": "Shelley Burke", + "ContactTitle": "Order Administrator", + "Address": "P.O. Box 78934", + "City": "New Orleans", + "Region": "LA", + "PostalCode": "70117", + "Country": "USA", + "Phone": "(100) 555-4822", + "Fax": null, + "HomePage": "#CAJUN.HTM#" + }, + { + "SupplierID": 3, + "CompanyName": "Grandma Kelly's Homestead", + "ContactName": "Regina Murphy", + "ContactTitle": "Sales Representative", + "Address": "707 Oxford Rd.", + "City": "Ann Arbor", + "Region": "MI", + "PostalCode": "48104", + "Country": "USA", + "Phone": "(313) 555-5735", + "Fax": "(313) 555-3349", + "HomePage": null + } + ] +} +``` + +These days, particularly with OData V4, the default representation of entity set resources is JSON. With earlier versions of OData that default was XML ... specifically Atom flavored XML! In fact, some OData servers still support the Atom flavored XML, which we can explicitly ask for using HTTP's `Accept` header in the request. + +Try this now, if you have access to an HTTP client, such as `curl` on the command line, or [Postman](https://web.postman.co/) on the Web. + +If you want to use `curl`, try this: + +```shell +curl \ + --header 'Accept: application/atom+xml' \ + --url 'https://services.odata.org/V4/Northwind/Northwind.svc/Suppliers?$top=3' +``` + +If you're using Postman or similar, be sure to add the `Accept` header with the value `application/atom+xml`. + +This should return the same supplier data resource, but in a different representation - Atom XML: + +```xml + + + https://services.odata.org/V4/Northwind/Northwind.svc/Suppliers + Suppliers + 2026-01-20T15:32:43Z + + + https://services.odata.org/V4/Northwind/Northwind.svc/Suppliers(1) + + + + + <updated>2026-01-20T15:32:43Z</updated> + <author> + <name/> + </author> + <content type="application/xml"> + <m:properties> + <d:SupplierID m:type="Int32">1</d:SupplierID> + <d:CompanyName>Exotic Liquids</d:CompanyName> + <d:ContactName>Charlotte Cooper</d:ContactName> + <d:ContactTitle>Purchasing Manager</d:ContactTitle> + <d:Address>49 Gilbert St.</d:Address> + <d:City>London</d:City> + <d:Region m:null="true"/> + <d:PostalCode>EC1 4SD</d:PostalCode> + <d:Country>UK</d:Country> + <d:Phone>(171) 555-2222</d:Phone> + <d:Fax m:null="true"/> + <d:HomePage m:null="true"/> + </m:properties> + </content> + </entry> + <entry> + <id>https://services.odata.org/V4/Northwind/Northwind.svc/Suppliers(2)</id> + <category term="#NorthwindModel.Supplier" scheme="http://docs.oasis-open.org/odata/ns/scheme"/> + <link rel="edit" title="Supplier" href="Suppliers(2)"/> + <link rel="http://docs.oasis-open.org/odata/ns/related/Products" type="application/atom+xml;type=feed" title="Products" href="Suppliers(2)/Products"/> + <title/> + <updated>2026-01-20T15:32:43Z</updated> + <author> + <name/> + </author> + <content type="application/xml"> + <m:properties> + <d:SupplierID m:type="Int32">2</d:SupplierID> + <d:CompanyName>New Orleans Cajun Delights</d:CompanyName> + <d:ContactName>Shelley Burke</d:ContactName> + <d:ContactTitle>Order Administrator</d:ContactTitle> + <d:Address>P.O. Box 78934</d:Address> + <d:City>New Orleans</d:City> + <d:Region>LA</d:Region> + <d:PostalCode>70117</d:PostalCode> + <d:Country>USA</d:Country> + <d:Phone>(100) 555-4822</d:Phone> + <d:Fax m:null="true"/> + <d:HomePage>#CAJUN.HTM#</d:HomePage> + </m:properties> + </content> + </entry> + <entry> + <id>https://services.odata.org/V4/Northwind/Northwind.svc/Suppliers(3)</id> + <category term="#NorthwindModel.Supplier" scheme="http://docs.oasis-open.org/odata/ns/scheme"/> + <link rel="edit" title="Supplier" href="Suppliers(3)"/> + <link rel="http://docs.oasis-open.org/odata/ns/related/Products" type="application/atom+xml;type=feed" title="Products" href="Suppliers(3)/Products"/> + <title/> + <updated>2026-01-20T15:32:43Z</updated> + <author> + <name/> + </author> + <content type="application/xml"> + <m:properties> + <d:SupplierID m:type="Int32">3</d:SupplierID> + <d:CompanyName>Grandma Kelly's Homestead</d:CompanyName> + <d:ContactName>Regina Murphy</d:ContactName> + <d:ContactTitle>Sales Representative</d:ContactTitle> + <d:Address>707 Oxford Rd.</d:Address> + <d:City>Ann Arbor</d:City> + <d:Region>MI</d:Region> + <d:PostalCode>48104</d:PostalCode> + <d:Country>USA</d:Country> + <d:Phone>(313) 555-5735</d:Phone> + <d:Fax>(313) 555-3349</d:Fax> + <d:HomePage m:null="true"/> + </m:properties> + </content> + </entry> +</feed> +``` + +Does this format and structure look familiar? Yes, of course it does - it's the same as the Atom Syndication Format example from earlier - a `<feed>` element containing `<entry>` elements, each with a `<content>` element where the actual item's data is to be found. + +Indeed, the set of formal documents that form the complete OData specification includes the [OData Atom Format Version 4.0](https://docs.oasis-open.org/odata/odata-atom-format/v4.0/odata-atom-format-v4.0.html), which is currently at Committee Specification level 02, the introduction to which reads: + +> "The OData protocol is comprised of a set of specifications for representing and interacting with structured content. The core specification for the protocol is in OData-Protocol. The OData Atom Format specification extends the former by defining representations for OData requests and responses using an Atom format." + +The use of "OData-Protocol" is a reference to a related document in the OData V4 specification set, specifically the [OData Version 4.0 Part 1: Protocol](https://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html) specification. In the next tutorial you'll learn more about the protocol specification and how to navigate it. + +### Further info + +- [Accuracy and precision in language](https://qmacro.org/blog/posts/2024/01/22/accuracy-and-precision-in-language/) on the distinction between "blog" and "post". +- [Monday morning thoughts: OData](https://qmacro.org/blog/posts/2018/08/20/monday-morning-thoughts-odata/) has further details on the journey from RSS, through Atom and AtomPub, to OData. diff --git a/tutorials/odata-dd-2-resources/odata-dd-2-resources.md b/tutorials/odata-dd-2-resources/odata-dd-2-resources.md new file mode 100644 index 0000000000..16fff0e6e7 --- /dev/null +++ b/tutorials/odata-dd-2-resources/odata-dd-2-resources.md @@ -0,0 +1,244 @@ +--- +parser: v2 +author_name: DJ Adams +author_profile: https://github.com/qmacro +auto_validation: false +primary_tag: software-product>sap-business-technology-platform +tags: [ software-product>sap-business-technology-platform, topic>cloud, programming-tool>odata, tutorial>beginner ] +time: 20 +--- + +# Get to know the OData standards resources on the Web + +<!-- description --> Get acquainted with the OData standards and how to navigate them. + +## You will learn + +- What the important Web based resources are for OData +- How to make sense of them + +## Intro + +There are myriad resources on the Web about OData. After all, it's a standard that's been around since 2007. There are some key resources that are important to know about, and in this tutorial, you'll find out about them and become more comfortable navigating them. + +--- + +### Understand OASIS and its role + +OASIS is one of the world's foremost non-profit standards bodies, and is a destination for the discussion, management and standardization of open protocols, such as OData. Within OASIS there are various programmes, one of which is the set of [Projects and Technical Committees](https://www.oasis-open.org/projects-committees/). + +Within the context of a Technical Committee, specifications are developed in the open, following a lightweight process of review, feedback, approval and publication. There is a Technical Committee in OASIS for OData - the [OASIS Open Data Protocol (OData) TC](https://groups.oasis-open.org/communities/tc-community-home2?CommunityKey=e7cac2a9-2d18-4640-b94d-018dc7d3f0e2). + +### Take a first look at the technical work produced by the OData TC + +The OData TC page lists various work products in the section titled "Technical Work Produced by the Committee" on [the main OData TC page](https://groups.oasis-open.org/communities/tc-community-home2?CommunityKey=e7cac2a9-2d18-4640-b94d-018dc7d3f0e2). + +That list can be somewhat overwhelming at first, which is partly due to: + +- OData's considerable core scope +- use of other adjacent standards +- a dedicated attention to detail +- the protocol's inherent extensibility + +It is also due to the review, feedback, approval and publication process. Although relatively lightweight, this process does mean that there are various stages that documents can be in, defined briefly in the process's [Specification Lifecycle](https://docs.oasis-open.org/templates/TCHandbook/content/tcprocess/standardsapprovalprocess/specificationlifecycle.htm). Such document stages are in this [OASIS Documents](https://github.com/qmacro/odata-specs/blob/master/overview.md) resource which attempts to show the stages and progress of key OData standards documents over time. + +In that resource one can see the various stages represented, such as "cs" for Committee Specification, "cos" for Candidate OASIS Standard, "os" for OASIS Standard, and so on, stage identifiers that form part of the work product document's official name, such as: + +<https://docs.oasis-open.org/odata/odata/v4.01/os/part1-protocol/odata-v4.01-os-part1-protocol.html> + +Looking at this document as a typical example, what can we discern? Well: + +- it is in an HTML format +- it represents part 1 of the OData standard +- that part being about the protocol (as opposed to the URL conventions) +- the standard is at version 4.01 (the latest) +- the specification lifecycle stage is "os" i.e. the final one (OASIS Standard) + +We'll come back to this particular document later on in this tutorial. + +### Get an overview of the OData standards documents + +Going back to the list of work products, let's enumerate them and think briefly about what they are. Doing this is important if we want to be able to make sense of them, to navigate between and within them, and ultimately to find whatever we're looking for. + +Open up the [OData TC page](https://groups.oasis-open.org/communities/tc-community-home2?CommunityKey=e7cac2a9-2d18-4640-b94d-018dc7d3f0e2) in a window separate to this one and jump to the [Technical Work Produced by the Committee](https://groups.oasis-open.org/communities/tc-community-home2?CommunityKey=e7cac2a9-2d18-4640-b94d-018dc7d3f0e2#technical) section, ready to scroll through it as you work through this section. + +#### The main standard + +There's the main standard itself, the "OData Version 4.01 OASIS Standard". This comprises three distinct parts: + +- OData Version 4.01 Part 1: Protocol +- OData Version 4.01 Part 2: URL Conventions +- ABNF components: OData ABNF Construction Rules Version 4.01 and OData ABNF Test Cases Version 4.01 + +The [Augmented Backus-Naur form](https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form) (ABNF) resource is the formal grammar of the OData protocol as described, in a form (ABNF) which is common for such protocol format descriptions. There's the grammar itself in one file, and a series of test cases for the grammar in another. It's rare that you'll need to consult this. + +The other two documents that form the main standard, Parts 1 and 2, are where most things in this OData mission, and most things that you'll encounter in normal circumstances when working with OData, are described. + +Notice that each of these documents is available in different formats: + +- an authorititave source format +- other formats (downstream from the source format) + +In this case, the authoritative source format for parts 1 and 2 is `.docx`, but in other OData standards documents cases, it is sometimes `.md`. Practically, one can use the `.html` format, as `.docx` is not compatible with the open Web. + +#### CSDL as a supporting standard + +Alongside the main standard there are supporting standards, the first one of which is expressed in a pair of documents: + +- OData Common Schema Definition Language (CSDL) JSON Representation Version 4.01 OASIS Standard +- OData Common Schema Definition Language (CSDL) XML Representation Version 4.01 OASIS Standard + +These describe two representations of Common Schema Definition Language (CSDL), and we might be most familiar with the XML representation of CSDL, in that it's the EDMX in OData service metadata documents, such as [the one for the Northwind service we looked at in the previous tutorial](https://services.odata.org/V4/Northwind/Northwind.svc/$metadata). Each of these documents is also available in multiple formats, again, the `.docx` format being authoritative. + +#### JSON format as a supporting standard + +Next in the list of supporting standards is: + +- OData JSON Format Version 4.01 OASIS Standard + +This is the formal description of the JSON format used to represent resources such as entities and entity sets transmitted and received in the context of OData operations. In other words, it describes everything we need to know (and more) about OData JSON payloads. In earlier versions of the OData standard, a version of the XML-based Atom Syndication Format was used, but this has been largely superseded by this JSON format. + +#### Extension standards + +The OData standard is extensible, and in that context, the next two standards documents listed in the work products section are in this category: + +- OData Extension for Data Aggregation Version 4.0 Committee Specification 03 +- OData Extension for Temporal Data Version 4.0 Committee Specification 01 + +Note that in addition to the multiple formats available for each extension standard, there are supplemental parts; as for the main OData standard, there's a pair of ABNF components (grammar construction rules, and test cases), and there's also a vocabulary, expressed in EDMX (and other formats) and containing annotation definitions relating to the given extension, definitions to be used in OData service metadata documents. + +#### Other supporting standards + +There is one more standard listed in the work products, that describes a method for retrying unsafe requests without incurring unintended side-effects. This is: + +- Repeatable Requests Version 1.0 Committee Specification 01 + +By now, we know the drill. This is a standards document that is available in various formats, and is at a particular specification lifecycle stage. + +#### Lifecycle stage identifiers + +In each case, the URLs pointing to the standards resources contain a path info section that indicates the stage that resource is in. The stage also appears in the final "filename" section. Let's have a look at the relative path info sections of the URLs representing the authoritative sources for each of the standards we've seen. + +First, there are the main standards: + +- `/odata/odata/v4.01/os/part1-protocol/odata-v4.01-os-part1-protocol.docx` +- `/odata/odata/v4.01/os/part2-url-conventions/odata-v4.01-os-part2-url-conventions.docx` +- `/odata/odata/v4.01/os/abnf/` +- `/odata/odata-csdl-json/v4.01/os/odata-csdl-json-v4.01-os.docx` +- `/odata/odata-csdl-xml/v4.01/os/odata-csdl-xml-v4.01-os.docx` +- `/odata/odata-json-format/v4.01/os/odata-json-format-v4.01-os.docx` + +These are all "OASIS Standard" documents, each with the "os" stage identifier. + +Here are the rest of the standards: + +- `/odata/odata-data-aggregation-ext/v4.0/cs03/odata-data-aggregation-ext-v4.0-cs03.md` +- `/odata/odata-temporal-ext/v4.0/cs01/odata-temporal-ext-v4.0-cs01.docx` +- `/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.docx` + +All these are at various iteration levels of the "Committee Specification" stage ("cs"), with the extension for data aggregation being at level 03, and the other two being at level 01. + +### Explore the document URL chains + +We now know about the different technical work artifacts and how they are manifested, with the document URLs, each of which: + +- describes a specific part of the overall OData standard +- is tied to a particular specification lifecycle stage +- is in a format indicated in the URL + +Now, as a final step in learning about the OData standards resources, we should make sure we understand the myriad specification URLs at the top of any given document. + +By way of an example, visit the (HTML version of the) [OData Version 4.01 Part 1: Protocol](https://docs.oasis-open.org/odata/odata/v4.01/os/part1-protocol/odata-v4.01-os-part1-protocol.html). The first section looks like this: + +![odata-protocol-doc-first-section](odata-protocol-doc-first-section.png) + +There are a lot of URLs here! But the pattern is straightforward, and following it is easy given what we now know. We should start by noticing the three groups: + +- This stage +- Previous stage +- Latest stage + +The URLs are there to allow the navigation forwards and backwards through time, through the different specification lifecycle stages the given document has been through. + +> We should ignore the `.docx` and `.pdf` formats for the purposes of this exploration, and focus only on the `.html` format, for easy navigation. Note that the screenshot shows these HTML links with the standard "visited" color purple (as opposed to the standard blue of "unvisited" links), indicating that these are indeed the key links that have been navigated, while this section of the tutorial was being written. + +The URLs for the "Latest stage" links do not contain any specification lifecycle indicators, and so can - and should - be used to generically and canonically refer to the latest stage version of the document in question. + +The URLs for the links in the "This stage" and "Previous stage" sections do contain specification lifecycle indicators, and as such, are pointers to specific stage versions. + +Thus requesting the resource at either of these two URLs ... will result in the same resource content: + +- [/odata/odata/v4.01/odata-v4.01-part1-protocol.html](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part1-protocol.html) +- [/odata/odata/v4.01/os/part1-protocol/odata-v4.01-os-part1-protocol.html](https://docs.oasis-open.org/odata/odata/v4.01/os/part1-protocol/odata-v4.01-os-part1-protocol.html) + +Following the "Previous stage" HTML link: + +- [/odata/odata/v4.01/cs02/part1-protocol/odata-v4.01-cs02-part1-protocol.html](https://docs.oasis-open.org/odata/odata/v4.01/cs02/part1-protocol/odata-v4.01-cs02-part1-protocol.html) + +leads to an earlier specification lifecycle stage (Committee Specification 02), which, in turn, via its own "Previous stage" link, leads to the next earliest, which is at the specification lifecycle stage with the indicator "csprd06" - Committee Specification / Public Review Draft 06: + +- [/odata/odata/v4.01/csprd06/part1-protocol/odata-v4.01-csprd06-part1-protocol.html](https://docs.oasis-open.org/odata/odata/v4.01/csprd06/part1-protocol/odata-v4.01-csprd06-part1-protocol.html) + +And so on, back in time. + +We can visualize the "This", "Previous" and "Latest" link sets for the "OData Version 4.01 Part 1: Protocol" document like this: + +```text ++--------------+ +--------------------------------------+ +| | | | +| Latest |--->| OASIS Standard | +| stage | | | +| | | | ++--------------+ +--------------------------------------+ + | + previous + V + +--------------------------------------+ + | | + | Committee Specification 02 | + | | + | | + +--------------------------------------+ + | + previous + V + +--------------------------------------+ + | | + | Committee Specification Draft 06 | + | / Public Review Draft 06 | + | | + +--------------------------------------+ + | + previous + V + +--------------------------------------+ + | | + | Committee Specification Draft 05 | + | / Public Review Draft 05 | + | | + +--------------------------------------+ + | + previous + V + +--------------------------------------+ + | | + | Committee Specification 01 | + | | + | | + +--------------------------------------+ + | + previous + V + +--------------------------------------+ + | | + | ... | + | | + | | + +--------------------------------------+ +``` + +### Further info + +- [Guidelines for Visualizing Links](https://www.nngroup.com/articles/guidelines-for-visualizing-links/) +- [OASIS document tree](https://github.com/qmacro/odata-specs/blob/master/overview.md) +- [OData Vocabularies](https://github.com/oasis-tcs/odata-vocabularies) diff --git a/tutorials/odata-dd-2-resources/odata-protocol-doc-first-section.png b/tutorials/odata-dd-2-resources/odata-protocol-doc-first-section.png new file mode 100644 index 0000000000..ffaf821390 Binary files /dev/null and b/tutorials/odata-dd-2-resources/odata-protocol-doc-first-section.png differ diff --git a/tutorials/opps-manual-setup/opps-manual-setup.md b/tutorials/opps-manual-setup/opps-manual-setup.md index 601a10d453..0363d2ea7a 100644 --- a/tutorials/opps-manual-setup/opps-manual-setup.md +++ b/tutorials/opps-manual-setup/opps-manual-setup.md @@ -36,7 +36,7 @@ primary_tag: products>sap-business-technology-platform 2. Navigate to your subaccount. It is usually named `trial`. -In case you plan to use the trial subaccount that was initially created when setting up your SAP BTP trial account, please proceed with the following steps: +If you plan to use the trial subaccount that was initially created when setting up your SAP BTP trial account, please proceed with the following steps: 1. In the navigation pane, open **Services > Service Marketplace**. @@ -48,7 +48,7 @@ In case you plan to use the trial subaccount that was initially created when set <!-- The subscription process is finished once the status icon changes from **Processing** to **Subscribed**. --> - +<!-- In case you plan to use a manually created subaccount or want to add new services not present at the time of creating your subaccount, please proceed with the following steps: 1. In the navigation pane, open **Entitlements**. @@ -74,7 +74,7 @@ In case you plan to use a manually created subaccount or want to add new service 11. In the notification box shown in the header choose **Enable Cloud Foundry**. 12. Navigate back to your subaccount and choose **Create Space**. - +--> ### Set up roles and authorizations @@ -93,9 +93,9 @@ In order to use the apps provided with SAP Omnichannel Promotion Pricing, you mu 6. Under **Role Name**, select **`Configure_OPPS`** and **`Maintain_OPPS_Promotions`** from the dropdown list. -7. Assign **User** or **User Groups** to your role collection and choose **Save**. +7. Assign yourself as a **User** or assign a **User Groups** to your role collection and choose **Save**. -Optional: Once you have set up the roles and authorizations, you can do the following steps: +Optional: Once you have set up the roles and authorizations, you can check out our apps as follows: 1. Navigate back to your subaccount. diff --git a/tutorials/sapui5-appfrontend-create/sapui5-appfrontend-create.md b/tutorials/sapui5-appfrontend-create/sapui5-appfrontend-create.md index 90c74fff10..1cb80fe3cf 100644 --- a/tutorials/sapui5-appfrontend-create/sapui5-appfrontend-create.md +++ b/tutorials/sapui5-appfrontend-create/sapui5-appfrontend-create.md @@ -2,7 +2,7 @@ parser: v2 auto_validation: true primary_tag: programming-tool>html5 -tags: [ tutorial>beginner, programming-tool>html5, programming-tool>sapui5, topic>user-interface ] +tags:[ tutorial>beginner, programming-tool>html5, programming-tool>sapui5, topic>user-interface ] time: 20 author_name: Shrinivasan Neelamegam author_profile: https://github.com/neelamegams @@ -14,7 +14,7 @@ author_profile: https://github.com/neelamegams ## Prerequisites -- Install **Node.js (version ≥ 22.6.0)** on your machine +- Install **Node.js (version ≥ 22.6.0)** on your machine ## You will learn @@ -55,7 +55,6 @@ author_profile: https://github.com/neelamegams ui5 init ``` 3. Update `ui5.yaml` with the following code: - ```yaml specVersion: '4.0' metadata: @@ -65,10 +64,8 @@ framework: name: SAPUI5 version: '1.141.1' ``` - > We created a minimal `ui5.yaml` file describing our UI5 project. The UI5 Tooling uses this file to configure the web server that the application will be hosted on. - ### Create the view and index.html 1. Add a view `App.view.xml` inside `webapp/view` folder and paste the following code @@ -105,10 +102,7 @@ xmlns:f="sap.f" xmlns:m="sap.m" xmlns:mvc="sap.ui.core.mvc"> <html> <head> <meta charset="utf-8" /> - <meta - name="viewport" - content="width=device-width, initial-scale=1.0" - /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Employee DashBoard