3 ms·
I’ve played around with a similar concept last weekend. The one tweak I would suggest is to use the “structured outputs” feature of the LLM API if it supports i
by MarkSweep 1y ago
I’ve played around with a similar concept last weekend. The one tweak I would suggest is to use the “structured outputs” feature of the LLM API if it supports it. It makes it more likely that the LLM generates valid JSON that follows your schema. Here are some examples of the documentation for different APIs that implement the feature:
https://ai.google.dev/gemini-api/docs/structured-output https://ai.google.dev/gemini-api/docs/structured-output
https://github.com/ollama/ollama/blob/main/docs/api.md#request-structured-outputs https://github.com/ollama/ollama/blob/main/docs/api.md#reque...