diff --git a/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts b/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts index 020e6ccf..b5d8356e 100644 --- a/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts +++ b/apps/api/src/scraper/scrapeURL/transformers/llmExtract.ts @@ -282,6 +282,22 @@ Consider: 3. Appropriate data types for each field 4. Nested objects and arrays where appropriate +Valid JSON schema, has to be simple. No crazy properties. OpenAI has to support it. +Supported types +The following types are supported for Structured Outputs: + +String +Number +Boolean +Integer +Object +Array +Enum +anyOf + +Formats are not supported. Min/max are not supported. Anything beyond the above is not supported. Keep it simple with types and descriptions. +Optionals are not supported. +Keep it simple. Don't create too many properties, just the ones that are needed. Don't invent properties. Return a valid JSON schema object with properties that would capture the information requested in the prompt.`, }, {