ubiquity-os-marketplace / text-conversation-rewards

1 stars 27 forks source link

Scoring Algorithm Verbosity Update #94

Closed 0x4007 closed 2 months ago

0x4007 commented 3 months ago

Goal

Task

Quantitative Scoring:

obeys commented 3 months ago

/start

ubiquity-os[bot] commented 3 months ago
DeadlineSat, Aug 31, 6:32 AM UTC
Registered Wallet 0x31BcF24D34F018B3Aee4c6E97307221aFe47bc96
Tips:
<ul>
<li>Use <code>/wallet 0x0000...0000</code> if you want to update your registered payment wallet address.</li>
<li>Be sure to open a draft pull request as soon as possible to communicate updates on your progress.</li>
<li>Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.</li>
<ul>
obeys commented 3 months ago

Just for clarification, would the math be something like this?

const wordCountFactor = new Decimal(wordCount).pow(this._wordCountExponent);

const totalFormattingReward = formattingTotal.mul(wordCountFactor);
comment.score = {
  ...comment.score,
  formatting: {
    content: formatting,
    multiplier: multiplierFactor.multiplier,
  },
  reward: (comment.score?.reward ? totalFormattingReward.add(comment.score.reward) : totalFormattingReward).toNumber(),
};

I'm not sure if you want to include the comment score to the math or have it added separately at the end like it's doing already

Also for the diminishing returns I think we would need some sort of word limit as a "peak" for the before starting to decrease the reward if I'm not wrong.

0x4007 commented 3 months ago

It's an exponent not multiplier

ubiquity-os[bot] commented 2 months ago

[ 75 WXDAI ]

@cohow
Contributions Overview
View Contribution Count Reward
Issue Task 1 75
Issue Comment 1 0
Review Comment 11 0
Conversation Incentives
Comment Formatting Relevance Reward
Just for clarification, would the math be something like this? …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 59
        multiplier: 0
    score: 1
  pre:
    symbols:
      \b\w+\b:
        count: 34
        multiplier: 0
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 34
        multiplier: 0
    score: 1
multiplier: 0
0.8 -
Resolves #94 <!-- - You must link the issue number e.g. "Re…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0
    score: 1
  ul:
    symbols:
      \b\w+\b:
        count: 147
        multiplier: 0
    score: 1
  li:
    symbols:
      \b\w+\b:
        count: 137
        multiplier: 0
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0
    score: 1
  img:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0
    score: 0
multiplier: 0
0.9 -
you're right. I just pushed a fix to remove that and also fixed …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 22
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
I was looking at the tests and it seems like the problem is comi…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 56
        multiplier: 0.2
    score: 1
  img:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.2
    score: 0
multiplier: 0
1 -
I believe these changes should fix all the issues with the mock …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 87
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
bignumber to handle the rounding or cutting off decimals? right …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 30
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
if I'm not wrong the last checks tests depend on https://github.…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 35
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
The last tests failed due issues with permit generation, which i…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 33
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Ok that does make sense considering mock results are pre made.. …
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 42
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
ok I'm really shocked how many attempts this took for me to fix,…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 27
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Seems like the permit URLs have changed, i’ll get a fix out asap.
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 14
        multiplier: 0.2
    score: 1
multiplier: 0
1 -
Quite lost on why I keep getting 2 different test results betwee…
0
content:
  p:
    symbols:
      \b\w+\b:
        count: 55
        multiplier: 0.2
    score: 1
  pre:
    symbols:
      \b\w+\b:
        count: 8
        multiplier: 0.2
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 8
        multiplier: 0.2
    score: 1
multiplier: 0
1 -

[ 16.756 WXDAI ]

@0x4007
Contributions Overview
View Contribution Count Reward
Issue Specification 1 5.3
Issue Comment 1 0.736
Review Comment 6 10.72
Conversation Incentives
Comment Formatting Relevance Reward
### **Goal** - Prevent verbosity from being overly rewarded. #…
5.3
content:
  h3:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 1
  strong:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.1
    score: 0
  ul:
    symbols:
      \b\w+\b:
        count: 28
        multiplier: 0.1
    score: 0
  li:
    symbols:
      \b\w+\b:
        count: 8
        multiplier: 0.1
    score: 1
  p:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 1
  br:
    symbols:
      \b\w+\b:
        count: 1
        multiplier: 0.1
    score: 0
  code:
    symbols:
      \b\w+\b:
        count: 2
        multiplier: 0.1
    score: 5
multiplier: 3
1 5.3
It's an exponent not multiplier
0.92
content:
  p:
    symbols:
      \b\w+\b:
        count: 6
        multiplier: 0.2
    score: 1
multiplier: 1
0.8 0.736
I'm not quite sure but I feel like word count specifically makes…
1.06
content:
  p:
    symbols:
      \b\w+\b:
        count: 16
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.06
I had a proposal for "segments" which would serve as aliases for…
4.15
content:
  p:
    symbols:
      \b\w+\b:
        count: 80
        multiplier: 0.1
    score: 1
multiplier: 1
1 4.15
Use a numbers library like bignumber to handle this.
0.65
content:
  p:
    symbols:
      \b\w+\b:
        count: 9
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.65
Sure use decimal for all calculations.
0.46
content:
  p:
    symbols:
      \b\w+\b:
        count: 6
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.46
Not sure if its easy to tell to be honest. How is somebody expec…
2.3
content:
  p:
    symbols:
      \b\w+\b:
        count: 40
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.3
I dont think its something people will notice. We can add if its…
2.1
content:
  p:
    symbols:
      \b\w+\b:
        count: 36
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.1

[ 20.55 WXDAI ]

@gentlementlegen
Contributions Overview
View Contribution Count Reward
Review Comment 10 20.55
Conversation Incentives
Comment Formatting Relevance Reward
If the display is fine as it is then I am good with the code cha…
1.06
content:
  p:
    symbols:
      \b\w+\b:
        count: 16
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.06
Maybe this should not be here since you seem to use it after cal…
1.65
content:
  p:
    symbols:
      \b\w+\b:
        count: 27
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.65
@cohow Thank you for the PR. I am fine with the changes, please …
1.7
content:
  p:
    symbols:
      \b\w+\b:
        count: 28
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.7
@cohow When I want to update them I copy paste the diff of the p…
2.78
content:
  p:
    symbols:
      \b\w+\b:
        count: 50
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.78
@cohow You mean that your pull-request test fixes depend on anot…
0.94
content:
  p:
    symbols:
      \b\w+\b:
        count: 14
        multiplier: 0.1
    score: 1
multiplier: 1
1 0.94
After checking the logs, it seems that everything works as expec…
3.2
content:
  p:
    symbols:
      \b\w+\b:
        count: 59
        multiplier: 0.1
    score: 1
multiplier: 1
1 3.2
@cohow Seems that the tests are still failing. I would advise ru…
1.8
content:
  p:
    symbols:
      \b\w+\b:
        count: 30
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.8
This is probably because you are using your own credentials so t…
2.83
content:
  p:
    symbols:
      \b\w+\b:
        count: 51
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.83
@cohow Fixed the tests for you. also, seems to work, here is my …
2.69
content:
  p:
    symbols:
      \b\w+\b:
        count: 48
        multiplier: 0.1
    score: 1
multiplier: 1
1 2.69
Maybe something very simple like adding `coeff: 0.85` in…
1.9
content:
  p:
    symbols:
      \b\w+\b:
        count: 27
        multiplier: 0.1
    score: 1
  code:
    symbols:
      \b\w+\b:
        count: 3
        multiplier: 0.1
    score: 1
multiplier: 1
1 1.9

[ 1.45 WXDAI ]

@whilefoo
Contributions Overview
View Contribution Count Reward
Review Comment 3 1.45
Conversation Incentives
Comment Formatting Relevance Reward
word count exponent is being applied to all symbols, either we l…
0.48
content:
  p:
    symbols:
      \b\w+\b:
        count: 32
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.48
The problem is that config doesn't define word multiplier anymor…
0.61
content:
  p:
    symbols:
      \b\w+\b:
        count: 43
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.61
I agree with having segments as aliases, we can keep regexes but…
0.36
content:
  p:
    symbols:
      \b\w+\b:
        count: 23
        multiplier: 0.1
    score: 1
multiplier: 0.25
1 0.36