Skip to content

Commit

Permalink
Fix is_invalid edge-case (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii authored Nov 4, 2024
1 parent 8a461ca commit 5d64af7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prediction_market_agent_tooling/tools/is_invalid.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
- Which could give an incentive only to specific participants to commit an immoral violent action, but are in practice unlikely.
- Valid: Will the US be engaged in a military conflict with a UN member state in 2021? (It’s unlikely for the US to declare war in order to win a bet on this market).
- Valid: Will Derek Chauvin go to jail for the murder of George Flyod? (It’s unlikely that the jurors would collude to make a wrong verdict in order to win this market).
- Questions with relative dates will resolve as invalid. Dates must be stated in absolute terms, not relative depending on the current time.
- Questions with relative dates will resolve as invalid. Dates must be stated in absolute terms, not relative depending on the current time. But they can be relative to the event specified in the question itself.
- Invalid: Who will be the president of the United States in 6 months? ("in 6 months depends on the current time").
- Invalid: In the next 14 days, will Gnosis Chain gain another 1M users? ("in the next 14 days depends on the current time").
- Valid: Will GNO price go up 10 days after Gnosis Pay cashback program is annouced? ("10 days after" is relative to the event in the question, so we can determine absolute value).
- Questions about moral values and not facts will be resolved as invalid.
- Invalid: "Is it ethical to eat meat?".
Expand Down
4 changes: 4 additions & 0 deletions tests/tools/test_is_invalid.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
"In the next 12 months will an AI-generated song break into the Billboard Hot 100 top 10 or the Spotify Top Hits?",
True, # Invalid because it's relative timing that depends on "now".
),
(
"Will Trump’s polling averages go down by 1% two weeks after The Apprentice is released?",
False, # Valid, because absolute time can be determined based on The Apprentice release.
),
],
)
def test_is_invalid(question: str, invalid: bool) -> None:
Expand Down

0 comments on commit 5d64af7

Please sign in to comment.