Commit a4169e4
committed
seeds: pin maxItems to job.count for symmetric bounds
Address Yeming's review feedback on #40. The minItems pin alone left
the schema asymmetric (e.g. minItems=27, maxItems=2000), which
technically allows the model to over-generate. Over-generation isn't
the failure mode that motivated the PR, but pinning both bounds keeps
the schema's stated shape aligned with the prompt's stated count.
- seeds_response_schema now accepts an optional max_items override; the
default behavior (maxItems=2000) is preserved when callers don't pass
one, matching the existing seed-validation safety net.
- _generate_records now pins both bounds to job.count so each batch
produces exactly the requested number of seeds.
- Two new unit tests cover the pinned-bounds case and the non-positive
override fallback. 30/30 seed-schema tests pass.1 parent 9aa9ef0 commit a4169e4
2 files changed
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
169 | 175 | | |
170 | 176 | | |
| 177 | + | |
171 | 178 | | |
172 | 179 | | |
173 | | - | |
| 180 | + | |
174 | 181 | | |
175 | 182 | | |
176 | 183 | | |
| |||
663 | 670 | | |
664 | 671 | | |
665 | 672 | | |
666 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
667 | 676 | | |
668 | 677 | | |
669 | 678 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
| |||
0 commit comments