liveBook · Manning

Manual evaluation

As explained in Starting Data Analytics with Generative AI and Python

Manual inspection is the direct examination of data or output by a person to identify unusual, incorrect, or inconsistent values or formatting.

Manual evaluation means examining data or generated output yourself to find unusual values, incorrect entries, inconsistent formatting, or incomplete results. It remains essential when automated checks cannot reliably interpret context. section 2.5.3 section 5.5.3

Use manual evaluation to:

  • Review suspicious values after frequency checks such as value_counts(). section 2.5.3
  • Compare unusual records with domain knowledge before correcting them. section 2.5.3
  • Check whether generated lists follow the requested format and contain the intended number of items. section 5.5.3

A suspicious transaction

If nearly every transaction comes from New York and one comes from Los Angeles, inspect that record rather than automatically deleting it. The value may be an entry error or an important exception. Depending on the context, accept, remove, cap, or transform the outlier. section 2.5.3

Listing 5.5 Generating keywords via ChatGPT API
from openai import OpenAI

def generate_keywords(temperature=0.5, max_tokens=150):
    client = OpenAI(
        api_key="your_api_key", # Make sure to use your actual API key here
    )

    prompt = """Generate a list of 20 keywords indicating positive 
    sentiment to be used for searching customer reviews in Portuguese."""

    try:
        response = client.chat.completions.create(
            messages=[
                {
                    "role": "user",
                    "content": prompt,
                }
            ],
            model="gpt-4-0125-preview", # Replace with the model you have 
            access to
            temperature=temperature,
            max_tokens=max_tokens,
        )
        return(response.choices[0].message.content.split("\n"))

    except Exception as e:
        print(f"An error occurred: {str(e)}")

# Example usage
print("Generated Keywords:")
print(generate_keywords())

Inspect the Python API workflow that generates Portuguese positive-sentiment keywords, then verify the response format, length, and repeatability manually. section 5.5.3

How Starting Data Analytics with Generative AI and Python covers it

How deep it goes
Combines frequency checks, domain knowledge, and direct review, but leaves outlier treatment to contextual judgment.
Examples
Uses rare-value checks, a New York–Los Angeles transaction contrast, and Portuguese sentiment-keyword output.
What it assumes
Assumes domain knowledge for judging anomalies and teaches review alongside simple frequency-based checks.
What you can do after
Diagnose data and output problems, then choose context-appropriate corrections or prompt adjustments.
How it connects
Connects data quality, outlier detection, domain knowledge, post-processing, and prompt tuning.

Also explained in

Compare how 3 books explain manual evaluation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Starting Data Analytics with Generative AI and Python. The section links point to the parts of the book it draws on.