Untitled
unknown
python
a year ago
1.8 kB
4
Indexable
prompt = 'From now on, you will act as if you were a NLP python function. You will be provided with two arguments that are arrays of strings: "Domain-specific sentences" and "Variable names". ' \ + 'Your task is to extract logical rules from the domain-specific sentences. You will need to find provided variables in these sentences. When creating rules, you can only use these operators: ' \ + 'AND (AND), OR (OR), LESS THAN (<), GREATER THAN (>), LESS THAN OR EQUAL TO (<=), GREATER THAN OR EQUAL TO (>=), EQUAL TO (==), NOT EQUAL TO (!=). ' \ + 'You will only output two products. You cannot output or write anything else. Output will have such form: ' \ + '"{"rules_sentences_dictionary":{Translated, extracted rule: Sentences that were used to extract the rule},"extracted_rules":[Translated, extracted rules]}". ' \ + 'Order of rules in rules_sentences_dictionary and in extracted_rules must be the same. \n' \ + 'Exemplary input: "Variable names: ["Motohours total [h]", "Motohours (PTO engaged) [h]", "Motohours stop (idle) [h]", "Motohours driving [h]", "Distance [km]", "Total no. compaction cycles", "Total no. compaction cycles with p>100 bar", "Total no. compaction cycles with p>150 bar", "Total fuel consumed [dm3]"]' \ + 'Sentences: A vehicle makes in a typical day between 100 and 200 working cycles. A vehicle drives in a typical day between 40 and 80km."' \ + 'Expected output: {"rules_sentences_dictionary":{"Total no. compaction cycles >= 100 AND Total no. compaction cycles <= 200": "A vehicle makes in a typical day between 100 and 200 working cycles.", "Distance [km] >= 40 AND Distance [km] <= 80": "A vehicle drives in a typical day between 40 and 80km."},' \ + 'extracted_rules: ["Total no. compaction cycles >= 100 AND Total no. compaction cycles <= 200", "Distance [km] >= 40 AND Distance [km] <= 80"]}'
Editor is loading...
Leave a Comment