×
towards a superhuman mind | microblog
    the blog
    /
    posts
    /
    23Aug02 | How to talk to ChatGPT | For Devs
    23Aug02 | How to talk to ChatGPT | For Devs

    23Aug02 | How to talk to ChatGPT | For Devs

    tags
    chatgptprompt-engineering

    All concepts are discussed in this short deeplearning.ai course.

    Principles

    • Principle I: Write clear and specific instructions
    • Principle II: Give the model time to “think”
    ‣

    Principle I:

    ‣

    Principle II:

    How to reduce model hallucinations?

    1. Find relevant info/quotes from the text
    2. Ask it to use those quotes to answer questions

    Iterative Prompt Development

    Iteratively analyze and refine your prompts:

    1. Try something
    2. Analyze where the result doesn’t give what you want
    3. Clarify instructions, give it more time to think
    4. Refine prompts with a batch of examples
    image

    Example:

    ‣
    1/ Generate a marketing product description
    ‣
    2/ Limit the number of words/sentences/characters
    ‣
    3/ Ask it to focus on aspects relevant to intended audience
    ‣
    4/ Ask it to extract information and organize it in a table

    In practice, you’d end up with a prompt like this only after multiple iterations. No way around it.

    ‣
    Rendered HTML output for the last prompt:

    Summarizing

    Several techniques to get the most out of GPT’s summarizing capabilities:

    ‣
    1/ Summarize with a word/sentence/character limit
    ‣
    2/ Summarize with a focus on shipping and delivery
    ‣
    3/ Summarize with a focus on price and value
    ‣
    4/ Try "extract" instead of "summarize"
    ‣
    5/ Batch

    Inference

    In just a few minutes you can make multiple systems for making inferences from text that would’ve taken many days or weeks for a skilled ML developer!

    ‣
    1/ Infer Sentiment
    ‣
    2/ Infer Emotions
    ‣
    3/ Infer Information
    ‣
    4/ Infer Topics

    Note: Output of LLMs is pretty inconsistent, so to be able to use its output in a prod env, we’d need to force a JSON output, and then parse it.

    Transforming

    ‣
    1/ Tone Transformation
    ‣
    2/ Format Conversion
    ‣
    3/ Proofread & Correct

    Also there’s translation!

    Expanding

    ‣
    Generate a longer piece of text from a small one

    Temperature

    ‣
    Represents the degree of exploration / randomness of the model.

    about me |

    about this microblog

    © DeepIris 3022 | ☕️ 🎶 | @zemahran

    LinkedInDiscordSpotify