Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(traces): graphql query for document evaluation summary #1874

Merged
merged 8 commits into from
Dec 7, 2023

Conversation

RogerHYang
Copy link
Contributor

@RogerHYang RogerHYang commented Dec 6, 2023

resolves #1875

Metrics

  1. Average NDCG
  2. Average Precision
  3. Mean Reciprocal Rank
  4. Hit Rate
Screenshot 2023-12-05 at 5 34 26 PM

Comment on lines 327 to 332
# Update number of documents
num_documents = len(span.retrieval.documents)
if existing_span:
num_documents -= len(existing_span.retrieval.documents)
if num_documents:
self._num_documents[span_id] += num_documents
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help understand this update logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's just the difference, but i was too lazy to create a new variable. my bad

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think i can call it num_documents_update instead of num_documents, and that should do it

@RogerHYang RogerHYang merged commit 8a6a063 into main Dec 7, 2023
10 checks passed
@RogerHYang RogerHYang deleted the document-evaluation-summary branch December 7, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[traces] server-side aggregation of document eval metrics (average precision, hit rate, etc.)
2 participants