seed-data 0.0.2__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. seed_data-0.0.3/.github/workflows/docs.yml +34 -0
  2. seed_data-0.0.3/.github/workflows/publish.yml +34 -0
  3. seed_data-0.0.3/.github/workflows/test.yml +29 -0
  4. seed_data-0.0.3/.gitignore +52 -0
  5. seed_data-0.0.3/CODE_OF_CONDUCT.md +4 -0
  6. seed_data-0.0.3/CONTRIBUTING.md +172 -0
  7. seed_data-0.0.3/GETTING_STARTED.md +254 -0
  8. seed_data-0.0.3/Makefile +34 -0
  9. {seed_data-0.0.2/src/seed_data.egg-info → seed_data-0.0.3}/PKG-INFO +1 -1
  10. seed_data-0.0.3/SECURITY.md +22 -0
  11. seed_data-0.0.3/docs/Makefile +73 -0
  12. seed_data-0.0.3/docs/docs/.nav.yml +6 -0
  13. seed_data-0.0.3/docs/docs/API-Reference/.nav.yml +8 -0
  14. seed_data-0.0.3/docs/docs/API-Reference/README.md +16 -0
  15. seed_data-0.0.3/docs/docs/API-Reference/batch.md +6 -0
  16. seed_data-0.0.3/docs/docs/API-Reference/critique.md +6 -0
  17. seed_data-0.0.3/docs/docs/API-Reference/orchestrate.md +6 -0
  18. seed_data-0.0.3/docs/docs/API-Reference/packet.md +6 -0
  19. seed_data-0.0.3/docs/docs/API-Reference/tools.md +6 -0
  20. seed_data-0.0.3/docs/docs/API-Reference/utils.md +6 -0
  21. seed_data-0.0.3/docs/docs/Advanced/.nav.yml +5 -0
  22. seed_data-0.0.3/docs/docs/Advanced/README.md +13 -0
  23. seed_data-0.0.3/docs/docs/Advanced/augmentation.md +45 -0
  24. seed_data-0.0.3/docs/docs/Advanced/models.md +62 -0
  25. seed_data-0.0.3/docs/docs/Advanced/renderers.md +45 -0
  26. seed_data-0.0.3/docs/docs/Getting-Started/.nav.yml +4 -0
  27. seed_data-0.0.3/docs/docs/Getting-Started/README.md +33 -0
  28. seed_data-0.0.3/docs/docs/Getting-Started/installation.md +78 -0
  29. seed_data-0.0.3/docs/docs/Getting-Started/quick-start.md +95 -0
  30. seed_data-0.0.3/docs/docs/Guides/.nav.yml +6 -0
  31. seed_data-0.0.3/docs/docs/Guides/README.md +14 -0
  32. seed_data-0.0.3/docs/docs/Guides/batch-generation.md +94 -0
  33. seed_data-0.0.3/docs/docs/Guides/creating-a-document-type.md +160 -0
  34. seed_data-0.0.3/docs/docs/Guides/generation-choices.md +135 -0
  35. seed_data-0.0.3/docs/docs/Guides/packets.md +204 -0
  36. seed_data-0.0.3/docs/docs/index.md +100 -0
  37. seed_data-0.0.3/docs/generation_choices.md +172 -0
  38. seed_data-0.0.3/docs/mkdocs.yml +70 -0
  39. seed_data-0.0.3/docs/packets.md +279 -0
  40. {seed_data-0.0.2 → seed_data-0.0.3}/pyproject.toml +7 -2
  41. seed_data-0.0.3/scripts/batch_generate.py +171 -0
  42. seed_data-0.0.3/scripts/packet_generate.py +177 -0
  43. seed_data-0.0.3/src/seed_data/prompts/reportlab_cheatsheet.md +863 -0
  44. {seed_data-0.0.2 → seed_data-0.0.3/src/seed_data.egg-info}/PKG-INFO +1 -1
  45. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data.egg-info/SOURCES.txt +48 -1
  46. seed_data-0.0.3/src/seed_data.egg-info/scm_file_list.json +115 -0
  47. seed_data-0.0.3/src/seed_data.egg-info/scm_version.json +8 -0
  48. seed_data-0.0.3/tests/__init__.py +0 -0
  49. seed_data-0.0.3/tests/integration/__init__.py +0 -0
  50. seed_data-0.0.3/tests/integration/test_doc_gen.py +152 -0
  51. seed_data-0.0.3/uv.lock +3438 -0
  52. {seed_data-0.0.2 → seed_data-0.0.3}/LICENSE +0 -0
  53. {seed_data-0.0.2 → seed_data-0.0.3}/NOTICE +0 -0
  54. {seed_data-0.0.2 → seed_data-0.0.3}/README.md +0 -0
  55. {seed_data-0.0.2 → seed_data-0.0.3}/setup.cfg +0 -0
  56. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/__init__.py +0 -0
  57. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/__main__.py +0 -0
  58. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/augment.py +0 -0
  59. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/batch.py +0 -0
  60. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/cli.py +0 -0
  61. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/critique.py +0 -0
  62. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/nodes.py +0 -0
  63. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/orchestrate.py +0 -0
  64. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/packet.py +0 -0
  65. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/packets/insurance-claim-packet/packet.json +0 -0
  66. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/packets/lending-package/packet.json +0 -0
  67. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/prompts/__init__.py +0 -0
  68. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/prompts/aug_critic.j2 +0 -0
  69. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/prompts/augmentor.j2 +0 -0
  70. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/prompts/critic.j2 +0 -0
  71. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/prompts/critic_vision.j2 +0 -0
  72. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/prompts/data_critic.j2 +0 -0
  73. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/prompts/data_generator.j2 +0 -0
  74. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/prompts/doc_generator.j2 +0 -0
  75. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/prompts/doc_generator_html.j2 +0 -0
  76. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/bank-statement/generation_guidance.md +0 -0
  77. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/bank-statement/schema.json +0 -0
  78. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/cable-bill/generation_guidance.md +0 -0
  79. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/cable-bill/samples/README.md +0 -0
  80. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/cable-bill/schema.json +0 -0
  81. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/commercial-lease/generation_guidance.md +0 -0
  82. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/commercial-lease/schema.json +0 -0
  83. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/credit-report/generation_guidance.md +0 -0
  84. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/credit-report/schema.json +0 -0
  85. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/employment-verification-letter/generation_guidance.md +0 -0
  86. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/employment-verification-letter/schema.json +0 -0
  87. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/fcc-invoice/generation_guidance.md +0 -0
  88. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/fcc-invoice/samples/README.md +0 -0
  89. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/fcc-invoice/schema.json +0 -0
  90. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/homeowners-insurance-declaration/generation_guidance.md +0 -0
  91. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/homeowners-insurance-declaration/schema.json +0 -0
  92. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/insurance-claim/generation_guidance.md +0 -0
  93. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/insurance-claim/schema.json +0 -0
  94. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/invoice/generation_guidance.md +0 -0
  95. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/invoice/schema.json +0 -0
  96. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/loan-application/generation_guidance.md +0 -0
  97. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/loan-application/schema.json +0 -0
  98. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/medical-discharge/generation_guidance.md +0 -0
  99. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/medical-discharge/schema.json +0 -0
  100. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/pay-stub/generation_guidance.md +0 -0
  101. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/pay-stub/schema.json +0 -0
  102. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/police-report/generation_guidance.md +0 -0
  103. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/police-report/schema.json +0 -0
  104. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/property-appraisal/generation_guidance.md +0 -0
  105. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/property-appraisal/schema.json +0 -0
  106. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/statement-of-work/generation_guidance.md +0 -0
  107. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/statement-of-work/schema.json +0 -0
  108. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/title-report/generation_guidance.md +0 -0
  109. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/title-report/schema.json +0 -0
  110. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/w2/generation_guidance.md +0 -0
  111. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/schemas/w2/schema.json +0 -0
  112. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/session.py +0 -0
  113. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/tools.py +0 -0
  114. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data/utils.py +0 -0
  115. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data.egg-info/dependency_links.txt +0 -0
  116. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data.egg-info/entry_points.txt +0 -0
  117. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data.egg-info/requires.txt +0 -0
  118. {seed_data-0.0.2 → seed_data-0.0.3}/src/seed_data.egg-info/top_level.txt +0 -0
  119. {seed_data-0.0.2 → seed_data-0.0.3}/tests/test_packet.py +0 -0
  120. {seed_data-0.0.2 → seed_data-0.0.3}/tests/test_subgraph.py +0 -0
  121. {seed_data-0.0.2 → seed_data-0.0.3}/tests/test_unit.py +0 -0
@@ -0,0 +1,34 @@
1
+ name: Deploy Documentation
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - 'src/**'
9
+ - 'docs/**'
10
+ - '.github/workflows/docs.yml'
11
+
12
+ permissions:
13
+ contents: write
14
+
15
+ jobs:
16
+ deploy:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
20
+
21
+ - name: Set up uv
22
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
23
+ with:
24
+ python-version: "3.12"
25
+
26
+ - name: Install dependencies
27
+ run: uv sync --group docs --frozen
28
+
29
+ - name: Deploy to GitHub Pages
30
+ run: |
31
+ cd docs
32
+ git config user.name github-actions
33
+ git config user.email github-actions@github.com
34
+ uv run mkdocs gh-deploy --force
@@ -0,0 +1,34 @@
1
+ name: Publish to PyPI
2
+
3
+ # Publishes to PyPI when a GitHub Release is published. The package version is
4
+ # whatever is set in pyproject.toml at that commit — bump it before releasing.
5
+ on:
6
+ release:
7
+ types: [published]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ publish:
14
+ runs-on: ubuntu-latest
15
+ # Uses PyPI Trusted Publishing (OIDC) — no API token secret is stored.
16
+ # Requires a one-time setup on PyPI: project -> Manage -> Publishing ->
17
+ # add a GitHub publisher for this repo, workflow "publish.yml",
18
+ # and environment "pypi" (see README / release docs).
19
+ environment: pypi
20
+ permissions:
21
+ id-token: write # required for Trusted Publishing OIDC
22
+ steps:
23
+ - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
24
+ with:
25
+ fetch-depth: 0 # setuptools-scm needs full history and tags to derive the version
26
+
27
+ - name: Set up uv
28
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
29
+
30
+ - name: Build sdist and wheel
31
+ run: uv build
32
+
33
+ - name: Publish to PyPI
34
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
@@ -0,0 +1,29 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main, dev]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ pytest:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
19
+ with:
20
+ enable-cache: true
21
+
22
+ - name: Set up Python
23
+ run: uv python install 3.12
24
+
25
+ - name: Install dependencies
26
+ run: uv sync
27
+
28
+ - name: Run tests
29
+ run: uv run pytest
@@ -0,0 +1,52 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ *.egg
9
+ .pytest_cache/
10
+
11
+ # Security scanner output
12
+ .ash/
13
+
14
+ # Environment
15
+ .env
16
+ .venv/
17
+ env/
18
+
19
+ # PDFs / generated output
20
+ output/
21
+ critiques/
22
+
23
+ # Reference sample documents — never commit these. They are local-only
24
+ # style references for the doc critic and may contain third-party / real
25
+ # content. See any schemas/<type>/samples/README.md for details.
26
+ src/doc_gen_agent/schemas/*/samples/*.pdf
27
+ src/doc_gen_agent/schemas/*/samples/*.png
28
+ src/doc_gen_agent/schemas/*/samples/*.jpg
29
+ src/doc_gen_agent/schemas/*/samples/*.jpeg
30
+
31
+ # Archives
32
+ *.zip
33
+
34
+ # MkDocs build output
35
+ docs/site/
36
+ site/
37
+
38
+ # REPL state
39
+ repl_state/
40
+
41
+ # OS
42
+ .DS_Store
43
+ Thumbs.db
44
+
45
+ # IDE
46
+ .vscode/
47
+ .idea/
48
+
49
+ # Playwright MCP scratch output (screenshots, console/network dumps)
50
+ .playwright-mcp/
51
+ *.log
52
+ .ash/*
@@ -0,0 +1,4 @@
1
+ ## Code of Conduct
2
+ This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3
+ For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4
+ opensource-codeofconduct@amazon.com with any additional questions or comments.
@@ -0,0 +1,172 @@
1
+ # Contributing Guidelines
2
+
3
+ Thank you for your interest in contributing to Synthetically Engineered Evaluation Data (SEED)! Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community.
4
+
5
+ Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
6
+ information to effectively respond to your bug report or contribution.
7
+
8
+
9
+ ## Quick Start for Contributors
10
+
11
+ ### Prerequisites
12
+
13
+ - Python 3.12+
14
+ - [uv](https://docs.astral.sh/uv/getting-started/installation/) (recommended) or pip
15
+ - Git
16
+
17
+ WeasyPrint (the default renderer) requires system libraries:
18
+
19
+ ```bash
20
+ # macOS
21
+ brew install pango gdk-pixbuf libffi
22
+
23
+ # Ubuntu/Debian
24
+ apt-get install libpango-1.0-0 libgdk-pixbuf2.0-0
25
+ ```
26
+
27
+ ### Setup
28
+
29
+ ```bash
30
+ # Clone and setup
31
+ git clone https://github.com/awslabs/synthetically-engineered-evaluation-data.git
32
+ cd synthetically-engineered-evaluation-data
33
+
34
+ # Option 1: uv (recommended)
35
+ uv sync
36
+
37
+ # Option 2: pip + venv
38
+ pip install -e ".[dev]"
39
+ ```
40
+
41
+ > **Using pip + venv?** If you installed with `pip install -e ".[dev]"`, run the tools directly (e.g., `python scripts/test_unit.py`). If you use uv, prefix commands with `uv run` (e.g., `uv run python scripts/test_unit.py`).
42
+
43
+ ### Development Workflow
44
+
45
+ 1. Create a branch from `develop`: `git checkout -b feature/your-feature develop`
46
+ 2. Make your changes
47
+ 3. Run the unit tests: `python scripts/test_unit.py`
48
+ 4. Run linting: `ruff check .`
49
+ 5. Commit with conventional format: `feat: add new feature`
50
+ 6. Submit PR to `develop` branch
51
+
52
+ ## Quick Reference
53
+
54
+ ### Common Commands
55
+
56
+ | Task | Command |
57
+ |------|---------|
58
+ | Run unit tests | `python scripts/test_unit.py` |
59
+ | Run the document generation smoke test | `python scripts/test_doc_gen.py` |
60
+ | Lint check | `ruff check .` |
61
+ | Lint fix | `ruff check --fix .` |
62
+
63
+ ### Commit Message Format
64
+
65
+ ```
66
+ type: brief description
67
+ ```
68
+
69
+ **Types:** `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
70
+
71
+ ### Documentation Contributions
72
+
73
+ Documentation is built with MkDocs and lives in the `docs/` directory.
74
+
75
+ ```bash
76
+ # Setup and serve docs locally
77
+ cd docs
78
+ make install # Install dependencies
79
+ make docs # Start dev server at http://127.0.0.1:8000
80
+ ```
81
+
82
+ When contributing documentation:
83
+ - Edit Markdown files in `docs/docs/`
84
+ - Follow existing structure and style
85
+ - Test locally with `make docs` before submitting a PR
86
+ - Documentation PRs should also target the `develop` branch
87
+
88
+ ---
89
+
90
+ ## Reporting Bugs/Feature Requests
91
+
92
+ We welcome you to use the GitHub issue tracker to report bugs or suggest features.
93
+
94
+ When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already
95
+ reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
96
+
97
+ * A reproducible test case or series of steps
98
+ * The version of our code being used
99
+ * Any modifications you've made relevant to the bug
100
+ * Anything unusual about your environment or deployment
101
+
102
+
103
+ ## Contributing via Pull Requests
104
+
105
+ Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
106
+
107
+ 1. You are working against the latest source on the **develop** branch.
108
+ 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
109
+ 3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
110
+
111
+ ### Pull Request Process
112
+
113
+ To send us a pull request, please:
114
+
115
+ 1. Fork the repository.
116
+ 2. Create a feature branch from the **develop** branch (not main).
117
+ 3. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
118
+ 4. Ensure local tests pass.
119
+ 5. Commit to your fork using clear commit messages.
120
+ 6. **Submit your pull request to the develop branch** (not main).
121
+ 7. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
122
+
123
+ ### Pull Request Template
124
+
125
+ When creating a pull request, please use the following template to ensure all necessary information is included:
126
+
127
+ ```
128
+ *Issue #, if available:*
129
+
130
+ *Description of changes:*
131
+
132
+
133
+ By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
134
+ ```
135
+
136
+ ### Branch Guidelines
137
+
138
+ - **All pull requests must target the `develop` branch**
139
+ - The `main` branch is reserved for stable releases; releases are cut via a PR from `develop` to `main`
140
+ - Use descriptive branch names (e.g., `feature/add-new-schema`, `bugfix/fix-memory-leak`)
141
+ - Keep your branch up to date with the latest `develop` branch before submitting
142
+
143
+ ### Commit Message Guidelines
144
+
145
+ - Use clear and meaningful commit messages
146
+ - Follow the format: `type: brief description`
147
+ - Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
148
+ - Example: `feat: add new document schema`
149
+
150
+ Refer to [this guide](https://www.conventionalcommits.org/en/v1.0.0/#examples) for clear commit guidelines <br>
151
+
152
+ GitHub provides additional documentation on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
153
+ [creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
154
+
155
+
156
+ ## Finding contributions to work on
157
+ Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
158
+
159
+
160
+ ## Code of Conduct
161
+ This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
162
+ For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
163
+ opensource-codeofconduct@amazon.com with any additional questions or comments.
164
+
165
+
166
+ ## Security issue notifications
167
+ If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/), or by following the process described in [SECURITY.md](SECURITY.md). Please do **not** create a public GitHub issue.
168
+
169
+
170
+ ## Licensing
171
+
172
+ See the [LICENSE](LICENSE) file for our project's licensing. Contributions are made under the Apache-2.0 license. We will ask you to confirm the licensing of your contribution.
@@ -0,0 +1,254 @@
1
+ # Getting Started with doc-gen-agent
2
+
3
+ This guide walks you through creating a new document type and generating your first synthetic documents in under 10 minutes.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ conda create -n doc-gen-agent python=3.12 -y
9
+ conda activate doc-gen-agent
10
+ pip install -e .
11
+ ```
12
+
13
+ ## Prerequisites: AWS Access
14
+
15
+ This tool uses Amazon Bedrock to run foundation models. You need an AWS account with Bedrock model access enabled.
16
+
17
+ Configure your credentials using any method supported by [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html). We recommend setting up a named profile in `~/.aws/config`:
18
+
19
+ ```bash
20
+ export AWS_PROFILE=your-profile-name
21
+ ```
22
+
23
+ ### About BYPASS_TOOL_CONSENT
24
+
25
+ The Strands Agents SDK prompts for user confirmation before executing tools (like `python_repl`). Since this pipeline runs many tool calls autonomously, set this environment variable to skip those prompts:
26
+
27
+ ```bash
28
+ export BYPASS_TOOL_CONSENT=true
29
+ ```
30
+
31
+ This is safe — the agents only execute code they generate for PDF rendering, and all output is validated by the critic agents. You can omit this flag if you want to manually approve each tool call.
32
+
33
+ ## Step 1: Create a Document Type
34
+
35
+ Every document type lives in its own directory with at least a `schema.json`. Create one:
36
+
37
+ ```bash
38
+ mkdir -p src/seed_data/schemas/purchase-order
39
+ ```
40
+
41
+ ### Write the schema
42
+
43
+ Create `src/seed_data/schemas/purchase-order/schema.json`:
44
+
45
+ ```json
46
+ {
47
+ "$schema": "http://json-schema.org/draft-07/schema#",
48
+ "title": "Purchase-Order",
49
+ "description": "A purchase order for goods from a supplier.",
50
+ "type": "object",
51
+ "required": ["Buyer", "Supplier", "PONumber", "Items", "Total"],
52
+ "properties": {
53
+ "Buyer": { "type": "string", "description": "Company placing the order" },
54
+ "Supplier": { "type": "string", "description": "Company fulfilling the order" },
55
+ "PONumber": { "type": "string", "description": "Purchase order number" },
56
+ "OrderDate": { "type": "string", "description": "Date in YYYY-MM-DD format" },
57
+ "Items": {
58
+ "type": "array",
59
+ "items": {
60
+ "type": "object",
61
+ "required": ["Description", "Quantity", "UnitPrice", "Amount"],
62
+ "properties": {
63
+ "Description": { "type": "string" },
64
+ "Quantity": { "type": "integer" },
65
+ "UnitPrice": { "type": "number" },
66
+ "Amount": { "type": "number", "description": "Must equal Quantity * UnitPrice" }
67
+ }
68
+ }
69
+ },
70
+ "Total": { "type": "number", "description": "Sum of all item Amounts" }
71
+ }
72
+ }
73
+ ```
74
+
75
+ The `title` field becomes the document type name used in output directories.
76
+
77
+ ### Add steering docs (optional but recommended)
78
+
79
+ Create `src/seed_data/schemas/purchase-order/generation_guidance.md`:
80
+
81
+ ```markdown
82
+ # Purchase Order — Generation Guidance
83
+
84
+ ## Visual Style
85
+ - Clean business document with company letterhead
86
+ - Table with columns: Item, Qty, Unit Price, Amount
87
+ - Total prominently displayed at bottom right
88
+ - Use 8-10pt body text, compact layout
89
+
90
+ ## Data Realism
91
+ - Buyer: realistic company names (manufacturing, retail, construction)
92
+ - Supplier: realistic vendor names matching the industry
93
+ - PO numbers: format PO-YYYYMMDD-NNN
94
+ - 3-10 line items typical
95
+ - Unit prices: $5-$5,000 range
96
+
97
+ ## Math Rules (CRITICAL)
98
+ - Each item Amount MUST equal Quantity * UnitPrice exactly
99
+ - Total MUST equal sum of all item Amounts
100
+ - All values to 2 decimal places
101
+ ```
102
+
103
+ The pipeline reads all `*.md` files in the directory and injects them into every agent's prompt. This is where you put domain-specific rules — the agents will follow them.
104
+
105
+ **Want diversity across runs?** Add optional fields with `x-probability` to your
106
+ schema and a `## Layout Variations` section to your guidance. See
107
+ [docs/generation_choices.md](docs/generation_choices.md) for the full guide.
108
+
109
+ ### Add reference samples (optional)
110
+
111
+ If you have real examples of this document type, drop PDFs into a `samples/` subdirectory:
112
+
113
+ ```
114
+ schemas/purchase-order/
115
+ ├── schema.json
116
+ ├── generation_guidance.md
117
+ └── samples/
118
+ ├── real_po_001.pdf
119
+ └── real_po_002.pdf
120
+ ```
121
+
122
+ The doc critic loads these as visual benchmarks and compares generated documents against them.
123
+
124
+ ## Step 2: Generate a Single Document
125
+
126
+ ```bash
127
+ BYPASS_TOOL_CONSENT=true python -m seed_data \
128
+ --schema-dir src/seed_data/schemas/purchase-order \
129
+ --extra "Industrial plumbing supplies for a construction project in Denver"
130
+ ```
131
+
132
+ This runs the full pipeline: data generation → data validation → PDF rendering → visual critique. You'll see each stage's output in the terminal. The final PDF lands in `output/purchase-order/`.
133
+
134
+ ### With image augmentation
135
+
136
+ Add `--augment` to simulate scanning/faxing artifacts:
137
+
138
+ ```bash
139
+ BYPASS_TOOL_CONSENT=true python -m seed_data \
140
+ --schema-dir src/seed_data/schemas/purchase-order \
141
+ --extra "Industrial plumbing supplies" \
142
+ --augment
143
+ ```
144
+
145
+ This adds two more stages: an augmentor agent picks degradation effects, then an aug critic checks the result is still legible.
146
+
147
+ ## Step 3: Generate a Batch
148
+
149
+ For training data, you want volume and diversity. The batch script (`scripts/batch_generate.py`)
150
+ runs the pipeline N times in parallel, each with a unique scenario:
151
+
152
+ ```bash
153
+ BYPASS_TOOL_CONSENT=true python scripts/batch_generate.py \
154
+ --schema-dir src/seed_data/schemas/purchase-order \
155
+ --extra "Diverse industries ordering from various suppliers across the US" \
156
+ --count 10 --workers 3 \
157
+ --batch-name po-training-set \
158
+ --augment
159
+ ```
160
+
161
+ A scenario generator agent reads your brief and crafts a unique scenario for each
162
+ document — different buyers, suppliers, industries, regions, and order types. Then
163
+ each scenario runs through the full pipeline in parallel via `ThreadPoolExecutor`
164
+ (controlled by `--workers`).
165
+
166
+ Output goes to `output/po-training-set/`:
167
+
168
+ ```
169
+ output/po-training-set/
170
+ ├── pdfs/ # 10 clean PDFs
171
+ ├── augmented/ # 10 augmented versions
172
+ ├── data/ # 10 JSON data files (ground truth)
173
+ ├── generation_scripts/ # The HTML used to render each PDF
174
+ ├── config/ # Copy of your schema + guidance for reproducibility
175
+ └── config/batch_manifest.json # CLI command, git hash, model config, per-doc results
176
+ ```
177
+
178
+ Tips:
179
+ - **Workers vs count**: a single doc takes ~60-100s. With `--count 10 --workers 3`
180
+ expect ~5-7 minutes wall-clock. Don't set `--workers` higher than 4-5; you'll hit
181
+ Bedrock rate limits.
182
+ - **Brief specificity matters**: a vague brief produces same-y documents. A specific
183
+ brief ("CPG brands on local TV stations in the southwest") produces real diversity.
184
+ - **Partial failures are OK**: if 1 of 10 docs fails, the other 9 are still saved.
185
+ The manifest shows which succeeded.
186
+
187
+
188
+ ## Step 4: Customize Models
189
+
190
+ By default, the pipeline uses DeepSeek V3.2 for generation and Haiku for critics. Override per stage:
191
+
192
+ ```bash
193
+ python -m seed_data \
194
+ --schema-dir src/seed_data/schemas/purchase-order \
195
+ --extra "Office supplies" \
196
+ --data-model qwen3-vl \
197
+ --doc-model deepseek-v3 \
198
+ --critic-model haiku \
199
+ --count 5 --batch-name office-supplies
200
+ ```
201
+
202
+ **Constraint:** `--critic-model` must support document/PDF input (currently only Anthropic models: haiku, sonnet, opus). All other model flags can use any available model.
203
+
204
+ ## Step 5: Tune Quality
205
+
206
+ ### Adjust the acceptance threshold
207
+
208
+ ```bash
209
+ --threshold 8 # stricter (more retries, higher quality)
210
+ --threshold 5 # lenient (faster, lower quality)
211
+ ```
212
+
213
+ ### Edit steering docs
214
+
215
+ The fastest way to improve output quality is editing the `*.md` steering files. The agents read these on every run. Common tweaks:
216
+
217
+ - Add specific layout instructions ("use alternating row colors in tables")
218
+ - Tighten math rules ("tax rate must be between 6% and 10.25%")
219
+ - Add augmentation context ("these documents were faxed in the 1990s")
220
+ - Specify data constraints ("dates must be within the last 90 days")
221
+
222
+ ### Edit prompt templates
223
+
224
+ For deeper customization, edit the Jinja2 templates in `src/seed_data/prompts/`:
225
+
226
+ | Template | Controls |
227
+ |----------|----------|
228
+ | `data_generator.j2` | How the LLM generates JSON data |
229
+ | `data_critic.j2` | What the data critic checks for |
230
+ | `doc_generator.j2` | How the LLM writes PDF rendering code |
231
+ | `critic_vision.j2` | What the vision critic evaluates |
232
+ | `augmentor.j2` | Available augmentations and selection rules |
233
+ | `aug_critic.j2` | Augmentation quality criteria |
234
+
235
+ ## Quick Reference
236
+
237
+ ```bash
238
+ # Single doc, defaults
239
+ python -m seed_data --schema-dir schemas/my-type --extra "context"
240
+
241
+ # Batch of 20 with augmentation
242
+ python scripts/batch_generate.py --schema-dir schemas/my-type \
243
+ --extra "brief for diversity" --count 20 --workers 3 \
244
+ --batch-name my-batch --augment
245
+
246
+ # Use specific models (single-doc; same flags work for batch)
247
+ python -m seed_data --schema-dir schemas/my-type \
248
+ --data-model nova2-lite --doc-model gpt-oss --critic-model sonnet
249
+
250
+ # See all options
251
+ python -m seed_data --help
252
+ python scripts/batch_generate.py --help
253
+ python scripts/packet_generate.py --help
254
+ ```
@@ -0,0 +1,34 @@
1
+ # Makefile for Synthetically Engineered Evaluation Data (SEED)
2
+ #
3
+ # Convenience targets for common development tasks. All targets run inside the
4
+ # uv-managed environment; run `make install` first if you have not synced yet.
5
+
6
+ # Declare phony targets (targets that don't represent files)
7
+ .PHONY: help install test
8
+
9
+ # help: List the available targets
10
+ #
11
+ # Usage: make help (or just `make`)
12
+ help:
13
+ @echo "Available targets:"
14
+ @echo " make install Sync the uv environment (including the dev group)"
15
+ @echo " make test Run the unit test suite (integration tests excluded)"
16
+
17
+ # install: Sync the uv environment
18
+ #
19
+ # Installs all dependencies from uv.lock, including the dev group (pytest, ruff,
20
+ # docs tooling). Requires Python 3.12+.
21
+ #
22
+ # Usage: make install
23
+ install:
24
+ uv sync
25
+
26
+ # test: Run the unit test suite
27
+ #
28
+ # Runs pytest inside the uv environment. Integration tests under
29
+ # tests/integration/ are excluded by default (see addopts in pyproject.toml),
30
+ # since they require live AWS credentials.
31
+ #
32
+ # Usage: make test
33
+ test:
34
+ uv run pytest
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: seed-data
3
- Version: 0.0.2
3
+ Version: 0.0.3
4
4
  Summary: AI-powered synthetic document generation pipeline for benchmarking document extraction (IDP/KIE) systems
5
5
  License-Expression: Apache-2.0
6
6
  Project-URL: Homepage, https://github.com/awslabs/synthetically-engineered-evaluation-data
@@ -0,0 +1,22 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ If you discover a potential security issue in this project we ask that you notify
6
+ AWS/Amazon Security via our [vulnerability reporting page](https://aws.amazon.com/security/vulnerability-reporting/)
7
+ or directly via email to aws-security@amazon.com.
8
+
9
+ Please do **not** create a public GitHub issue for security vulnerabilities.
10
+
11
+ Please include as much of the information listed below as you can to help us
12
+ better understand and resolve the issue:
13
+
14
+ * The type of issue
15
+ * Full paths of source file(s) related to the manifestation of the issue
16
+ * The location of the affected source code (tag/branch/commit or direct URL)
17
+ * Any special configuration required to reproduce the issue
18
+ * Step-by-step instructions to reproduce the issue
19
+ * Proof-of-concept or exploit code (if possible)
20
+ * Impact of the issue, including how an attacker might exploit the issue
21
+
22
+ This information will help us triage your report more quickly.