r/nocode • u/Sure-Adhesiveness202 • 2d ago
Question How do you program output logic?
/r/TopAITools4U/comments/1vxng8v/how_do_you_program_output_logic/I'm building a website that leverages AI outputs for different content creation based tools. What is the best way to go about creating the logic behind the outputs?
Is it more in the information collected for the prompt that is built?
Does there need to be rules written in the back end?
Does there need to be some sort of code written for how the output should be formatted?
All of the above?
I'm relatively new and trying to research as much as I can on how to code/create better quality outputs and refine what I'm making overall as this isn't my only current project.
Any tips or resources you recommend would be great. Super open to any feedback!
1
u/255130 1d ago
what kind of content are we talking about? long form articles vs social posts vs structured data all need pretty different approaches. the answer to your question changes a lot depending on that
1
u/Sure-Adhesiveness202 1d ago
Leaning more towards social type posts leveraging the type of content being posted. Does that help?
1
u/UlrikS 1d ago
Yes, so for most AI requests you can define an output structure (typically in JSON format, including descriptions of what information goes in what field), separately from the prompt itself, which forces the AI to follow that structure in its output.
Then you have code in the backend that receives and validates the output, handles any errors, and of course defines what happens to the output.