The motives of this feature is that sometimes the output of LLM is not desired, instead of setting a static output validator, we can run a self-repair prompt to fix the result.
In /prompt page, we allow user to tick a box turn on self repair prompt feature.
Can refer to Microsoft Typechat on how the implementation is being done https://github.com/microsoft/TypeChat
Code: https://github.com/microsoft/TypeChat/blob/main/src/program.ts
Refer to createRepairPrompt
`The JSON program object is invalid for the following reason:\\n` +
`"""\\n${validationError}\\n"""\\n` +
`The following is a revised JSON program object:\\n`;
Example: Use in Following code


Some other readings:
Developer creates “regenerative” AI program that fixes bugs on the fly https://arstechnica.com/information-technology/2023/04/developer-creates-self-healing-programs-that-fix-themselves-thanks-to-gpt-4/
Please authenticate to join the conversation.
In Review
💡 Request a feature
Over 2 years ago

Mei Wei Lim
Get notified by email when there are changes.
In Review
💡 Request a feature
Over 2 years ago

Mei Wei Lim
Get notified by email when there are changes.