|
1 | | -# llm-observability-analytics |
| 1 | +# llm-data-platform |
2 | 2 |
|
3 | | -Observability and analytics layer for a multi-repository LLM data engineering platform. |
| 3 | +Monorepo containing lightweight tools for ingesting, processing and observing LLM data workflows. |
4 | 4 |
|
5 | | -## Platform Position |
| 5 | +Included packages |
6 | 6 |
|
7 | | -`llm-observability-analytics` sits between ingestion outputs and dataset curation. |
8 | | -It remains an independent repository and provides runtime telemetry and derived analytics. |
| 7 | +- `llm_knowledge_ingestion` — parsers, chunking, sources and pipeline interfaces. |
| 8 | +- `llm_dataset_foundry` — dataset curation utilities and ingestion consumers. |
| 9 | +- `llm_observability_analytics` — runtime telemetry, traces and analytics. |
9 | 10 |
|
10 | | -It explicitly integrates with: |
| 11 | +This repository consolidates the three components above to simplify development and CI. |
11 | 12 |
|
12 | | -- `llm-knowledge-ingestion` (upstream contract provider for `document_id`/`chunk_id`) |
13 | | -- `llm-dataset-foundry` (downstream consumer of curated interaction and retrieval traces) |
| 13 | +Quickstart |
14 | 14 |
|
15 | | -## Upstream Inputs and Downstream Outputs |
16 | | - |
17 | | -Upstream inputs: |
18 | | - |
19 | | -- retrieval grounding context keyed by `document_id` and `chunk_id` from `llm-knowledge-ingestion` |
20 | | -- runtime prompt/response telemetry from serving systems |
21 | | - |
22 | | -Downstream outputs: |
23 | | - |
24 | | -- validated interaction events (`interactions.jsonl`) |
25 | | -- validated retrieval trace events (`retrieval_traces.jsonl`) |
26 | | -- analytics summaries and derived metrics |
27 | | - |
28 | | -## Shared Identifiers |
| 15 | +Prerequisites: |
29 | 16 |
|
30 | | -Produced and consumed: |
| 17 | +- Python 3.12+ |
| 18 | +- Optional: `make` for convenience targets |
31 | 19 |
|
32 | | -- `query_id` |
33 | | -- `trace_id` |
34 | | -- `model_version` |
35 | | -- `dataset_version` (optional context) |
| 20 | +Setup (Unix/macOS): |
36 | 21 |
|
37 | | -Consumed from ingestion: |
| 22 | +```bash |
| 23 | +python -m venv .venv |
| 24 | +source .venv/bin/activate |
| 25 | +python -m pip install -U pip |
| 26 | +pip install -e '.[dev]' |
| 27 | +``` |
38 | 28 |
|
39 | | -- `document_id` |
40 | | -- `chunk_id` |
41 | | -- `source_id` |
| 29 | +Setup (Windows PowerShell): |
42 | 30 |
|
43 | | -## Why This Layer Exists |
| 31 | +```powershell |
| 32 | +python -m venv .venv |
| 33 | +. .\.venv\Scripts\Activate.ps1 |
| 34 | +python -m pip install -U pip |
| 35 | +pip install -e ".[dev]" |
| 36 | +``` |
44 | 37 |
|
45 | | -- correlate runtime behavior with source grounding |
46 | | -- compute latency/token/grounding quality metrics |
47 | | -- provide analytics-ready records for monitoring and dataset generation |
| 38 | +Development commands |
48 | 39 |
|
49 | | -## Integration References |
| 40 | +- Format: `make format` (runs `ruff format`) |
| 41 | +- Lint: `make lint` (runs `ruff check`) |
| 42 | +- Type check: `make typecheck` (runs `mypy src`) |
| 43 | +- Tests: `make test` (runs `pytest`) or `python -m scripts.run_tests_by_package` to run tests grouped by package |
50 | 44 |
|
51 | | -- `docs/data-contracts.md` |
52 | | -- `docs/integration.md` |
53 | | -- `examples/integration/` |
| 45 | +Testing notes |
54 | 46 |
|
55 | | -## Local Development |
| 47 | +This monorepo contains tests for multiple packages. Use the provided script to run tests grouped by package to avoid pytest collection collisions: |
56 | 48 |
|
57 | | -Prerequisites: |
| 49 | +```bash |
| 50 | +python -m scripts.run_tests_by_package |
| 51 | +``` |
58 | 52 |
|
59 | | -- Python 3.12+ |
60 | | -- GNU Make (or equivalent direct commands) |
| 53 | +Continuous Integration |
61 | 54 |
|
62 | | -Setup: |
| 55 | +The GitHub Actions workflow is at [.github/workflows/ci.yml](.github/workflows/ci.yml). It runs lint, type-check and the grouped tests. |
63 | 56 |
|
64 | | -```bash |
65 | | -python -m venv .venv |
66 | | -. .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1 |
67 | | -python -m pip install -U pip |
68 | | -pip install -e .[dev] |
69 | | -``` |
| 57 | +Contributing |
70 | 58 |
|
71 | | -Common commands: |
| 59 | +- Open issues or PRs against `main`. |
| 60 | +- Run `make format` and `make lint` before pushing. |
| 61 | +- Add unit tests for new behavior and keep `mypy` passing. |
72 | 62 |
|
73 | | -```bash |
74 | | -make format |
75 | | -make lint |
76 | | -make typecheck |
77 | | -make test |
78 | | -make ci |
79 | | -``` |
| 63 | +Repository layout |
80 | 64 |
|
81 | | -CLI: |
| 65 | +- `src/` — source packages under `llm_dataset_foundry`, `llm_knowledge_ingestion`, `llm_observability_analytics` |
| 66 | +- `tests/` — integration/unit tests |
| 67 | +- `scripts/` — utility scripts (e.g., `run_tests_by_package.py`) |
| 68 | +- `.github/workflows/ci.yml` — CI configuration |
82 | 69 |
|
83 | | -```bash |
84 | | -python -m llm_observability_analytics.cli.main --dry-run --config configs/base.yaml |
85 | | -python -m llm_observability_analytics.cli.main --config configs/base.yaml |
86 | | -``` |
| 70 | +License |
87 | 71 |
|
| 72 | +This project uses the repository `LICENSE` file. |
88 | 73 |
|
89 | | -## Cross-Repo Consistency Checks |
| 74 | +Contact |
90 | 75 |
|
91 | | -- Machine-readable summary: docs/shared-contract-summary.json`n- Manual validator: python scripts/validate_shared_contracts.py`n- Cross-repo check example: |
92 | | - python scripts/validate_shared_contracts.py --peer ../llm-knowledge-ingestion/docs/shared-contract-summary.json --peer ../llm-dataset-foundry/docs/shared-contract-summary.json |
| 76 | +For questions, open an issue or contact the maintainers via GitHub. |
93 | 77 |
|
0 commit comments