一键导入
ai-integration
AI and LLM integration for IterableData. Use when working with iterable.ai, autodoc, LLM providers, catalog, or agent-facing APIs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
AI and LLM integration for IterableData. Use when working with iterable.ai, autodoc, LLM providers, catalog, or agent-facing APIs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Guide for implementing new data formats in IterableData. Use when adding support for new file formats, compression codecs, or extending format capabilities.
Guide for implementing database engines in IterableData. Use when adding support for new SQL or NoSQL databases, implementing DBDriver classes, or extending database capabilities.
Core development workflows, patterns, and conventions for IterableData. Use when implementing features, fixing bugs, or working with the codebase structure.
OpenSpec proposal creation, validation, and implementation workflows. Use when creating change proposals, implementing specs, or working with OpenSpec conventions.
Testing conventions, patterns, and best practices for IterableData. Use when writing tests, debugging test failures, or establishing test coverage.
基于 SOC 职业分类
| name | ai-integration |
| description | AI and LLM integration for IterableData. Use when working with iterable.ai, autodoc, LLM providers, catalog, or agent-facing APIs. |
from iterable.ai import doc
from iterable.ai.context import sample_for_llm, redact_for_llm
from iterable.catalog import describe_format, export_catalog, list_formats
from iterable.ops import inspect
# Local provider (no API key)
doc.generate("data.csv", provider="lmstudio", base_url="http://localhost:1234/v1")
# With inspect
inspect.analyze("data.csv", autodoc=True, autodoc_provider="openai")
Install: pip install iterabledata[ai] or pip install -e ".[ai]".
generate_blocks)from iterable.ai import doc
result = doc.generate_blocks(
"data.csv",
blocks=["general", "schema", "quality", "examples", "statistics"], # codebook also available
context={"title": "Population", "territory": "Russia"},
progress=lambda e: print(e.stage.value, e.progress),
)
result["blocks"]["schema"]["data"]["fields"] # structured data per block
result["full_document_markdown"] # assembled document
{markdown, data}; statistics is computed (no LLM); lineage/geo_coverage are deferred stubs.provider.generate_structured) with Pydantic models in iterable.ai.models.MAX_ROWS_SAMPLING); stats support null_fraction, top_values, is_dictionary (DICT_THRESHOLD).LLM_PROVIDER/LLM_BASE_URL/LLM_API_KEY/LLM_DEFAULT_MODEL; provider="openai-compatible" targets any OpenAI-compatible endpoint.doc.generate(..., blocks=[...]) delegates to generate_blocks; without blocks the legacy single-document path is unchanged.Always sample and redact before cloud APIs:
rows = sample_for_llm("data.csv", max_rows=10, strategy="stratified")
safe = redact_for_llm(rows)
describe_format("xml") # includes example_args, limitations, capabilities
export_catalog(format="json") # full catalog; committed at dev/formats.json
patch("iterable.ai.doc.get_provider")@pytest.mark.aiOPENAI_API_KEY, etc.)openspec/specs/ai/spec.mdopenspec/changes/LLM_READINESS_ROADMAP.mdexec() on LLM-generated code; use pipeline() with explicit functions.