adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Eval fails for non-English languages

Open lifnaja opened this issue 1 year ago • 14 comments

Describe the bug When evaluating text in other languages (e.g., Thai, etc.), the eval logic incorrectly returns mismatches (Match score: 0)— even when the evaluated expression should be valid or identical in meaning.

To Reproduce

root_agent = Agent(
    name="sample_agent",
    model="gemini-2.5-flash",
    description="Greeting agent",
    instruction="""
    You are an assistant that will reply to the user with only the word 'สวัสดี'
    """,
)

Expected behavior Eval should correctly handle input in other languages.

Screenshots

Image

Desktop (please complete the following information):

  • OS: macOS
  • Python : 3.12.8
  • ADK version: 1.15.1

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used : gemini-2.5-flash

Additional context Add any other context about the problem here.

lifnaja avatar Oct 08 '25 08:10 lifnaja

Convert this to a feature request for more language support.

hangfei avatar Nov 04 '25 04:11 hangfei

I've submitted a PR to fix this issue: #3503

The fix enhances the FinalResponseMatchV2Evaluator prompt to explicitly instruct the LLM judge to handle non-English languages including Thai, Chinese, Japanese, Korean, Arabic, and other non-Latin scripts.

Changes:

  • Added clear i18n guidance to the evaluation prompt
  • Instructed the evaluator to treat identical strings in ANY language as valid
  • Added recognition for language-specific punctuation (。vs ., ؟ vs ?, etc.)

This also addresses #3162 (Chinese string evaluation issue) with the same fix.

Testing can be done by reproducing the original Thai "สวัสดี" test case - it should now return score=1.0 instead of score=0.0.

G26karthik avatar Nov 12 '25 00:11 G26karthik

I wrote the same issue https://github.com/google/adk-python/issues/4122 and maru0804-san proposed https://github.com/google/adk-python/pull/4143

ftnext avatar Jan 14 '26 23:01 ftnext

Put together a fix in https://github.com/google/adk-python/pull/6401.

guptaishaan avatar Jul 15 '26 21:07 guptaishaan

Put together a fix in https://github.com/google/adk-python/pull/6441.

Yashas1600 avatar Jul 22 '26 06:07 Yashas1600

Opened https://github.com/google/adk-python/pull/6443 with a fix for this.

guptaishaan avatar Jul 22 '26 07:07 guptaishaan

Put together a fix in https://github.com/google/adk-python/pull/6444.

guptaishaan avatar Jul 22 '26 07:07 guptaishaan

Put together a fix in https://github.com/google/adk-python/pull/6446.

guptaishaan avatar Jul 22 '26 09:07 guptaishaan

PR up at https://github.com/google/adk-python/pull/6456.

guptaishaan avatar Jul 23 '26 09:07 guptaishaan

Took a look, https://github.com/google/adk-python/pull/6463 should address it.

guptaishaan avatar Jul 24 '26 09:07 guptaishaan

Put together a fix in https://github.com/google/adk-python/pull/6476.

guptaishaan avatar Jul 25 '26 09:07 guptaishaan

Put together a fix in https://github.com/google/adk-python/pull/6483.

guptaishaan avatar Jul 26 '26 09:07 guptaishaan

@guptaishaan It looks like the maintainers(@i-yliu) have decided to consolidate the fix in #6292, and several alternative PRs have already been closed in its favor. To avoid further duplication, it would be best to focus follow-up work and review on #6292.

ftnext avatar Jul 26 '26 15:07 ftnext

Took a look, https://github.com/google/adk-python/pull/6494 should address it.

guptaishaan avatar Jul 27 '26 09:07 guptaishaan