Hello. Please help me create a properly working program

Hello everyone. Friends, I need some advice.
What kind of prompts should I write so that Claude 3.5 clearly follows the rules and doesn’t violate them?
Support told me that the rules must be no longer than 500 characters and formulated properly,
but things still turn out very messy.
The idea is — I’m trying to create a program to analyze the target audience.
I’ve completed training on this topic, I have a training template and tools,
but the neural network always generates incorrect data and rarely follows the rules