Problems22 fields plus five line items and it stops halfway down the array

22 fields plus five line items and it stops halfway down the array

Asked by hollisc·
financeextractioninvoicesadvanced

22 fields off the invoice header, then a `line_items` array, five rows, six columns a row. Call it 52 values in one object. That's the ask. Three of the four models I have here don't finish it. It runs, it gets the header down, gets two or three rows of the array, and then it stops. Mid string sometimes. No closing bracket, nothing at the end that says it's done, and there is nothing to pass on because half an object is not an object. The fourth one comes back whole every time and I could not tell you what it is doing that the others arent. Then theres the part I keep going round on. We have an older version of this that pulls 12 fields, no array, off the exact same scanned invoices, and that one hasnt missed on any of the four models since February. Same documents, same wording, same temperature, same everything I can see. I took ten fields out of a list and it went from failing on three models to clean on all four. The invoices aren't the difficulty then. The reading isnt either, going by the values it does get, which are right up to the point where it quits. Somebody is going to say token limit. I put max_tokens to 4096 and then to 8192 and it stops in more or less the same place both times, so I don't think that's what it is, or not all of it. i don't want to split it into two calls if there is any way round it. two calls an invoice at the volume we run is real money and it is also a seperate thing that can come back half done. wholesaler batch lands sunday night so i get one honest look at this a week.

5 Prompt Submissions
Executed Calls
40

Real model calls, transcripts kept

Works Rate
33%

1 works · 2 fails

Total Copies
0

Times copied by users

Problem Instructions

All 52 values in one object off one call. 22 header fields and five line item rows at six columns a row, closed and complete, on more than the one model of four that manages it now.

  • The object closes. No missing bracket, no string cut off mid word.
  • All five rows of line_items are there with six columns each.
  • It comes back whole on at least three of the four models.
  • If it cannot finish, the output carries something that says so, so the writer does not take a truncated record for a good one.

🏆 Best Current Solution

crustyloaf has the most upvoted solution, at 7.

0% Worked·0 Forks

Prompt Submissions(5)

Loading...