Hernoemen van files
This commit is contained in:
+3
-1
@@ -39,7 +39,7 @@ class ProcessTextFile():
|
||||
for child in root.iter():
|
||||
if child.text.strip():
|
||||
parsed_dict[child.tag] = re.sub(' +', ' ', child.text.strip()).replace('\n ','\n')
|
||||
if len(parsed_dict) > 2:
|
||||
if len(parsed_dict) > 3:
|
||||
all_dicts.append(parsed_dict)
|
||||
parsed_dict = dict()
|
||||
|
||||
@@ -75,6 +75,8 @@ class GherkinData(ProcessTextFile, LLM_prompt_data):
|
||||
for scenario in self.gherkin_list:
|
||||
scenario_name = scenario["scenario_name"]
|
||||
content_acceptance_criteria = scenario["simplified"]
|
||||
manual = scenario["manual_translation"]
|
||||
|
||||
|
||||
make_str += "========================\n"
|
||||
make_str += scenario_name+"\n"
|
||||
|
||||
+2
-1
@@ -94,7 +94,8 @@ async def start_getting_results(sender):
|
||||
await start_rimay_dsl_verification(sender)
|
||||
await start_paska_verification(sender)
|
||||
#When everything is finished, remove logger.
|
||||
current_logger.generate_final_score()
|
||||
if current_logger != None:
|
||||
current_logger.generate_final_score()
|
||||
|
||||
current_logger = None
|
||||
|
||||
|
||||
+121
-53
@@ -1,4 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Versimpelen van de acceptatiecriteria:
|
||||
- Verwijderen de AND constructie
|
||||
- I vertalen naar UserA
|
||||
- Zinnen correct schrijven naar derdepersoonsvorm
|
||||
|
||||
Manual translation:
|
||||
|
||||
While the <GHERKIN_GIVEN_PRECONDITION> when <GHERKIN_TRIGGER>, then <GHERKIN_POSTCONDITION>
|
||||
|
||||
-->
|
||||
<acceptance_criterium>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 1: Requesting the cash from a creditworthy account</scenario_name>
|
||||
@@ -13,9 +24,14 @@
|
||||
</original>
|
||||
<simplified>
|
||||
Given: that the account is creditworthy
|
||||
When: the customer requests the cash
|
||||
When: UserA requests the cash
|
||||
Then: ensure the account is debited
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
While the "bank account" contains "credits"
|
||||
when UserA retrieves "the cash",
|
||||
then SystemA must reduce the "account balance".
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 2: Money withdraw from bank account</scenario_name>
|
||||
@@ -26,10 +42,12 @@
|
||||
Then: the withdrawal should be complete without errors or warnings
|
||||
</original>
|
||||
<simplified>
|
||||
Given: my bank account is in credit
|
||||
When: I attempt to withdraw an amount less than my card's limit
|
||||
Given: UserA bank account is in credit
|
||||
When: UserA attempts to withdraw an amount less than UserA card's limit
|
||||
Then: the withdrawal should be complete without errors or warnings
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 3: Requesting the cash from an overdrawn account</scenario_name>
|
||||
@@ -42,9 +60,11 @@
|
||||
</original>
|
||||
<simplified>
|
||||
Given: that the account is overdrawn
|
||||
When: the customer requests the cash
|
||||
When: UserA requests the cash
|
||||
Then: ensure the rejection message is displayed
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 4: User presses button.</scenario_name>
|
||||
@@ -58,6 +78,8 @@
|
||||
When: UserA clicks on button
|
||||
Then: SystemA refreshes page
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 5: Getting verified after clicking the link in the verification message</scenario_name>
|
||||
@@ -69,10 +91,15 @@
|
||||
And: my account should be verified
|
||||
</original>
|
||||
<simplified>
|
||||
Given: a verification email has already been sent to "valkyrie@cain.com"
|
||||
When: I try to verify my account using the link from this email
|
||||
Then: I should be notified that the verification was successful
|
||||
Given: a verification email has already been sent to "UserA"
|
||||
When: UserA tries to verify his account using the link from this email
|
||||
Then: UserA should be notified that the verification was successful
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
While the "verification email" contains a "verification link"
|
||||
When UserA validates "email address" following the "verification link",
|
||||
then SystemA must notify "with verification successful" to UserA.
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 6: The selected province stays after validation error</scenario_name>
|
||||
@@ -84,25 +111,23 @@
|
||||
And: I should still have "Victoria" as my chosen province
|
||||
</original>
|
||||
<simplified>
|
||||
Given: I am editing the address of "Fletcher Ren"
|
||||
When: I remove the street
|
||||
Then: I should still be on the "Fletcher Ren" address edit page
|
||||
Given: UserA is editing the address of "Fletcher Ren"
|
||||
When: UserA removes the street
|
||||
Then: UserA should still be on the "Fletcher Ren" address edit page
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 7: Getting verified after clicking the link in the verification message</scenario_name>
|
||||
<scenario_name>Scenario 7: TODO</scenario_name>
|
||||
<original>
|
||||
Given: a verification email has already been sent to "valkyrie@cain.com"
|
||||
When: I try to verify my account using the link from this email
|
||||
Then: I should be notified that the verification was successful
|
||||
And: I should be able to log in as "valkyrie@cain.com" with "sylius" password
|
||||
And: my account should be verified
|
||||
TODO
|
||||
</original>
|
||||
<simplified>
|
||||
Given: a verification email has already been sent to "valkyrie@cain.com"
|
||||
When: I try to verify my account using the link from this email
|
||||
Then: I should be notified that the verification was successful
|
||||
TODO
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 8: Disabling country</scenario_name>
|
||||
@@ -115,10 +140,15 @@
|
||||
And: this country should be disabled
|
||||
</original>
|
||||
<simplified>
|
||||
Given: the store has country "United States"
|
||||
When: I want to edit this country
|
||||
Then: I should be notified that it has been successfully edited
|
||||
Given: SystemA has country "United States"
|
||||
When: UserA wants to edit this country
|
||||
Then: UserA should be notified that it has been successfully edited
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
While SystemA has "country United States"
|
||||
when UserA changes "this country",
|
||||
then SystemA must notify "successfully edited" to UserA.
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 9: Resending the verification email as a logged in user</scenario_name>
|
||||
@@ -129,10 +159,15 @@
|
||||
And: it should be sent to "valkyrie@cain.com"
|
||||
</original>
|
||||
<simplified>
|
||||
Given: I am logged in as "valkyrie@cain.com"
|
||||
When: I resend the verification email
|
||||
Then: I should be notified that the verification email has been sent
|
||||
Given: UserA is logged in as "valkyrie@cain.com"
|
||||
When: UserA resends the verification email
|
||||
Then: UserA should be notified that the verification email has been sent
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
While UserA is "logged in as valkyrie@cain.com"
|
||||
when UserA selects "new verification email",
|
||||
then SystemA must notify "verification email has been send" to UserA.
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 10: Logging out the user doesn't log out my admin account</scenario_name>
|
||||
@@ -142,10 +177,13 @@
|
||||
Then: I should still be able to access the administration dashboard
|
||||
</original>
|
||||
<simplified>
|
||||
Given: I am impersonating the customer "remnant@london.uk"
|
||||
When: I log out from the store
|
||||
Then: I should still be able to access the administration dashboard
|
||||
Given: UserA impersonates the customer "remnant@london.uk"
|
||||
When: UserA logs out from SystemA
|
||||
Then: UserA should still be able to access the administration dashboard
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 11: Seeing disabled code field while editing country</scenario_name>
|
||||
@@ -155,10 +193,13 @@
|
||||
Then: the code field should be disabled
|
||||
</original>
|
||||
<simplified>
|
||||
Given: the store has country "United States"
|
||||
When: I want to edit this country
|
||||
Given: SystemA has country "United States"
|
||||
When: UserA wants to edit this country
|
||||
Then: the code field should be disabled
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 12: Changing the currency of my cart</scenario_name>
|
||||
@@ -169,10 +210,13 @@
|
||||
And: the grAnd: total value in base currency should be "$7.00"
|
||||
</original>
|
||||
<simplified>
|
||||
Given: I have product "The Pug Mug" in the cart
|
||||
When: I switch to the "EUR" currency
|
||||
Then: the grAnd: total value should be "€6.82"
|
||||
Given: UserA has product "The Pug Mug" in the cart
|
||||
When: UserA switches to the "EUR" currency
|
||||
Then: the grand total value should be "€6.82"
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 13: Viewing information about empty cart after channel switching</scenario_name>
|
||||
@@ -184,10 +228,13 @@
|
||||
Then: my cart should be empty
|
||||
</original>
|
||||
<simplified>
|
||||
Given: I simplified my current channel to "Poland"
|
||||
When: I change my current channel to "France"
|
||||
Then: my cart should be empty
|
||||
Given: UserA simplifies his current channel to "Poland"
|
||||
When: UserA changes current channel to "France"
|
||||
Then: UserA carts should be empty
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 14: Displaying default shop homepage</scenario_name>
|
||||
@@ -198,9 +245,12 @@
|
||||
</original>
|
||||
<simplified>
|
||||
Given: channel "United States" does not use any theme
|
||||
When: I visit this channel's homepage
|
||||
Then: I should not see a homepage from "maverick/meerkat" theme
|
||||
When: UserA visits this channel's homepage
|
||||
Then: UserA should not see a homepage from "maverick/meerkat" theme
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 15: Displaying themed shop homepage</scenario_name>
|
||||
@@ -211,9 +261,12 @@
|
||||
</original>
|
||||
<simplified>
|
||||
Given: channel "United States" uses "maverick/meerkat" theme
|
||||
When: I visit this channel's homepage
|
||||
Then: I should see a homepage from that theme
|
||||
When: UserA visit this channel's homepage
|
||||
Then: UserA should see a homepage from that theme
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 16: Choosing shipping address from address book</scenario_name>
|
||||
@@ -224,10 +277,13 @@
|
||||
Then: address "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States", "Arkansas" should be filled as shipping address
|
||||
</original>
|
||||
<simplified>
|
||||
Given: I have product "PHP T-Shirt" in the cart
|
||||
When: I choose "Seaside Fwy" street for shipping address
|
||||
Then: address "Lucifer Morningstar", "Seaside Fwy", "90802", "Los Angeles", "United States", "Arkansas" should be filled as shipping address
|
||||
Given: UserA has product "PHP T-Shirt" in the cart
|
||||
When: UserA chooses "Seaside Fwy" street for shipping address
|
||||
Then: address "Lucifer Morningstar, Seaside Fwy, 90802, Los Angeles, United States, Arkansas" should be filled as shipping address
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 17: Seeing the unpaid order in the list</scenario_name>
|
||||
@@ -237,10 +293,13 @@
|
||||
Then: I should see one order with total of $29.99 And: pending payment
|
||||
</original>
|
||||
<simplified>
|
||||
Given: I am logged in as "john@example.com"
|
||||
When: I view my order history
|
||||
Then: I should see one order with total of $29.99 And: pending payment
|
||||
Given: UserA logged in as "john@example.com"
|
||||
When: UserA views order history
|
||||
Then: UserA should sees one order with total of $29.99
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 18: Being unable to change currencies</scenario_name>
|
||||
@@ -252,9 +311,12 @@
|
||||
</original>
|
||||
<simplified>
|
||||
Given: the exchange rate of "US Dollar" to "British Pound" is 1.30
|
||||
When: I want to edit this exchange rate
|
||||
Then: I should see that the source currency is disabled
|
||||
When: UserA wants to edit this exchange rate
|
||||
Then: UserA should see that the source currency is disabled
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 19: Inability to impersonate a customer with no account</scenario_name>
|
||||
@@ -264,10 +326,13 @@
|
||||
Then: I should be unable to impersonate them
|
||||
</original>
|
||||
<simplified>
|
||||
Given: the store has customer "harold@thrasher.ie" with first name "Harold"
|
||||
When: I view their details
|
||||
Then: I should be unable to impersonate them
|
||||
Given: SystemA has customer "harold@thrasher.ie" with first name "Harold"
|
||||
When: UserA views their details
|
||||
Then: UserA should be unable to impersonate them
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
<acceptance_criteria>
|
||||
<scenario_name>Scenario 20: Not being able to add a product to the cart when it is out of stock</scenario_name>
|
||||
@@ -279,8 +344,11 @@
|
||||
</original>
|
||||
<simplified>
|
||||
Given: the product "T-shirt banana" is out of stock
|
||||
When: I check this product's details
|
||||
Then: I should see that it is out of stock
|
||||
When: UserA checks this product's details
|
||||
Then: UserA should see that it is out of stock
|
||||
</simplified>
|
||||
<manual_translation>
|
||||
TODO
|
||||
</manual_translation>
|
||||
</acceptance_criteria>
|
||||
</acceptance_criterium>
|
||||
@@ -48,7 +48,7 @@ Final_score = {this_score}
|
||||
|
||||
# Absolute path of a file
|
||||
old_name = self.log_file
|
||||
new_name = f"{self.log_directory}/{self.prefix}/{self.prefix}_{this_score}_score_{self.timestamp}.md"
|
||||
new_name = f"{self.log_directory}/{self.prefix}/{self.prefix}_{self.timestamp}_{this_score}_score.md"
|
||||
|
||||
# Renaming the file
|
||||
os.rename(old_name, new_name)
|
||||
|
||||
@@ -33,12 +33,14 @@ all_acceptance_criteria = gherkin_acceptance_criteria.get_all_acceptance_criteri
|
||||
|
||||
|
||||
gui = str(sys.argv[1])
|
||||
range_start = int(sys.argv[2]) or 0
|
||||
range_end = int(sys.argv[3]) or 20
|
||||
|
||||
print(gherkin_acceptance_criteria)
|
||||
|
||||
if gui == "standalone":
|
||||
range_start = int(sys.argv[2]) or 0
|
||||
range_end = int(sys.argv[3]) or 20
|
||||
|
||||
print(gherkin_acceptance_criteria)
|
||||
print(len(all_acceptance_criteria))
|
||||
# Standalone?
|
||||
for scenario in all_acceptance_criteria[range_start:range_end]:
|
||||
scenario_name = scenario["scenario_name"]
|
||||
|
||||
@@ -49,4 +49,7 @@ ActionPhrase :
|
||||
| INVOLVE_107 | MIX_22_1_2 | DS_Synchronize
|
||||
| Split | ApplyFor | DS_GetFrom | STOP_55_4 | SEARCH_35_2
|
||||
| ESTABLISH_55_5_1 | ADVISE_37_9_1 |DS_ENABLE_DISABLE |DS_SUBSCRIBE | DS_CANCEL |DS_CALCULATE//check
|
||||
;
|
||||
;
|
||||
|
||||
|
||||
While the <GHERKIN_GIVEN_PRECONDITION> when <GHERKIN_TRIGGER>, then <GHERKIN_POSTCONDITION>
|
||||
@@ -0,0 +1,129 @@
|
||||
|
||||
|
||||
# LLM Experiment Information
|
||||
* Prefix: Chain-of-thought
|
||||
* Datetime: 03_28_2024__14:25:48
|
||||
* UniqueID: cd242f79-30c9-4ecf-922d-d1ae90b6de67
|
||||
|
||||
|
||||
|
||||
## Gherkin Input
|
||||
```
|
||||
Given: UserA logged in as "john@example.com"
|
||||
When: UserA views order history
|
||||
Then: UserA should sees one order with total of $29.99
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Input prompt, technique: Chain of Thought
|
||||
|
||||
|
||||
Learn from the following example, the output information for the CNL Rimay is:
|
||||
This part is the start of the example you have to learn from:
|
||||
|
||||
The input information is as follows:
|
||||
|
||||
Acceptance Criteria 1 in Gherkin, input:
|
||||
Gherkin:
|
||||
Scenario: Create an Order
|
||||
Given an Order of type Subscription_Order does not exist in OI of type Order_Issuer
|
||||
When OI Create Order,
|
||||
Then Order exists in OI
|
||||
And the property settlement_method of Order is equal to FOP
|
||||
|
||||
|
||||
Rimay output 1:
|
||||
When the Order_Issuer (OI ) executes Create a Subscription_Order, if the Order does not exist, then the Order is created and its settlement_method is set to FOP.
|
||||
|
||||
Rimay uses the following structure:
|
||||
When the? Actor <Action> (every "Frequency")? ,|then the? Actor must <Action> (every "Text")?.
|
||||
|
||||
Ending for example
|
||||
|
||||
Translate the following input acceptance criteria Gherkin, according to the example above, to Rimay:
|
||||
|
||||
|
||||
|
||||
### Input Data
|
||||
Use the following Gherkin acceptance criteria input:
|
||||
```
|
||||
Given: UserA logged in as "john@example.com"
|
||||
When: UserA views order history
|
||||
Then: UserA should sees one order with total of $29.99
|
||||
```
|
||||
|
||||
### Question:
|
||||
Can you translate the input above into the specified language Rimay CNL?
|
||||
|
||||
### Output indicator
|
||||
Output only your translated Rimay CNL text and nothing else!
|
||||
|
||||
|
||||
## Rimay Output
|
||||
```
|
||||
Given UserA logged in as "john@example.com", when UserA views order history, then UserA should see one order with a total of $29.99.
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Rimay DSL Verification
|
||||
```
|
||||
ERROR:no viable alternative at input 'UserA' (line : 3 column : 7)
|
||||
ERROR:missing '.' at 'logged' (line : 3 column : 13)
|
||||
ERROR:no viable alternative at input 'in' (line : 3 column : 20)
|
||||
ERROR:no viable alternative at input 'when' (line : 3 column : 46)
|
||||
ERROR:no viable alternative at input 'order' (line : 3 column : 63)
|
||||
ERROR:no viable alternative at input 'history' (line : 3 column : 69)
|
||||
ERROR:missing '.' at 'UserA' (line : 3 column : 83)
|
||||
ERROR:no viable alternative at input 'should' (line : 3 column : 89)
|
||||
ERROR:missing '.' at 'see' (line : 3 column : 96)
|
||||
ERROR:no viable alternative at input 'one' (line : 3 column : 100)
|
||||
ERROR:missing '.' at 'order' (line : 3 column : 104)
|
||||
ERROR:no viable alternative at input 'with' (line : 3 column : 110)
|
||||
ERROR:no viable alternative at input 'a' (line : 3 column : 115)
|
||||
ERROR:no viable alternative at input 'of' (line : 3 column : 123)
|
||||
ERROR:no viable alternative at input '.' (line : 3 column : 129)
|
||||
ERROR:missing EOF at '99' (line : 3 column : 130)
|
||||
ERROR:Couldn't resolve reference to Actor 'Given'. (line : 3 column : 1)
|
||||
ERROR:Couldn't resolve reference to Actor 'logged'. (line : 3 column : 13)
|
||||
ERROR:Couldn't resolve reference to Actor 'views'. (line : 3 column : 57)
|
||||
ERROR:Couldn't resolve reference to Quantifier 'UserA'. (line : 3 column : 51)
|
||||
ERROR:Couldn't resolve reference to Actor 'order'. (line : 3 column : 63)
|
||||
ERROR:Couldn't resolve reference to Actor 'see'. (line : 3 column : 96)
|
||||
ERROR:Couldn't resolve reference to Actor 'order'. (line : 3 column : 104)
|
||||
ERROR:Couldn't resolve reference to Actor 'total'. (line : 3 column : 117)
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 40
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
|
||||
## Rimay Paska Verification
|
||||
```
|
||||
File generated_rimay.csv.csv
|
||||
Smells found in this document:
|
||||
Non-atomic requirement: 0
|
||||
Incomplete requirement: 0
|
||||
Incorrect order requirement: 0
|
||||
Coordination ambiguity: 0
|
||||
Not requirement: ,0
|
||||
Incomplete condition: 1
|
||||
Incomplete system response: 0
|
||||
Passive voice: 0
|
||||
Not precise verb: 0
|
||||
Number Req with smells: 1
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 96
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
### Final Score
|
||||
Final_score = 68.0
|
||||
@@ -0,0 +1,111 @@
|
||||
|
||||
|
||||
# LLM Experiment Information
|
||||
* Prefix: Chain-of-thought
|
||||
* Datetime: 03_28_2024__14:27:58
|
||||
* UniqueID: 7b8fa6be-2c90-440d-a032-a08c781744cf
|
||||
|
||||
|
||||
|
||||
## Gherkin Input
|
||||
```
|
||||
Given: the exchange rate of "US Dollar" to "British Pound" is 1.30
|
||||
When: UserA wants to edit this exchange rate
|
||||
Then: UserA should see that the source currency is disabled
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Input prompt, technique: Chain of Thought
|
||||
|
||||
|
||||
Learn from the following example, the output information for the CNL Rimay is:
|
||||
This part is the start of the example you have to learn from:
|
||||
|
||||
The input information is as follows:
|
||||
|
||||
Acceptance Criteria 1 in Gherkin, input:
|
||||
Gherkin:
|
||||
Scenario: Create an Order
|
||||
Given an Order of type Subscription_Order does not exist in OI of type Order_Issuer
|
||||
When OI Create Order,
|
||||
Then Order exists in OI
|
||||
And the property settlement_method of Order is equal to FOP
|
||||
|
||||
|
||||
Rimay output 1:
|
||||
When the Order_Issuer (OI ) executes Create a Subscription_Order, if the Order does not exist, then the Order is created and its settlement_method is set to FOP.
|
||||
|
||||
Rimay uses the following structure:
|
||||
When the? Actor <Action> (every "Frequency")? ,|then the? Actor must <Action> (every "Text")?.
|
||||
|
||||
Ending for example
|
||||
|
||||
Translate the following input acceptance criteria Gherkin, according to the example above, to Rimay:
|
||||
|
||||
|
||||
|
||||
### Input Data
|
||||
Use the following Gherkin acceptance criteria input:
|
||||
```
|
||||
Given: the exchange rate of "US Dollar" to "British Pound" is 1.30
|
||||
When: UserA wants to edit this exchange rate
|
||||
Then: UserA should see that the source currency is disabled
|
||||
```
|
||||
|
||||
### Question:
|
||||
Can you translate the input above into the specified language Rimay CNL?
|
||||
|
||||
### Output indicator
|
||||
Output only your translated Rimay CNL text and nothing else!
|
||||
|
||||
|
||||
## Rimay Output
|
||||
```
|
||||
Given the exchange rate of "US Dollar" to "British Pound" is 1.30, when UserA wants to edit this exchange rate, then UserA must see that the source currency is disabled.
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Rimay DSL Verification
|
||||
```
|
||||
ERROR:no viable alternative at input 'the' (line : 3 column : 7)
|
||||
ERROR:missing '.' at 'exchange' (line : 3 column : 11)
|
||||
ERROR:no viable alternative at input 'rate' (line : 3 column : 20)
|
||||
ERROR:missing EOF at '30' (line : 3 column : 64)
|
||||
ERROR:Couldn't resolve reference to Actor 'Given'. (line : 3 column : 1)
|
||||
ERROR:Couldn't resolve reference to Actor 'exchange'. (line : 3 column : 11)
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 58
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
|
||||
## Rimay Paska Verification
|
||||
```
|
||||
File generated_rimay.csv.csv
|
||||
Smells found in this document:
|
||||
Non-atomic requirement: 0
|
||||
Incomplete requirement: 0
|
||||
Incorrect order requirement: 0
|
||||
Coordination ambiguity: 0
|
||||
Not requirement: ,0
|
||||
Incomplete condition: 0
|
||||
Incomplete system response: 0
|
||||
Passive voice: 0
|
||||
Not precise verb: 0
|
||||
Number Req with smells: 0
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 100
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
### Final Score
|
||||
Final_score = 79.0
|
||||
+142
@@ -0,0 +1,142 @@
|
||||
|
||||
|
||||
# LLM Experiment Information
|
||||
* Prefix: Few-shot learning
|
||||
* Datetime: 03_24_2024__13:36:57
|
||||
* UniqueID: b9aaee8e-bfaa-449d-b2e9-bac6a90ae47e
|
||||
|
||||
|
||||
|
||||
## Gherkin Input
|
||||
```
|
||||
Given: UserA navigates to the login page
|
||||
When: UserA clicks on button
|
||||
Then: SystemA refreshes page
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Input prompt, technique: Few-Shot Learning
|
||||
|
||||
|
||||
### Context
|
||||
The following syntax structure is called Rimay, this is a CNL (Controlled Natural Language):
|
||||
|
||||
$ACTOR is for example a thing or a person.
|
||||
$MODAL_VERB is for example the following word: must and shall.
|
||||
$TRIGGER is for example a trigger action, something what a system does.
|
||||
$WHEN_STRUCTURE is the word 'When' followed by the variable defined $TRIGGER.
|
||||
$SYSTEM_RESPONSE is something that the syst
|
||||
|
||||
$ACTOR, $MODAL_VERB and a $SYSTEM_RESPONSE is mandatory in all Rimay requirements.
|
||||
Replace the variables with the right text according the input acceptance criteria.
|
||||
In the following order:
|
||||
|
||||
Rimay CNL definition: $WHEN_STRUCTURE $ACTOR $MODAL_VERB $SYSTEM_RESPONSE
|
||||
|
||||
really important rule, make only use of the following word list:
|
||||
|
||||
This list of variables is important and can be used to formulete Rimay:
|
||||
Only make use of the following words:
|
||||
|
||||
is, are, equal, equals, greater than, less than, has, have, contain, contains, do, does, every,
|
||||
before, after, if, and, or, not, of, permit, permits, accept, acepts, allow, allows, is, are, shall, must,
|
||||
a, an, the, do, the, following, actions, exclude, excludes, instruct, instructs,
|
||||
allow, allows, authorize, authorizes, request, requests,
|
||||
start, starts, begin, begins, cancel, cancels, hide, hides,
|
||||
restore, restores, compute, computes, publish, publishes, enable, disable,
|
||||
enforce, enforces, create, creates, generate, generates, replace, replaces,
|
||||
prevent, prevents, download, downloads, aggregate, aggregates,
|
||||
interrupt, interrupts, include, includes, store, stores, property, properties, value, values,
|
||||
limit, limits, restrict, restricts, reduce, reduces, migrate, migrates,
|
||||
add, adds, link, links, neglect, neglects, ignore, ignores, accept, accepts, receive, receives, retrieve, retrieves,
|
||||
close, closes, reverse, reverses, insert, inserts, display, displays, show, shows,
|
||||
extract, extracts, remove, removes, delete, deletes, deduct, deducts, report, reports, propose, proposes,
|
||||
detect, detects, select, selects, unselect, unselects, return, returns, send, sends, forward, forward, pass, passes, export, exports,
|
||||
concatenate, concatenates, synchronize, synchronizes, discard, discards, copy, copies,
|
||||
convert, converts, change, changes, transform, transforms, update, updates, set, sets,
|
||||
use, uses, apply, applies, validate, validates, check, checks, calculate, calculates, recalculate, recalculates
|
||||
establish, establishes, search, searches, split, splits, stop, stops, finish, finishes
|
||||
subscribe, subscribes, upload, uploads
|
||||
|
||||
|
||||
Important extra rule: if the word is not defined in the list above, put if between quotes.
|
||||
DO NOT WRITE ANY OTHER WORDS THAN THE DEFINED WORD LIST!
|
||||
|
||||
The following example is a valid Rimay CNL:
|
||||
|
||||
When SystemB receives an "email alert" from SystemA, SystemB must send an Instruction to SystemC.
|
||||
|
||||
With the usage of the following extra information:
|
||||
Actors: actor SystemA, actor SystemB, actor SystemC, actor UserX, actor UserA, actor UserC
|
||||
Classes: class Instruction := description record, class Y
|
||||
|
||||
THIS IS NOT VALID RIMAY:
|
||||
When UserA navigates to the login page, UserA clicks on button, SystemA must refresh the page.
|
||||
|
||||
The following example would be valid:
|
||||
When UserA "navigates to the login page", UserA "clicks on button", SystemA must "refresh the page".
|
||||
|
||||
|
||||
### Input Data
|
||||
Use the following Gherkin acceptance criteria input:
|
||||
```
|
||||
Given: UserA navigates to the login page
|
||||
When: UserA clicks on button
|
||||
Then: SystemA refreshes page
|
||||
```
|
||||
|
||||
### Question:
|
||||
Can you translate the input above into the specified language Rimay CNL?
|
||||
|
||||
### Output indicator
|
||||
Output only your translated Rimay CNL text and nothing else!
|
||||
|
||||
|
||||
## Rimay Output
|
||||
```
|
||||
When UserA "navigates to the login page", UserA "clicks on button", SystemA must "refresh the page".
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Rimay DSL Verification
|
||||
```
|
||||
ERROR:no viable alternative at input ',' (line : 3 column : 41)
|
||||
ERROR:no viable alternative at input '"clicks on button"' (line : 3 column : 49)
|
||||
ERROR:no viable alternative at input 'SystemA' (line : 3 column : 69)
|
||||
ERROR:no viable alternative at input '"refresh the page"' (line : 3 column : 82)
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 95
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
|
||||
## Rimay Paska Verification
|
||||
```
|
||||
File generated_rimay.csv.csv
|
||||
Smells found in this document:
|
||||
Non-atomic requirement: 0
|
||||
Incomplete requirement: 0
|
||||
Incorrect order requirement: 0
|
||||
Coordination ambiguity: 0
|
||||
Not requirement: ,0
|
||||
Incomplete condition: 0
|
||||
Incomplete system response: 0
|
||||
Passive voice: 0
|
||||
Not precise verb: 0
|
||||
Number Req with smells: 0
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 100
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
### Final Score
|
||||
Final_score = 97.5
|
||||
+140
@@ -0,0 +1,140 @@
|
||||
|
||||
|
||||
# LLM Experiment Information
|
||||
* Prefix: Few-shot learning
|
||||
* Datetime: 03_28_2024__14:24:46
|
||||
* UniqueID: 961393bc-7b2d-43ae-a1f1-02c3b9232007
|
||||
|
||||
|
||||
|
||||
## Gherkin Input
|
||||
```
|
||||
Given: UserA logged in as "john@example.com"
|
||||
When: UserA views order history
|
||||
Then: UserA should sees one order with total of $29.99
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Input prompt, technique: Few-Shot Learning
|
||||
|
||||
|
||||
### Context
|
||||
The following syntax structure is called Rimay, this is a CNL (Controlled Natural Language):
|
||||
|
||||
$ACTOR is for example a thing or a person.
|
||||
$MODAL_VERB is for example the following word: must and shall.
|
||||
$TRIGGER is for example a trigger action, something what a system does.
|
||||
$WHEN_STRUCTURE is the word 'When' followed by the variable defined $TRIGGER.
|
||||
$SYSTEM_RESPONSE is something that the syst
|
||||
|
||||
$ACTOR, $MODAL_VERB and a $SYSTEM_RESPONSE is mandatory in all Rimay requirements.
|
||||
Replace the variables with the right text according the input acceptance criteria.
|
||||
In the following order:
|
||||
|
||||
Rimay CNL definition: $WHEN_STRUCTURE $ACTOR $MODAL_VERB $SYSTEM_RESPONSE
|
||||
|
||||
really important rule, make only use of the following word list:
|
||||
|
||||
This list of variables is important and can be used to formulete Rimay:
|
||||
Only make use of the following words:
|
||||
|
||||
is, are, equal, equals, greater than, less than, has, have, contain, contains, do, does, every,
|
||||
before, after, if, and, or, not, of, permit, permits, accept, acepts, allow, allows, is, are, shall, must,
|
||||
a, an, the, do, the, following, actions, exclude, excludes, instruct, instructs,
|
||||
allow, allows, authorize, authorizes, request, requests,
|
||||
start, starts, begin, begins, cancel, cancels, hide, hides,
|
||||
restore, restores, compute, computes, publish, publishes, enable, disable,
|
||||
enforce, enforces, create, creates, generate, generates, replace, replaces,
|
||||
prevent, prevents, download, downloads, aggregate, aggregates,
|
||||
interrupt, interrupts, include, includes, store, stores, property, properties, value, values,
|
||||
limit, limits, restrict, restricts, reduce, reduces, migrate, migrates,
|
||||
add, adds, link, links, neglect, neglects, ignore, ignores, accept, accepts, receive, receives, retrieve, retrieves,
|
||||
close, closes, reverse, reverses, insert, inserts, display, displays, show, shows,
|
||||
extract, extracts, remove, removes, delete, deletes, deduct, deducts, report, reports, propose, proposes,
|
||||
detect, detects, select, selects, unselect, unselects, return, returns, send, sends, forward, forward, pass, passes, export, exports,
|
||||
concatenate, concatenates, synchronize, synchronizes, discard, discards, copy, copies,
|
||||
convert, converts, change, changes, transform, transforms, update, updates, set, sets,
|
||||
use, uses, apply, applies, validate, validates, check, checks, calculate, calculates, recalculate, recalculates
|
||||
establish, establishes, search, searches, split, splits, stop, stops, finish, finishes
|
||||
subscribe, subscribes, upload, uploads
|
||||
|
||||
|
||||
Important extra rule: if the word is not defined in the list above, put if between quotes.
|
||||
DO NOT WRITE ANY OTHER WORDS THAN THE DEFINED WORD LIST!
|
||||
|
||||
The following example is a valid Rimay CNL:
|
||||
|
||||
When SystemB receives an "email alert" from SystemA, SystemB must send an Instruction to SystemC.
|
||||
|
||||
With the usage of the following extra information:
|
||||
Actors: actor SystemA, actor SystemB, actor SystemC, actor UserX, actor UserA, actor UserC
|
||||
Classes: class Instruction := description record, class Y
|
||||
|
||||
THIS IS NOT VALID RIMAY:
|
||||
When UserA navigates to the login page, UserA clicks on button, SystemA must refresh the page.
|
||||
|
||||
The following example would be valid:
|
||||
When UserA "navigates to the login page", UserA "clicks on button", SystemA must "refresh the page".
|
||||
|
||||
|
||||
### Input Data
|
||||
Use the following Gherkin acceptance criteria input:
|
||||
```
|
||||
Given: UserA logged in as "john@example.com"
|
||||
When: UserA views order history
|
||||
Then: UserA should sees one order with total of $29.99
|
||||
```
|
||||
|
||||
### Question:
|
||||
Can you translate the input above into the specified language Rimay CNL?
|
||||
|
||||
### Output indicator
|
||||
Output only your translated Rimay CNL text and nothing else!
|
||||
|
||||
|
||||
## Rimay Output
|
||||
```
|
||||
When UserA "views order history", UserA must "sees one order with total of $29.99".
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Rimay DSL Verification
|
||||
```
|
||||
ERROR:no viable alternative at input ',' (line : 3 column : 33)
|
||||
ERROR:no viable alternative at input '"sees one order with total of $29.99"' (line : 3 column : 46)
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 97
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
|
||||
## Rimay Paska Verification
|
||||
```
|
||||
File generated_rimay.csv.csv
|
||||
Smells found in this document:
|
||||
Non-atomic requirement: 0
|
||||
Incomplete requirement: 0
|
||||
Incorrect order requirement: 0
|
||||
Coordination ambiguity: 0
|
||||
Not requirement: ,0
|
||||
Incomplete condition: 1
|
||||
Incomplete system response: 0
|
||||
Passive voice: 0
|
||||
Not precise verb: 0
|
||||
Number Req with smells: 1
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 96
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
### Final Score
|
||||
Final_score = 96.5
|
||||
+155
@@ -0,0 +1,155 @@
|
||||
|
||||
|
||||
# LLM Experiment Information
|
||||
* Prefix: Few-shot learning
|
||||
* Datetime: 03_28_2024__14:27:14
|
||||
* UniqueID: 8d6219f1-e0c2-4da7-bde7-7735ab7ed227
|
||||
|
||||
|
||||
|
||||
## Gherkin Input
|
||||
```
|
||||
Given: the exchange rate of "US Dollar" to "British Pound" is 1.30
|
||||
When: UserA wants to edit this exchange rate
|
||||
Then: UserA should see that the source currency is disabled
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Input prompt, technique: Few-Shot Learning
|
||||
|
||||
|
||||
### Context
|
||||
The following syntax structure is called Rimay, this is a CNL (Controlled Natural Language):
|
||||
|
||||
$ACTOR is for example a thing or a person.
|
||||
$MODAL_VERB is for example the following word: must and shall.
|
||||
$TRIGGER is for example a trigger action, something what a system does.
|
||||
$WHEN_STRUCTURE is the word 'When' followed by the variable defined $TRIGGER.
|
||||
$SYSTEM_RESPONSE is something that the syst
|
||||
|
||||
$ACTOR, $MODAL_VERB and a $SYSTEM_RESPONSE is mandatory in all Rimay requirements.
|
||||
Replace the variables with the right text according the input acceptance criteria.
|
||||
In the following order:
|
||||
|
||||
Rimay CNL definition: $WHEN_STRUCTURE $ACTOR $MODAL_VERB $SYSTEM_RESPONSE
|
||||
|
||||
really important rule, make only use of the following word list:
|
||||
|
||||
This list of variables is important and can be used to formulete Rimay:
|
||||
Only make use of the following words:
|
||||
|
||||
is, are, equal, equals, greater than, less than, has, have, contain, contains, do, does, every,
|
||||
before, after, if, and, or, not, of, permit, permits, accept, acepts, allow, allows, is, are, shall, must,
|
||||
a, an, the, do, the, following, actions, exclude, excludes, instruct, instructs,
|
||||
allow, allows, authorize, authorizes, request, requests,
|
||||
start, starts, begin, begins, cancel, cancels, hide, hides,
|
||||
restore, restores, compute, computes, publish, publishes, enable, disable,
|
||||
enforce, enforces, create, creates, generate, generates, replace, replaces,
|
||||
prevent, prevents, download, downloads, aggregate, aggregates,
|
||||
interrupt, interrupts, include, includes, store, stores, property, properties, value, values,
|
||||
limit, limits, restrict, restricts, reduce, reduces, migrate, migrates,
|
||||
add, adds, link, links, neglect, neglects, ignore, ignores, accept, accepts, receive, receives, retrieve, retrieves,
|
||||
close, closes, reverse, reverses, insert, inserts, display, displays, show, shows,
|
||||
extract, extracts, remove, removes, delete, deletes, deduct, deducts, report, reports, propose, proposes,
|
||||
detect, detects, select, selects, unselect, unselects, return, returns, send, sends, forward, forward, pass, passes, export, exports,
|
||||
concatenate, concatenates, synchronize, synchronizes, discard, discards, copy, copies,
|
||||
convert, converts, change, changes, transform, transforms, update, updates, set, sets,
|
||||
use, uses, apply, applies, validate, validates, check, checks, calculate, calculates, recalculate, recalculates
|
||||
establish, establishes, search, searches, split, splits, stop, stops, finish, finishes
|
||||
subscribe, subscribes, upload, uploads
|
||||
|
||||
|
||||
Important extra rule: if the word is not defined in the list above, put if between quotes.
|
||||
DO NOT WRITE ANY OTHER WORDS THAN THE DEFINED WORD LIST!
|
||||
|
||||
The following example is a valid Rimay CNL:
|
||||
|
||||
When SystemB receives an "email alert" from SystemA, SystemB must send an Instruction to SystemC.
|
||||
|
||||
With the usage of the following extra information:
|
||||
Actors: actor SystemA, actor SystemB, actor SystemC, actor UserX, actor UserA, actor UserC
|
||||
Classes: class Instruction := description record, class Y
|
||||
|
||||
THIS IS NOT VALID RIMAY:
|
||||
When UserA navigates to the login page, UserA clicks on button, SystemA must refresh the page.
|
||||
|
||||
The following example would be valid:
|
||||
When UserA "navigates to the login page", UserA "clicks on button", SystemA must "refresh the page".
|
||||
|
||||
|
||||
### Input Data
|
||||
Use the following Gherkin acceptance criteria input:
|
||||
```
|
||||
Given: the exchange rate of "US Dollar" to "British Pound" is 1.30
|
||||
When: UserA wants to edit this exchange rate
|
||||
Then: UserA should see that the source currency is disabled
|
||||
```
|
||||
|
||||
### Question:
|
||||
Can you translate the input above into the specified language Rimay CNL?
|
||||
|
||||
### Output indicator
|
||||
Output only your translated Rimay CNL text and nothing else!
|
||||
|
||||
|
||||
## Rimay Output
|
||||
```
|
||||
When UserA wants to edit the exchange rate of "US Dollar" to "British Pound", UserA must see that the source currency is disabled.
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Rimay DSL Verification
|
||||
```
|
||||
ERROR:no viable alternative at input 'to' (line : 3 column : 18)
|
||||
ERROR:missing ',' at 'edit' (line : 3 column : 21)
|
||||
ERROR:no viable alternative at input 'the' (line : 3 column : 26)
|
||||
ERROR:missing '.' at 'exchange' (line : 3 column : 30)
|
||||
ERROR:no viable alternative at input 'rate' (line : 3 column : 39)
|
||||
ERROR:missing '.' at 'UserA' (line : 3 column : 79)
|
||||
ERROR:no viable alternative at input 'see' (line : 3 column : 90)
|
||||
ERROR:no viable alternative at input 'that' (line : 3 column : 94)
|
||||
ERROR:no viable alternative at input 'the' (line : 3 column : 99)
|
||||
ERROR:no viable alternative at input 'currency' (line : 3 column : 110)
|
||||
ERROR:extraneous input 'disabled' expecting '.' (line : 3 column : 122)
|
||||
ERROR:Couldn't resolve reference to Actor 'wants'. (line : 3 column : 12)
|
||||
ERROR:Couldn't resolve reference to Quantifier 'UserA'. (line : 3 column : 6)
|
||||
ERROR:Couldn't resolve reference to Actor 'edit'. (line : 3 column : 21)
|
||||
ERROR:Couldn't resolve reference to Actor 'exchange'. (line : 3 column : 30)
|
||||
ERROR:Couldn't resolve reference to Actor 'see'. (line : 3 column : 90)
|
||||
ERROR:Couldn't resolve reference to Actor 'source'. (line : 3 column : 103)
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 77
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
|
||||
## Rimay Paska Verification
|
||||
```
|
||||
File generated_rimay.csv.csv
|
||||
Smells found in this document:
|
||||
Non-atomic requirement: 0
|
||||
Incomplete requirement: 0
|
||||
Incorrect order requirement: 0
|
||||
Coordination ambiguity: 0
|
||||
Not requirement: ,0
|
||||
Incomplete condition: 0
|
||||
Incomplete system response: 0
|
||||
Passive voice: 0
|
||||
Not precise verb: 0
|
||||
Number Req with smells: 0
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 100
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
### Final Score
|
||||
Final_score = 88.5
|
||||
@@ -0,0 +1,107 @@
|
||||
|
||||
|
||||
# LLM Experiment Information
|
||||
* Prefix: Role play
|
||||
* Datetime: 03_24_2024__15:38:12
|
||||
* UniqueID: d9f383a4-63c4-4894-aa6e-83e4f3924c53
|
||||
|
||||
|
||||
|
||||
## Gherkin Input
|
||||
```
|
||||
Given: UserA navigates to the login page
|
||||
When: UserA clicks on button
|
||||
Then: SystemA refreshes page
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Input prompt, technique: Role Play
|
||||
|
||||
|
||||
Behave like a person who writes the Controlled Natural Language (CNL) Rimay.
|
||||
Rimay is a language that is defined in different components.
|
||||
For now we only highlight the following components:
|
||||
|
||||
Mandatory:
|
||||
|
||||
$ACTOR = SystemA
|
||||
$MODAL_VERB = should, can, could, might, will
|
||||
$SYSTEM_RESPONSE = SYSTEM_RESPONSE_EXPRESSION | RESPONSE_BLOCK_ITEMIZED
|
||||
$SYSTEM_RESPONSE_EXPRESSION: ATOMIC_SYSTEM_RESPONSE ((,|, and|, or|and|or)? ATOMIC_SYSTEM_RESPONSE)* ATOMIC_SYSTEM_RESPONSE: ACTION_PHRASE (every TEXT )? RESPONSE_BLOCK_ITEMIZED: do the following actions (in sequence)? : BULLET ATOMIC_SYSTEM_RESPONSE ((,|, and|, or|and|or)? BULLET ATOMIC_SYSTEM_RESPONSE)*
|
||||
Optional:
|
||||
$WHEN_STRUCTURE : When TRIGGER
|
||||
|
||||
Use for ACTOR for example SystemA and use for MODAL_VERB for example the following words: should, can, could, might, will
|
||||
|
||||
|
||||
$ACTOR, $MODAL_VERB and $SYSTEM_RESPONSE is mandatory in all Rimay requirements.
|
||||
|
||||
Rimay CNL: $WHEN_STRUCTURE $ACTOR $MODAL_VERB $SYSTEM_RESPONSE
|
||||
|
||||
Now I want you to answer as the person who writes Rimay to translate this acceptance criteria into Rimay
|
||||
|
||||
|
||||
|
||||
### Input Data
|
||||
Use the following Gherkin acceptance criteria input:
|
||||
```
|
||||
Given: UserA navigates to the login page
|
||||
When: UserA clicks on button
|
||||
Then: SystemA refreshes page
|
||||
```
|
||||
|
||||
### Question:
|
||||
Can you translate the input above into the specified language Rimay CNL?
|
||||
|
||||
### Output indicator
|
||||
Output only your translated Rimay CNL text and nothing else!
|
||||
|
||||
|
||||
## Rimay Output
|
||||
```
|
||||
$ACTOR SystemA $MODAL_VERB should $SYSTEM_RESPONSE do the following actions in sequence:
|
||||
- UserA navigates to the login page
|
||||
- UserA clicks on button
|
||||
- SystemA refreshes page
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Rimay DSL Verification
|
||||
```
|
||||
ERROR:missing EOF at '$' (line : 3 column : 1)
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 63
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
|
||||
## Rimay Paska Verification
|
||||
```
|
||||
File generated_rimay.csv.csv
|
||||
Smells found in this document:
|
||||
Non-atomic requirement: 0
|
||||
Incomplete requirement: 0
|
||||
Incorrect order requirement: 0
|
||||
Coordination ambiguity: 0
|
||||
Not requirement: ,0
|
||||
Incomplete condition: 0
|
||||
Incomplete system response: 0
|
||||
Passive voice: 0
|
||||
Not precise verb: 1
|
||||
Number Req with smells: 1
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 96
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
### Final Score
|
||||
Final_score = 79.5
|
||||
@@ -0,0 +1,122 @@
|
||||
|
||||
|
||||
# LLM Experiment Information
|
||||
* Prefix: Role play
|
||||
* Datetime: 03_28_2024__14:26:31
|
||||
* UniqueID: 84a0a080-2053-46f9-a61f-31acb14c4002
|
||||
|
||||
|
||||
|
||||
## Gherkin Input
|
||||
```
|
||||
Given: UserA logged in as "john@example.com"
|
||||
When: UserA views order history
|
||||
Then: UserA should sees one order with total of $29.99
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Input prompt, technique: Role Play
|
||||
|
||||
|
||||
Behave like a person who writes the Controlled Natural Language (CNL) Rimay.
|
||||
Rimay is a language that is defined in different components.
|
||||
You are a person that translates Gherkin acceptance criteria into Rimay system requirements.
|
||||
A person that translates Gherkin in Rimay behaves like the following:
|
||||
|
||||
Gherkin (input):
|
||||
```
|
||||
Given: a verification email has already been sent to "UserA"
|
||||
When: UserA tries to verify his account using the link from this email
|
||||
Then: UserA should be notified that the verification was successful
|
||||
```
|
||||
|
||||
Rimay (output):
|
||||
```
|
||||
While the "verification email" contains a "verification link"
|
||||
When UserA validates "email address" following the "verification link",
|
||||
then SystemA must notify "with verification successful" to UserA.
|
||||
```
|
||||
|
||||
Another example is:
|
||||
|
||||
Gherkin (input):
|
||||
```
|
||||
Given: UserA is editing the address of "Fletcher Ren"
|
||||
When: UserA removes the street
|
||||
Then: UserA should still be on the "Fletcher Ren" address edit page
|
||||
```
|
||||
|
||||
Rimay (output):
|
||||
```
|
||||
While UserA is "editing the adress of Fletcher Ren"
|
||||
When UserA removes "the street",
|
||||
then SystemA must show "the edit address page".
|
||||
```
|
||||
|
||||
Show special interest in the used double qoutes in Rimay, this is important. Keep the same structure as the translated Rimay examples.
|
||||
|
||||
Now I want you to answer as the person who translates Gherkin into Rimay.
|
||||
|
||||
|
||||
|
||||
### Input Data
|
||||
Use the following Gherkin acceptance criteria input:
|
||||
```
|
||||
Given: UserA logged in as "john@example.com"
|
||||
When: UserA views order history
|
||||
Then: UserA should sees one order with total of $29.99
|
||||
```
|
||||
|
||||
### Question:
|
||||
Can you translate the input above into the specified language Rimay CNL?
|
||||
|
||||
### Output indicator
|
||||
Output only your translated Rimay CNL text and nothing else!
|
||||
|
||||
|
||||
## Rimay Output
|
||||
```
|
||||
While UserA is "logged in as john@example.com"
|
||||
When UserA checks "order history",
|
||||
then SystemA must display "one order with total of $29.99".
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Rimay DSL Verification
|
||||
```
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 100
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
|
||||
## Rimay Paska Verification
|
||||
```
|
||||
File generated_rimay.csv.csv
|
||||
Smells found in this document:
|
||||
Non-atomic requirement: 0
|
||||
Incomplete requirement: 0
|
||||
Incorrect order requirement: 0
|
||||
Coordination ambiguity: 0
|
||||
Not requirement: ,0
|
||||
Incomplete condition: 0
|
||||
Incomplete system response: 0
|
||||
Passive voice: 0
|
||||
Not precise verb: 0
|
||||
Number Req with smells: 0
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 100
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
### Final Score
|
||||
Final_score = 100.0
|
||||
@@ -0,0 +1,125 @@
|
||||
|
||||
|
||||
# LLM Experiment Information
|
||||
* Prefix: Role play
|
||||
* Datetime: 03_28_2024__14:28:43
|
||||
* UniqueID: 5dd99ca7-b1a8-4e3c-ac37-0ab900dde58e
|
||||
|
||||
|
||||
|
||||
## Gherkin Input
|
||||
```
|
||||
Given: the exchange rate of "US Dollar" to "British Pound" is 1.30
|
||||
When: UserA wants to edit this exchange rate
|
||||
Then: UserA should see that the source currency is disabled
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
## Input prompt, technique: Role Play
|
||||
|
||||
|
||||
Behave like a person who writes the Controlled Natural Language (CNL) Rimay.
|
||||
Rimay is a language that is defined in different components.
|
||||
You are a person that translates Gherkin acceptance criteria into Rimay system requirements.
|
||||
A person that translates Gherkin in Rimay behaves like the following:
|
||||
|
||||
Gherkin (input):
|
||||
```
|
||||
Given: a verification email has already been sent to "UserA"
|
||||
When: UserA tries to verify his account using the link from this email
|
||||
Then: UserA should be notified that the verification was successful
|
||||
```
|
||||
|
||||
Rimay (output):
|
||||
```
|
||||
While the "verification email" contains a "verification link"
|
||||
When UserA validates "email address" following the "verification link",
|
||||
then SystemA must notify "with verification successful" to UserA.
|
||||
```
|
||||
|
||||
Another example is:
|
||||
|
||||
Gherkin (input):
|
||||
```
|
||||
Given: UserA is editing the address of "Fletcher Ren"
|
||||
When: UserA removes the street
|
||||
Then: UserA should still be on the "Fletcher Ren" address edit page
|
||||
```
|
||||
|
||||
Rimay (output):
|
||||
```
|
||||
While UserA is "editing the adress of Fletcher Ren"
|
||||
When UserA removes "the street",
|
||||
then SystemA must show "the edit address page".
|
||||
```
|
||||
|
||||
Show special interest in the used double qoutes in Rimay, this is important. Keep the same structure as the translated Rimay examples.
|
||||
|
||||
Now I want you to answer as the person who translates Gherkin into Rimay.
|
||||
|
||||
|
||||
|
||||
### Input Data
|
||||
Use the following Gherkin acceptance criteria input:
|
||||
```
|
||||
Given: the exchange rate of "US Dollar" to "British Pound" is 1.30
|
||||
When: UserA wants to edit this exchange rate
|
||||
Then: UserA should see that the source currency is disabled
|
||||
```
|
||||
|
||||
### Question:
|
||||
Can you translate the input above into the specified language Rimay CNL?
|
||||
|
||||
### Output indicator
|
||||
Output only your translated Rimay CNL text and nothing else!
|
||||
|
||||
|
||||
## Rimay Output
|
||||
```
|
||||
While the "exchange rate" of "US Dollar" to "British Pound" is 1.30
|
||||
When UserA wants to "edit this exchange rate",
|
||||
then SystemA must display "the source currency disabled" to UserA.
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Rimay DSL Verification
|
||||
```
|
||||
ERROR:no viable alternative at input '"US Dollar"' (line : 3 column : 7)
|
||||
ERROR:mismatched input '"exchange rate"' expecting RULE_ID (line : 3 column : 11)
|
||||
ERROR:missing EOF at '30' (line : 3 column : 66)
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 61
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
|
||||
## Rimay Paska Verification
|
||||
```
|
||||
File generated_rimay.csv.csv
|
||||
Smells found in this document:
|
||||
Non-atomic requirement: 0
|
||||
Incomplete requirement: 0
|
||||
Incorrect order requirement: 0
|
||||
Coordination ambiguity: 0
|
||||
Not requirement: ,0
|
||||
Incomplete condition: 0
|
||||
Incomplete system response: 0
|
||||
Passive voice: 0
|
||||
Not precise verb: 1
|
||||
Number Req with smells: 1
|
||||
|
||||
```
|
||||
### Score
|
||||
Score: 96
|
||||
Progressbar: 
|
||||
|
||||
|
||||
|
||||
### Final Score
|
||||
Final_score = 78.5
|
||||
+29
-12
@@ -176,25 +176,42 @@ class LLM_role_play(LLM_prompt_technique, LLM_prompt_data) :
|
||||
prompt_method = """
|
||||
Behave like a person who writes the Controlled Natural Language (CNL) Rimay.
|
||||
Rimay is a language that is defined in different components.
|
||||
For now we only highlight the following components:
|
||||
You are a person that translates Gherkin acceptance criteria into Rimay system requirements.
|
||||
A person that translates Gherkin in Rimay behaves like the following:
|
||||
|
||||
Mandatory:
|
||||
Gherkin (input):
|
||||
```
|
||||
Given: a verification email has already been sent to "UserA"
|
||||
When: UserA tries to verify his account using the link from this email
|
||||
Then: UserA should be notified that the verification was successful
|
||||
```
|
||||
|
||||
$ACTOR = SystemA
|
||||
$MODAL_VERB = should, can, could, might, will
|
||||
$SYSTEM_RESPONSE = SYSTEM_RESPONSE_EXPRESSION | RESPONSE_BLOCK_ITEMIZED
|
||||
$SYSTEM_RESPONSE_EXPRESSION: ATOMIC_SYSTEM_RESPONSE ((,|, and|, or|and|or)? ATOMIC_SYSTEM_RESPONSE)* ATOMIC_SYSTEM_RESPONSE: ACTION_PHRASE (every TEXT )? RESPONSE_BLOCK_ITEMIZED: do the following actions (in sequence)? : BULLET ATOMIC_SYSTEM_RESPONSE ((,|, and|, or|and|or)? BULLET ATOMIC_SYSTEM_RESPONSE)*
|
||||
Optional:
|
||||
$WHEN_STRUCTURE : When TRIGGER
|
||||
Rimay (output):
|
||||
```
|
||||
While the "verification email" contains a "verification link"
|
||||
When UserA validates "email address" following the "verification link",
|
||||
then SystemA must notify "with verification successful" to UserA.
|
||||
```
|
||||
|
||||
Use for ACTOR for example SystemA and use for MODAL_VERB for example the following words: should, can, could, might, will
|
||||
Another example is:
|
||||
|
||||
Gherkin (input):
|
||||
```
|
||||
Given: UserA is editing the address of "Fletcher Ren"
|
||||
When: UserA removes the street
|
||||
Then: UserA should still be on the "Fletcher Ren" address edit page
|
||||
```
|
||||
|
||||
$ACTOR, $MODAL_VERB and $SYSTEM_RESPONSE is mandatory in all Rimay requirements.
|
||||
Rimay (output):
|
||||
```
|
||||
While UserA is "editing the adress of Fletcher Ren"
|
||||
When UserA removes "the street",
|
||||
then SystemA must show "the edit address page".
|
||||
```
|
||||
|
||||
Rimay CNL: $WHEN_STRUCTURE $ACTOR $MODAL_VERB $SYSTEM_RESPONSE
|
||||
Show special interest in the used double qoutes in Rimay, this is important. Keep the same structure as the translated Rimay examples.
|
||||
|
||||
Now I want you to answer as the person who writes Rimay to translate this acceptance criteria into Rimay
|
||||
Now I want you to answer as the person who translates Gherkin into Rimay.
|
||||
|
||||
"""
|
||||
super().__init__(input, prompt_method)
|
||||
|
||||
@@ -109,7 +109,13 @@ Progressbar: 
|
||||
numberOfSmells = sum([int(i) for i in numbers])
|
||||
|
||||
return 100 - (numberOfSmells * 2)
|
||||
special_errors = {"Incomplete requirement: 1": 30, "Incomplete system response: 1": 20} #EOF errors are really bad.
|
||||
badErrorScore = 0
|
||||
for error in special_errors:
|
||||
if error in self.final_result:
|
||||
badErrorScore += special_errors[error]
|
||||
|
||||
return 100 - (numberOfSmells * 2) - badErrorScore
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user