How the three packages compose end-to-end. The flow is one-directional and entirely file-based: each stage reads JSONL produced by the previous stage and writes JSONL plus a summary/manifest.
source files
│
▼
llm_knowledge_ingestion
│ documents.jsonl (document_id, content_hash, source_id)
│ chunks.jsonl (chunk_id, document_id, text)
│ lineage.jsonl (chunk → document references)
│ index_records.jsonl
│
├──────────────────────────────────────────────┐
│ │
▼ ▼
runtime serving llm_dataset_foundry
│ (uses chunk_id when surfacing context) ▲
▼ │
llm_observability_analytics │
│ interactions.jsonl (query_id, trace_id, │
│ prompt_text, │
│ response_text, │
│ retrieval_references) │
│ retrieval_traces.jsonl (query_id, │
│ trace_id, │
│ references[]) │
└──────────────────────────────────────────────┘
│
▼
prompt_response.jsonl
retrieval_evaluation.jsonl
split_assignments.jsonl
dataset_manifest.json
quality_report.json
documents.jsonl— normalized document records keyed bydocument_id.chunks.jsonl— chunks keyed bychunk_id, each carryingdocument_id.lineage.jsonl— chunk-to-document lineage.
chunks.jsonl— runtime systems index and retrieve from these chunks; surfacechunk_idanddocument_idin retrieval results so observability can correlate.
interactions.jsonl— one record per LLM interaction withquery_id,trace_id,prompt_text,response_text,model_context,retrieval_references,feedback.retrieval_traces.jsonl— one record per retrieval call withquery_id,trace_id,references[](each carryingdocument_id,chunk_id,rank,score),model_version,dataset_version.
prompt_response.jsonl— curated training pairs.retrieval_evaluation.jsonl— retrieval-eval records with ground-truth alignment.split_assignments.jsonl— deterministic train/validation/test assignment.dataset_manifest.jsonanddataset_version_metadata.json— manifest plus version metadata.quality_report.json— quality and dedup stats.
All handoff artifacts must preserve, when available:
source_id— upstream knowledge source.document_id— normalized document.chunk_id— chunk derived from a document.query_id— a single user/system query.trace_id— execution trace grouping events/spans.dataset_id,dataset_version— curated dataset identity.model_version— model that produced runtime output.
Snake_case naming, stable across packages.
See examples/integration/ for sample JSONL handoff files matching each step above.
tests/test_end_to_end_pipeline.py wires up the three CLIs in sequence with temporary configs and verifies the expected artifacts appear. Use it as a reference for working config shapes.