Skip to content

Commit

Permalink
add constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
andre15silva committed Oct 13, 2023
1 parent 533b365 commit 5a98976
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
12 changes: 12 additions & 0 deletions data/portuguese-wine-pairing/02/assessment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"model":"gpt4",
"data_constraints_can_be_checked": "yes",
"number_of_options_in_the_generators": "15",
"cultural_alignment": "5",
"cultural_alignment_quantitative": "15/15",
"executes": "yes",
"execute_error": "",
"contains_true_generator":"yes",
"comments":"Good! White wine for fish, red wine for meat :)"
}

20 changes: 20 additions & 0 deletions data/portuguese-wine-pairing/02/execution-result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
irb(main):134:0> PortuguesePairingGenerator.generate
Pair the Vinho Verde wine with Bacalhau a bras.
=> nil
irb(main):135:0> PortuguesePairingGenerator.generate
Pair the Alvarinho wine with Bacalhau a bras.
=> nil
irb(main):136:0> PortuguesePairingGenerator.generate
Pair the Vinho Verde wine with Bacalhau a bras.
=> nil
irb(main):137:0> PortuguesePairingGenerator.generate
Pair the Porto wine with Arroz de Pato.
=> nil
irb(main):138:0> PortuguesePairingGenerator.generate
Pair the Alvarinho wine with Sardinhas assadas.
=> nil
irb(main):139:0> PortuguesePairingGenerator.generate
Pair the Alvarinho wine with Sardinhas assadas.
=> nil
irb(main):140:0> PortuguesePairingGenerator.generate
Pair the Vinho Alentejo wine with Francesinha.
44 changes: 44 additions & 0 deletions data/portuguese-wine-pairing/02/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
First, you need to install the faker gem if you haven't yet. You can do this by running `gem install faker` in your terminal.

After that, here's a basic script that generates wine and food pairings for Portuguese cuisine:

```ruby
require 'faker'

class PortuguesePairingGenerator
PORTUGUESE_WINES = {
'Vinho Verde' => :white,
'Alvarinho' => :white,
'Vinho Alentejo' => :red,
'Porto' => :red,
'Madeira' => [:red, :white]
}

PORTUGUESE_FOODS = {
'Bacalhau a bras' => :fish,
'Caldo verde' => :vegetable,
'Francesinha' => :meat,
'Arroz de Pato' => :meat,
'Sardinhas assadas' => :fish
}

def self.generate
wine, type = PORTUGUESE_WINES.to_a.sample
food, food_type = PORTUGUESE_FOODS.to_a.sample

# Pair white wine with fish and red wine with meat
if (type == :white && food_type == :fish) || (type == :red && food_type == :meat)
puts "Pair the #{wine} wine with #{food}."
else
generate
end
end
end

# Generate a pairing
PortuguesePairingGenerator.generate
```

This script defines a class `PortuguesePairingGenerator` with a class method `generate` that generates a wine and food pairing. The pairing is done according to the type of the wine and the food. White wines are paired with fish dishes and red wines are paired with meat dishes.

Please note that the wine and food pairings in this script are simplified and may not accurately represent the complexity of Portuguese cuisine and wine pairing rules.
10 changes: 10 additions & 0 deletions data/portuguese-wine-pairing/02/prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
System
You are an helpful coding assistant.
The user will ask you to write a custom test data generator in Ruby using the ruby-faker library.
Do not simply reuse the existing ruby-faker libraries that generate data.
You must include original data that is culturally meaningful.

User
Please create a custom test data generator that generates wine-pairings between Portuguese wines and Portuguese foods.

You must follow the wine-pairing constraints to be realistic. You must specify the region and the type of wine. You must also specify the type of food.

0 comments on commit 5a98976

Please sign in to comment.