Skip to content

Conversation

@Kylie-dot-s
Copy link
Contributor

No description provided.

Kylie-dot-s and others added 3 commits December 17, 2025 17:58
…bute names

Changes:
- Replace hardcoded API keys with environment variables in examples
- Fix incorrect attribute references (eval_status -> status, error_status -> status)
- Fix llm_text_3h.py: cls.prompt.content -> cls.prompt
- Update documentation to use correct EvalDetail attributes
- Standardize environment variable usage across all examples

Files updated:
- docs: artimuse, ats_resume_guide, document_ocr, factcheck_guide, hallucination_guide, etc.
- examples: 3h, ats_resume, hallucination, factcheck, rag, and others
Replace hardcoded 'sk-5b3e85f25d214c3b9c79ea62eab41e35' API key with
environment variables in all example files:

- examples/ats_resume/sdk_resume_optimizer.py
- examples/document_parser/document_parsing_quality_ocr.py
- examples/factcheck/dataset_factcheck_evaluation.py
- examples/llm_and_rule/llm_and_rule_mix.py
- examples/llm_and_rule/llm_remote.py
- examples/llm_and_rule/only_llm.py
- examples/long_video/llm_generate_qa.py
- examples/meta_rater/sdk_meta_rater_evaluation.py
- examples/rag/sdk_rag_eval.py
- examples/register/sdk_register_llm.py
- examples/security/text_security_politics.py

All files now use os.getenv() to read:
- OPENAI_API_KEY for API key
- OPENAI_BASE_URL for API URL
- OPENAI_MODEL for model name
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Kylie-dot-s, 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 undertakes a significant cleanup and refactoring effort, primarily standardizing the evaluation result object to EvalDetail across the codebase. This change impacts both the core evaluation logic and its documentation, ensuring a consistent interface for all evaluation results. Furthermore, LLM configurations in example scripts have been externalized to environment variables, enhancing security and ease of use. These changes aim to improve the maintainability, clarity, and user experience of the evaluation framework.

Highlights

  • Standardized Evaluation Result Object: The primary change involves refactoring the evaluation result object from ModelRes to EvalDetail across numerous documentation files and example scripts. This standardizes the structure for evaluation outcomes, making them more consistent and easier to interpret.
  • Improved LLM Configuration in Examples: All example scripts that interact with Large Language Models (LLMs) have been updated to retrieve API keys, URLs, and model names from environment variables. This enhances security by avoiding hardcoded credentials and improves flexibility for users to configure their LLM providers.
  • Dynamic Quality Name Derivation: The LLMText3H model now dynamically derives quality dimension names from either the prompt's class name or the model's class name. This makes the system more robust to different prompt configurations and ensures accurate labeling of evaluation results.
  • Documentation Enhancements: Several documentation files have been updated to reflect the new EvalDetail object structure, including changes to return types, field descriptions, and example code snippets. Specific improvements include adding core features and synonym maps to the ATS resume guide, and clarifying output access for the LLMResumeOptimizer.
  • Streamlined Prompt Handling: The LLMText3H model's build_messages method has been made more flexible to handle cls.prompt as either a direct string or an object with a content attribute, simplifying prompt integration. Additionally, some prompt files were removed from the directory structure, indicating they are now embedded within their respective evaluators.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 provides a great cleanup of documentation and examples, primarily to align with the new EvalDetail return type and to improve configuration handling in examples by using environment variables. The changes are well-executed and improve the codebase.

I have a few suggestions to further enhance consistency and maintainability:

  • Simplifying some logic in llm_text_3h.py and removing magic numbers.
  • Standardizing environment variable names for API keys across all example files.
  • Making file path handling in examples more robust.

- Simplify quality_name extraction in llm_text_3h.py by using class name directly
- Replace ../../ relative paths with PROJECT_ROOT pattern in all examples
- Use Path(__file__).parent.parent.parent for consistent project root detection
@shijinpjlab shijinpjlab merged commit 8bf0093 into MigoXLab:dev Dec 23, 2025
2 checks passed
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.

3 participants