To Data & Beyond

To Data & Beyond

Share this post

To Data & Beyond
To Data & Beyond
Prompt Engineering Best Practices: LLM Output Validation & Evaluation

Prompt Engineering Best Practices: LLM Output Validation & Evaluation

Validating Output from Instruction-Tuned LLMs

Youssef Hosni's avatar
Youssef Hosni
Apr 15, 2024
∙ Paid
4

Share this post

To Data & Beyond
To Data & Beyond
Prompt Engineering Best Practices: LLM Output Validation & Evaluation
1
Share

To Data & Beyond is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

Checking outputs before showing them to users can be important for ensuring the quality, relevance, and safety of the responses provided to them or used in automation flows.

In this article, we will learn how to use the Moderation API by OpenAI to ensure safety and free of harassment output. Also, we will learn how to use additional prompts to the model to evaluate output quality before displaying them to the user to ensure the generated output follows the given instructions and is free of hallucinations.

This article is the ninth part of the ongoing series Prompt Engineering Best Practices:

  1. Prompt Engineering Best Practices for Instruction-Tuned LLM [Part 1] 

  2. Prompt Engineering Best Practices for Instruction-Tuned LLM [Part 2] 

  3. Prompt Engineering for Instruction-Tuned LLM: Iterative Prompt Development 

  4. Prompt Engineering for Instruction-Tuned LLM: Text Summarization 

  5. Prompt Engineering for Instruction-Tuned LLM: Textual Inference & Sentiment Analysis 

  6. Prompt Engineering for Instruction-Tuned LLM: Text Transforming & Translation

  7. Prompt Engineering Best Practices: Text Expansion

  8. Prompt Engineering Best Practices: Building Chatbots

  9. Prompt Engineering Best Practices: Chain of Thought Reasoning

  10. Prompt Engineering Best Practices: LLM Output Validation [You are here!]

Table of Contents:

  1. Setting Up Working Environment & Getting Started

  2. Checking Harmful Output 

  3. Checking Instruction Following 


My E-book: Data Science Portfolio for Success Is Out!

Youssef Hosni
·
September 15, 2023
My E-book: Data Science Portfolio for Success Is Out!

I recently published my first e-book Data Science Portfolio for Success which is a practical guide on how to build your data science portfolio. The book covers the following topics: The Importance of Having a Portfolio as a Data Scientist How to Build a Data Science Portfolio That Will Land You a Job?

Read full story

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2025 Youssef Hosni
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share