[langchain]: The batch method of GoogleGenerativeAIEmbeddings should only returns one vector for "gemini-embedding-2-preview"
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- python
- Domain
- documentation
Research direction
Start with the Batch section of the GoogleGenerativeAIEmbeddings integration documentation and compare its example with the linked Google GenAI embedding aggregation note. Verify the displayed result for gemini-embedding-2-preview and update the documentation so the example accurately describes the returned vectors.
Written by the indexing model from the issue text.
Description
Type of issue
issue / bug
Language
Python
Description
The embed_documents method of GoogleGenerativeAIEmbeddings only returns one vector for multiple inputs when using the model "gemini-embedding-2-preview".
In the Batch section of the GoogleGenerativeAIEmbeddings integration documentation.
The following Python code should print 1, but not 3:
embeddings = GoogleGenerativeAIEmbeddings(model="gemini-embedding-2-preview")
vectors = embeddings.embed_documents(
[
"Today is Monday",
"Today is Tuesday",
"Today is April Fools day",
]
)
print(len(vectors))
This note can be found at Embeddings of Google GenAI SDK:
"Note: Gemini Embedding 2 creates an aggregated embedding for multiple inputs. See Embedding aggregation for more details."
- Dominant language
- MDX
- Stars
- 418
- Forks
- 2.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 351
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from langchain-ai/docs
-
external langgraph
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langchain-ai/docs#6121 ·
-
external
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
langchain-ai/docs#6113 · 1 comment ·
-
external
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
langchain-ai/docs#6101 ·
-
external integration integration-submission
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
langchain-ai/docs#6096 ·
-
[langchain]: Update the AgentCore Runtime section on the AWS provider page for the new AgentCore CLI Openexternal
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langchain-ai/docs#6091 ·
All issues in langchain-ai/docs
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Opencategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficulty 1/5 Under an hour Newbie friendliness 84/100