Moderation tool for formatting code with AI

We could swing something like this with persona triage and a custom tool

Persona triage (gpt 4o mini) → custom tool → llm to fix (gpt 4o) → api to submit edit

The challenge though is how comfortable are we allowing the llm to apply the edit with zero hallucinations?

A possibility could be having the llm to fix call return 2 line numbers (where code starts and where it ends) and then use that information to add backticks, that way there is a lot less risk of destruction.

Will have a further think about this, but I do think something is workable here.

1 Like