Skip to content

Conversation

@tysoncung
Copy link
Contributor

Summary

Fixes #2404

The formula for recall was incorrectly labeled as "Precision" in the SQL metrics documentation.

Changes

  • Fixed line 20 in
  • Changed label from "Precision" to "Recall" for the formula using reference rows as denominator

Explanation

The two formulas represent different metrics:

Precision (line 16):

  • Numerator: Number of matching rows
  • Denominator: Total rows in response
  • Measures: "Of all rows we returned, how many were correct?"

Recall (line 20):

  • Numerator: Number of matching rows
  • Denominator: Total rows in reference
  • Measures: "Of all correct rows, how many did we return?"

The formula on line 20 was mislabeled as Precision but is actually the Recall formula.

Testing

  • Verified formula definitions match standard precision/recall definitions
  • Confirmed the fix aligns with the explanation in line 23 about F1 score being the harmonic mean of precision and recall

The formula on line 20 was incorrectly labeled as 'Precision' when it actually
represents the Recall formula (denominator uses 'Total number of rows in reference').

Precision uses rows in response as denominator (line 16).
Recall uses rows in reference as denominator (line 20).

Fixes vibrantlabsai#2404
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Nov 6, 2025
@anistark anistark merged commit ba8a1cc into vibrantlabsai:main Nov 6, 2025
6 checks passed
anistark pushed a commit that referenced this pull request Nov 17, 2025
## Summary

Fixes #2404 

The formula for recall was incorrectly labeled as "Precision" in the SQL
metrics documentation.

## Changes

- Fixed line 20 in 
- Changed label from "Precision" to "Recall" for the formula using
reference rows as denominator

## Explanation

The two formulas represent different metrics:

**Precision** (line 16):
- Numerator: Number of matching rows
- **Denominator: Total rows in response**
- Measures: "Of all rows we returned, how many were correct?"

**Recall** (line 20):
- Numerator: Number of matching rows  
- **Denominator: Total rows in reference**
- Measures: "Of all correct rows, how many did we return?"

The formula on line 20 was mislabeled as Precision but is actually the
Recall formula.

## Testing

- Verified formula definitions match standard precision/recall
definitions
- Confirmed the fix aligns with the explanation in line 23 about F1
score being the harmonic mean of precision and recall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The formula for recall was mistakenly described as the formula for precision.

2 participants