|
|
|
|
|
by LawTalkingGuy
1071 days ago
|
|
Have you tried this sort of prompt? User text: "Blah blah ... Sharks ... Surfing ..."
Instruction: Return an JSON object containing an array of all sentences in the user text which mention sharks directly or by implication.
Response: {"list_of_shark_related_sentences": [ Stop token: ']}' It'll try to complete the JSON response and it'll try to end it by closing the array and object as shown in the stop token. This severely limits rambling, and if it does add a spurious field it'll (usually) still be valid JSON and you can usually just ignore the unwanted field. wrt OpenAI, text-davinci-003 handles this well, the other models not so much. |
|