4 ms·
1. Give examples of the format of response(s) you want 2. Explicitly call out null conditions (e.g. return { “results”: [] }) 3. Use multiple prompts, one to
by jumploops 2y ago
1. Give examples of the format of response(s) you want
2. Explicitly call out null conditions (e.g. return { “results”: [] })
3. Use multiple prompts, one to “think”/explain and then one to transform the result
4. Don’t use function calling to get structured output, just use JSON mode
One non-obvious trick we use is to tell the LLM what it said previously as a system messages, not just as user messages, even if the LLM didn’t actually output that specific text.