足ることを知らず

Data Science, global business, management and MBA

Day 142 MIT Sloan Fellows Class 2023, ChatGPT 3 "No code advanced techniques in ChatGPT"

Interactive Improvements in Communication
Improved interaction between ChatGPT and humans can lead to better overall outcomes. Here are some examples of how you can enhance the communication process:

1.Iterative question-answering: Refine your question based on the AI's response to gradually narrow down the information you're seeking. This can be helpful if the initial response isn't quite what you were looking for.

Example:

User: What are the benefits of exercise?
ChatGPT: Exercise has numerous benefits, including improved cardiovascular health, increased strength and flexibility, better mood, and weight management.

User: How does exercise improve mood?
ChatGPT: Exercise can improve mood by releasing endorphins, reducing stress hormones, increasing self-esteem, and promoting better sleep.

2.Active learning: Encourage the AI to ask clarifying questions when it encounters ambiguity or uncertainty. This can help produce more accurate and relevant answers.

Example:

User: Can you recommend a book for me?
ChatGPT: What genre are you interested in, or are there any specific topics or themes you prefer?

User: I enjoy science fiction and mysteries.
ChatGPT: Based on your preferences, I recommend "The City and the Stars" by Arthur C. Clarke for science fiction and "The Girl with the Dragon Tattoo" by Stieg Larsson for a mystery novel.

 

Types of prompts techniques

Here are some fundamental techniques in prompts.

  • Zero-shot Prompting : A technique where the model is provided with a single prompt and expected to generate a correct response without being given any prior examples.
  • Few-shot Prompting : A technique that provides the model with a few examples of the desired task before presenting the actual prompt, allowing it to learn from the examples and generate a relevant response.
  • Chain-of-Thought (CoT) Prompting : A method that structures the conversation as a series of chained prompts, iteratively refining and extracting more detailed information from the model.
  • Self-consistency :Ensuring that generated responses from the model are consistent with prior responses and the context, avoiding contradictions.
  • Generate knowledge Prompting:A technique that encourages the model to generate knowledge or relevant information based on a given prompt.
  • Automatic Prompt Enginner:
  • Active-Prompt:A method where the model generates a series of possible prompts that could lead to the desired response, essentially learning to ask questions that help it answer the main prompt.
  • Directional Stimulus Prompting:A technique that provides the model with a guiding prompt, steering it towards generating a specific type of response.
  • ReAct:A method that involves refining, evaluating, and combining prompts to improve the model's performance iteratively.
  • Multimodal CoT:An extension of Chain-of-Thought Prompting that incorporates multiple modalities, like text, images, and audio, to generate more comprehensive responses.
  • Graph Prompting: A technique that represents the relationship between entities and their properties as a graph, enabling the model to reason about and generate responses based on the graph's structure.

 

Prompts like coding

  1. Clearly define the problem or task.
  2. Break down the problem into smaller steps or components.
  3. Write the steps using a structured and organized format.
  4. Optionally, use common programming constructs such as loops, conditions, and functions to better express your intentions.

 

 

Example

Prompt:

Given a list of numbers, calculate the sum and average using a step-by-step approach.

Pseudo-code prompt:

  1. Initialize a variable called 'sum' with a value of 0.
  2. Iterate through the list of numbers.
  3. For each number, add it to the 'sum' variable.
  4. After iterating through the entire list, calculate the average by dividing the 'sum' by the number of elements in the list.
  5. Return the sum and average as the final output.

 

Placeholder and dynamic values

In ChatGPT, variables like $name are used to represent placeholders or dynamic values that can be replaced with real data during the conversation. While there isn't a fixed set of variables you can use in ChatGPT, you can create your own custom variables to represent different data types or information. Here are some examples of variables and their categories.

For example you can set the following prompts. 

Please summarize the information about myself and post the parameters you understand from the sentences as follows. 
"""
My name is Mike and 37th years old. I live in Boston, but I lived in London before. I am originally from Tokyo by the way.  My job title is data scientist and I am responsible for product development. I love playing baseball, but not play it frequently. I frequently go to sauna.  My favorite movie is "Back to the future".
"""
Here is variables you need to populate. 
Personal Information:

a. $name - Represents a person's name.
b. $age - Represents a person's age.
c. $location - Represents a person's location or city.
d. $occupation - Represents a person's job or profession.

Numeric Values:

a. $workexperience - Represents a generic number.
b. $internationalworkexperience - Represents a percentage value.

Context-specific Information:

a. $hobby - Represents a hobby.
b. $movieTitle - Represents his favorite movie title.

"""

Then, ChatGPT understands the parameters are informed or not and populate information automatically.

Then, you can ask some questions like

Does $name frequently enjoy $hobby?

ChatGPT answer would be as follows.

$name (Mike) enjoys playing baseball, which is one of his hobbies, but he does not play it frequently. However, he does frequently go to the sauna, which is another one of his hobbies.

 

This interaction would be much more useful when you want to extract very specific information with certain accuracy and dig into those information.