Repository navigation
feat(ai): embed search text with EmbeddingGemma 2 - #2118
Merged
Merged
Conversation
Prefer the generic EmbeddingGemma 2 text package through LiteRT-LM, and keep the existing EmbeddingGemma 300M file working when it is already installed. Co-authored-by: Uday Chauhan <chauhan.s.uday26@gmail.com>
Contributor
Plugin Module Size GatePolicy: modules over 3 MB must be delivered as plugins; plugin modules over 5 MB must document cache management.
|
ucguy4u
marked this pull request as ready for review
October 16, 2026 17:49
Contributor
🚀 PR Quick Check Summary
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Semantic search now prefers Google's generic EmbeddingGemma 2 text package (
embeddinggemma-2-text-270m.litertlm, 164,626,432 bytes) through LiteRT-LMEmbeddingEngine. Search prompts use EmbeddingGemma 2's task prefixes, and the engine loads with a 512-token input.The older EmbeddingGemma 300M
.tflitefile and its tokenizer stay in the catalog. If that file is already installed, search keeps using it through the RAG SDK. A new install is asked for EmbeddingGemma 2 and does not need a separate tokenizer.Test Plan
dart analyzeon the embeddings and catalog filesflutter testforembedding_client_test,embedding_service_test, andmodel_catalog_test(34 tests)scripts/check-docs-completeness.sh --base origin/main --head HEADVerification environment: Host-only. The Kotlin
EmbeddingEnginecall was checked against thelitertlm-android0.18.0 API. It was not run on a device.Agent Policy
core_aiand the existing Android LiteRT plugin.Council Review
Media Intelligence Architect: catalog and embedding runtime change
Flutter Architect:
core_aiembedding client and servicePlatform Architect: Android LiteRT plugin methods
I checked the Decision Matrix and listed every required role above.
Every package touched has a
module.yaml.owner/reviewersin any touchedmodule.yamlstill match who actually reviewed this PR.