multimodal-knowledge-ingestion-platforms

/home/avalon/.hermes/skills/software-development/multimodal-knowledge-ingestion-platforms/SKILL.md · raw

Multimodal Knowledge Ingestion Platforms

Build ingestion systems for books, PDFs, scans, EPUBs, Office files, email, webpages, tables, audio, video, and folders without collapsing provenance into generic chunks.

Activate when

This skill complements llm-wiki: the wiki is a durable compiled knowledge consumer; this skill governs the source-package, extraction, QA, graph, and publisher machinery upstream.

Non-negotiable architecture

intake
→ quarantine and immutable package
→ probe/classify
→ route-specific golden sample
→ bounded extraction
→ evidence QA
→ canonical evidence package
→ retrieval/wiki/graph projections
→ consumer-specific publishers

The ingestion director owns source identity, hashes, manifests, routing, evidence, QA, lifecycle, and graph provenance. Notebook/RAG products and visualization sites are consumers, not the canonical evidence layer.

Canonical source package

Use tenant-scoped, hash-addressed packages containing:

Deduplicate per tenant by content hash. Restrict local-path intake to explicit allowlisted roots. Browser uploads are copied into managed package storage.

Route by medium

Do not pretend a generic text-line reader is universal extraction.

Adapter code is not integrated until a pipeline-level test proves the chosen route invokes it and structural provenance survives into the package.

Security and resource bounds

Treat every source as hostile until validated.

Golden sample and QA gates

Run a small representative extraction before full work. Fail closed:

Structural lint is necessary but insufficient. For valuable books/media, spot-check extracted evidence against original pages, frames, or timestamps.

Typed graph

Compile graphs only after canonical evidence exists:

canonical evidence
→ typed concepts/entities/claims
→ evidence-backed relationships
→ graph QA
→ multi-resolution projection
→ 2D and 3D viewers

Useful relations include PART_OF, DERIVED_FROM, AUTHORED_BY, MENTIONS, DEFINES, SUPPORTS, CONTRADICTS, CITES, SAME_AS, RELATED_TO, DEPICTS, VALIDATED_BY, and PUBLISHED_AS.

Edges that assert support or contradiction must carry exact evidence refs, confidence, source identity, extractor/model provenance, review status, and visibility scope.

Avoid graph hairballs. Default to global/collection/source levels and progressively expand neighborhoods. Provide filters, confidence thresholds, pathfinding, evidence drawers, and an accessible list fallback. Lazy-load heavy WebGL bundles.

Consumer publishers

Each consumer gets a projection, not ownership of canonical truth.

Validate every client against the live API/OpenAPI. Do not guess endpoint prefixes or send undocumented fields. Distinguish request accepted, queued, running, completed, and failed; an assigned job/source ID is not proof of completed processing.

Existing-wiki import

For established wikis, orient to schema/index/source registry and import compiled sections such as concepts/, sources/, queries/, and summaries. Do not recursively crawl raw package/media trees.

Required verification

Before calling a platform operational:

  1. Unit, contract, static, and security checks.
  2. Exact production frontend build and dependency audit.
  3. Exact production ASGI/server target, not only test-client construction.
  4. One reviewed real PDF and one reviewed real EPUB through intake → extraction → QA → graph → publication.
  5. One malformed/unsupported fixture proving fail-closed review.
  6. A bounded import of an existing compiled wiki with node/edge counts.
  7. A publisher request against the live consumer API followed by terminal-state/result verification.
  8. Final process reload, readiness loop, localhost API smoke, and public/auth boundary checks.

Report queued/accepted, completed, needs-review, and blocked states separately.

Pitfalls

Reference

See references/source-faithful-foundry-contracts.md for concrete publisher contracts, smoke-test expectations, and implementation lessons from a production multimodal Foundry build.