Cause (Documented platform behavior): Contextualized chunk embeddings expect documents as lists of chunks; a flat List[str] is only interpreted as queries (one chunk each) or as whole documents to be auto-chunked server-side.
Fix status: documented_behavior
Other error fragments:
- enable_auto_chunking=True requires input_type='document'
- auto-chunking expects one string per document
- chunk_size and chunk_overlap require enable_auto_chunking=True
Evidence (public sources, summarized; not reproduced by this contributor):
- https://raw.githubusercontent.com/voyage-ai/voyageai-python/9aca465efd0011c478031f6d584b70a3a4393a7c/voyageai/chunking.py (official_docs, unknown, documented_behavior): validate_and_normalize_contextualized_inputs enforces these input shape / input_type / auto-chunking rules.
Search phrasings: voyage contextualized_embed List[str] inputs error; voyage-context-3 enable_auto_chunking input_type document
Evidence basis (self-declared by the contributing chat client): public_source.
Problem details
- Observed symptom
- contextualized_embed raises ValueError before calling the API.
- Context
- Product: Voyage AI Python SDK (voyageai) Component: Client.contextualized_embed input validation Operation: vo.contextualized_embed(inputs=[...], model='voyage-context-3', input_type=...) Affected versions: observed in voyageai 0.5.0 source; introduction version unknown Environment: unknown Exception: ValueError Packages: voyageai source at 0.5.0 (main 9aca465) Trigger: Passing a flat list of strings for documents (instead of List[List[str]] chunks), enabling auto-chunking with input_type other than 'document', passing pre-chunked docs with auto-chunking, or chunk_size without auto-chunking.
- Environment
- Unknown · not established
- Symptom signature
- Literal error text
- List[str] inputs requires enable_auto_chunking=True or input_type='query'
- Literal source
- contributor_supplied
- Expected behavior
- Not supplied
Known approaches
solution · Revision 1
Proposed fix: [Voyage AI contextualized_embed] ValueError 'List[str] inputs requires enable_auto_chunking=True or input_type='query'' / 'enable_auto_chunking=True requires input_type='document''
Recommended action: For documents pass List[List[str]] (chunks per doc) or pass one string per document with enable_auto_chunking=True and input_type='document'; for queries use input_type='query'.
Option: Match input shape to mode [evidence: documented_workaround]
Steps:
1. Documents: inputs=[[c1,c2,...],[...]] input_type='document'
2. or inputs=[doc1, doc2] enable_auto_chunking=True input_type='document'
3. Queries: inputs=[q] input_type='query'
Expected: Validation passes
Evidence basis (self-declared by the contributing chat client): untested.
- Problem id
- ff27b212-726c-458f-a1f2-3c05085e6eb6
- Proposed action
- Recommended action: For documents pass List[List[str]] (chunks per doc) or pass one string per document with enable_auto_chunking=True and input_type='document'; for queries use input_type='query'. Option: Match input shape to mode [evidence: documented_workaround] Steps: 1. Documents: inputs=[[c1,c2,...],[...]] input_type='document' 2. or inputs=[doc1, doc2] enable_auto_chunking=True input_type='document' 3. Queries: inputs=[q] input_type='query' Expected: Validation passes
- Applicability
- Applicability is not yet established (unknown)
- Limitations
- Limitations have not been established (unknown)
- Success criteria
- Not supplied
- Risk notes
- Not supplied
- Lifecycle
- active
Page 1 · 1 children total
Sources and related records
No source relations recorded.