document-modeling
Model multimodal data with DocArray BaseDoc schemas, predefined documents, DocList, DocVec, nested fields, and typed tensors.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- document-modeling
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Model multimodal data with DocArray BaseDoc schemas, predefined documents, DocList, DocVec, nested fields, and typed tensors.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/api-reference.md11.2 KB
- 参考文档references/troubleshooting.md7.8 KB
- 参考文档references/workflows.md8.3 KB
03 SKILL.md 正文
DocArray document modeling
Use this sub-skill when a task needs to define, validate, or batch multimodal DocArray data models.
Route here for
- Designing
BaseDocschemas for text, image, audio, video, embeddings, metadata, and nested multimodal payloads. - Choosing predefined document classes such as
TextDocandImageDocversus customBaseDocsubclasses. - Creating dynamic document classes with
create_doc()orcreate_doc_from_dict(). - Choosing
DocListversusDocVecfor streaming, reranking, shuffling, or contiguous ML batch processing. - Modeling nested documents, nested
DocListfields, optional fields, and shape-checkedNdArraytensor fields. - Handling optional Torch, TensorFlow, or JAX tensor type boundaries without claiming those optional backends are verified.
Route elsewhere
- Serialization protocols, protobuf/JSON/bytes/CSV/DataFrame round-trips, file stores, S3, or FastAPI response payloads: use sibling
serialization-storage. - Vector indexes, nearest-neighbor search, document indexes, or external vector database backends: use sibling
vector-indexing.
Read these bundled references
- Start with API reference for verified imports, constructor signatures, core class behavior, and the modeling decision table.
- Use Workflows for task recipes and copyable examples.
- Use Troubleshooting when validation, Pydantic config,
DocList,DocVec, NumPy, or optional tensor backends fail.
Safe bundled helper
Run schema_smoke.py in an environment where DocArray is installed to confirm the main schema, dynamic document, DocList, typed tensor, and optional DocVec paths:
Run these commands from this sub-skill root (the directory containing this SKILL.md):
python scripts/schema_smoke.py --help
python scripts/schema_smoke.py
python scripts/schema_smoke.py --skip-docvec
The verified minimum scope is CPU with DocArray base plus proto, pandas, and web extras. Optional services and tensor frameworks are documented as boundaries, not verified defaults.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.