-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Previously we had one call per page, which worked, but lacked context across the entire publication, which lead to titles being repeated and page breaks matching the original document, which didn't necessarily work on a website.
The current method is to combine the document's entire content into one, and then send that to the AI for formatting and pagination. This works, but requires some very specific prompting, and a model like Claude Sonnet 3.7 that can handle very long inputs and outputs. I suspect that extending this further should we want to make the AI do more in the future will be tricky.
It may be better to use multiple calls for different things. For example:
- Format the document.
- Split the document
- Translate the document into structured data (See Use the site's paragraphs better. #43 )
- Analyse images to add titles / descriptions
- Etc...
I haven't tried this yet, so it'd need a proof of concept to see if it works.