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

Add Response Latency Metric #108

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

NastyRunner13
Copy link
Contributor

Description

This PR implements the response latency metric, which measures the time taken to complete LLM and tool calls. It provides insights into the efficiency and performance of response generation within the system.

Related Issue

None (new feature implementation).

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

  • Created unit tests using pytest to validate the calculation of response latency metrics with different scenarios, including valid data, partial data, and edge cases.
  • Tested manually with sample trace JSON to ensure the metric accurately calculates average latency, median latency, and other statistical measures.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Additional Context

The response latency metric includes detailed statistics such as average latency, minimum latency, maximum latency, median latency, P90 latency, and standard deviation. This helps identify areas for optimization in LLM and tool call performance.

Impact on Roadmap

This PR aligns with the project roadmap by enhancing the system's monitoring capabilities and providing valuable performance metrics for further optimization.

@vijayc9 vijayc9 changed the base branch from hackathon to v1.2 January 16, 2025 06:55
@vijayc9 vijayc9 merged commit 0b6c737 into raga-ai-hub:v1.2 Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants