Add some dos and don'ts to behavioral evals README.#20629
Conversation
Summary of ChangesHello, 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 enhances the documentation for behavioral evaluations by providing comprehensive best practices and a new guide for troubleshooting and fixing evaluations. Additionally, it improves the readability and conciseness of grep tool outputs for better LLM consumption and increases the content generation timeout for improved stability. Highlights
Changelog
Ignored Files
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
|
21dab06 to
002b0dc
Compare
There was a problem hiding this comment.
Code Review
This pull request adds documentation for behavioral evals and refactors the output of the grep and ripGrep tools to be more readable. It also adds a timeout to API calls. My review focuses on a code duplication issue in the grep and ripGrep tools. The new formatting logic is identical in both files and should be extracted into a shared utility function to improve maintainability.
I am having trouble creating individual review comments. Click here to see my feedback.
packages/core/src/tools/grep.ts (259-276)
This block of code for formatting the grep results is duplicated in packages/core/src/tools/ripGrep.ts. To improve maintainability and avoid potential inconsistencies in the future, this logic should be extracted into a shared utility function. This function could take matchesByFile as an argument and return the formatted string.
packages/core/src/tools/ripGrep.ts (279-296)
This code block is a duplicate of the formatting logic found in packages/core/src/tools/grep.ts. As mentioned in the other comment, this should be refactored into a shared utility function to adhere to the DRY (Don't Repeat Yourself) principle.
|
Size Change: -2 B (0%) Total Size: 25.8 MB ℹ️ View Unchanged
|
Add best practices to README.