Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

docs(dspy): correct precision_score docstring example value (#10681)

Sujit Nirmal319aed593089
diff --git a/dspy/evaluate/metrics.py b/dspy/evaluate/metrics.py
index 882fb3231..e7f7b0d39 100644
--- a/dspy/evaluate/metrics.py
+++ b/dspy/evaluate/metrics.py
@@ -234,7 +234,7 @@ def precision_score(prediction, ground_truth):
Examples:
```python
- precision_score("eiffel tower in paris", "eiffel tower") # 0.67
+ precision_score("eiffel tower in paris", "eiffel tower") # 0.5
```
"""
prediction_tokens = normalize_text(prediction).split()