-
Notifications
You must be signed in to change notification settings - Fork 13
docs: add Langfuse integration documentation #29
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
Conversation
Summary of ChangesHello @helloml0326, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces new documentation that serves as a detailed tutorial for integrating OpenJudge with Langfuse. It aims to empower users to set up robust external evaluation pipelines for their LLM applications, offering enhanced flexibility and a wide array of grading dimensions. The guide covers the entire workflow from data retrieval to result submission, ensuring a seamless experience for automated quality assessment. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds comprehensive documentation for integrating OpenJudge with Langfuse. The new documentation page is well-structured and provides detailed code examples for fetching traces, running evaluations, and sending scores back to Langfuse. I've identified a couple of issues in the code examples that would prevent them from running correctly or cause confusion, along with suggestions for fixes. Overall, this is a great addition to the documentation.
| for trace in response.data: | ||
| if trace.input and trace.output: | ||
| result.append({ | ||
| "id": trace.id, | ||
| "input": trace.input, | ||
| "output": trace.output, | ||
| "metadata": trace.metadata or {}, | ||
| }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fetch_recent_traces function is missing the logic to extract the expected output from the trace metadata. This is inconsistent with the fetch_traces_for_evaluation function and might cause issues later in the batch_evaluate_traces example, which relies on the expected field. To improve consistency and ensure the example works as intended, I suggest adding this logic.
| for trace in response.data: | |
| if trace.input and trace.output: | |
| result.append({ | |
| "id": trace.id, | |
| "input": trace.input, | |
| "output": trace.output, | |
| "metadata": trace.metadata or {}, | |
| }) | |
| for trace in response.data: | |
| if trace.input and trace.output: | |
| trace_dict = { | |
| "id": trace.id, | |
| "input": trace.input, | |
| "output": trace.output, | |
| "metadata": trace.metadata or {}, | |
| } | |
| # Add expected output if available in metadata | |
| if trace.metadata and "expected" in trace.metadata: | |
| trace_dict["expected"] = trace.metadata["expected"] | |
| result.append(trace_dict) |
| from openjudge.models import OpenAIChatModel | ||
| from openjudge.graders.common.relevance import RelevanceGrader | ||
| from openjudge.graders.common.harmfulness import HarmfulnessGrader | ||
| from openjudge.graders.text.similarity import SimilarityGrader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.