I’m building an application to evaluate the adherence of given text to a tone. The application should return a score between 0-100 (int) or 0.0 to 1.0 (float) to indicate how well the text aligns with the target tone.
To ensure the output is strictly in the desired format and to prevent any prompt manipulation, where is the best layer to implement this check?
- Should this be implemented in the
postprocessmethod of the Pipeline?
- Or should I handle this at a higher level in the application?