1 of 56

https://kku.world/p8a1d

2 of 56

Prompt Engineering Basics for research.

3 of 56

What is Prompt?

  • A prompt is any input or series of instruction that helps generative AI models produce relevant and logical responses.

4 of 56

Writing effective prompt

  • 4 essentials domain
    • Clarity
    • Context
    • Precision
    • Role-Play/Persona pattern

5 of 56

Example Keyword for prompt

  • Write
  • Explain
  • List
  • Analyze
  • Design
  • Brainstorm
  • Rewrite
  • Summarize
  • Act as

6 of 56

Prompt Example

7 of 56

Clarity

  • Simple and straightforward, Use clear and concise language
  • Avoid jargon and complex terms
  • Provide explicit instructions

8 of 56

Clarity- Bad Example

  • Prompt: discuss the rectangular device process that take place in reading a book.

9 of 56

Clarity- Bad Example

  • Answer:
  • Certainly! Reading a book involves several processes that can be metaphorically described as "rectangular devices," each representing a different aspect or stage of the reading experience. Let's break down these processes:
  • 1. **Selection**:
  • - This is the first "rectangular device" where you choose a book to read. It could be based on recommendations, reviews, personal interests, or academic requirements. The selection process sets the stage for your engagement with the content.
  • 2. **Orientation**:
  • - Once you have chosen a book, you orient yourself to it. This involves understanding the genre, the author's background, the book's structure (chapters, sections), and perhaps even flipping through the pages to get a sense of its organization and style.
  • 3. **Engagement**:
  • - Here, the "rectangular device" involves deep diving into the content. You immerse yourself in the narrative or the information presented, absorbing ideas, characters, plots, arguments, or concepts depending on the type of book.
  • 4. **Comprehension**:
  • - As you read, comprehension is another crucial rectangular device. You strive to understand the meaning of the text—interpreting themes, grasping key points, and following the author's intended message or storyline.

10 of 56

Clarity- Good Example

  • Prompt: Explain the process of the tablet for browsing and reading e-book both online and on-device.

11 of 56

Clarity- Good Example

  • Answer:The process of using a tablet for browsing and reading e-books, whether online or offline, involves several steps that enhance the convenience and accessibility of reading digital content. Here’s a detailed explanation of the process:
  • 1. Device Selection and Setup:
  • First, you choose a tablet suitable for reading e-books. Tablets like iPads, Android tablets (Samsung Galaxy Tab, Google Pixel Slate), or dedicated e-readers (Kindle Fire, Kobo) are popular choices.
  • Set up the tablet by connecting to Wi-Fi (for online reading) and ensuring it’s charged or plugged in.
  • 2. Accessing E-Book Platforms:
  • Online Reading:
    • Open a web browser or dedicated e-book app (like Kindle app, Apple Books, Google Play Books) on your tablet.
    • Navigate to an e-book platform such as Amazon Kindle Store, Apple Books Store, Google Play Books Store, or library e-book services like OverDrive or Libby.
    • Browse for e-books using categories, genres, or search functions.
  • On-Device Reading:
    • If you have e-books stored on your tablet, access them through a dedicated e-reader app or through the tablet’s file management system.
    • Some tablets come with pre-installed e-book apps or allow you to download apps from app stores.
  • 3. Purchasing or Borrowing E-Books:
  • Online Reading:
    • Purchase e-books directly from the platform (e.g., Amazon Kindle Store) using your account.
    • Some platforms also offer free e-books or allow borrowing e-books if you have a subscription (like Kindle Unlimited or library borrowing services).
  • On-Device Reading:
    • Transfer e-books from your computer to the tablet via USB or through cloud storage services like Dropbox or Google Drive.
    • Sync e-books purchased from platforms like Amazon or Apple if they support cross-device syncing.

12 of 56

Context

  • Established the Context
  • Include relevant information

13 of 56

Context- Bad Example

  • Prompt: Write what is Python and what it can able to do.

14 of 56

Context- Bad Example

  • Answer: Python is a high-level programming language known for its simplicity and readability. It was created by Guido van Rossum and first released in 1991. Python has gained immense popularity due to its versatility and ease of use in various domains including web development, data analysis, artificial intelligence, scientific computing, and more.
  • Key Features of Python:
  • Readable and Simple Syntax: Python's syntax is designed to be clear and readable, making it easier to write and understand code.
  • Interpreted and Interactive: Python is an interpreted language, which means that code can be executed directly without the need for compilation. This makes development faster and easier for beginners.

15 of 56

Context- Good Example

  • Prompt: Write what is the snake call python and what it can able to do in order to hunt and eat its prey in the nature.

16 of 56

Context- Good Example

  • Answer: The snake called the python is a formidable predator found in various parts of the world, known for its impressive size and hunting abilities. Here’s how a python hunts and eats its prey in nature:
  • Ambush Predation: Pythons are ambush predators, relying on stealth and patience to catch their prey. They often lie in wait, camouflaged in their surroundings, until an unsuspecting animal comes within striking distance.
  • Coiling and Constriction: When the prey is close enough, the python strikes with incredible speed, using its sharp teeth to grasp and secure the prey. It then quickly coils its muscular body around the animal.
  • Constriction: Constriction is a key method pythons use to subdue their prey. By tightening its coils around the prey, the python cuts off blood flow and prevents breathing, eventually leading to the prey's suffocation.

17 of 56

Precision

  • Be specific
  • Use example

18 of 56

Precision- Bad Example

  • Prompt: Tell me about programming languages for web development.

19 of 56

Precision- Bad Example

  • Answer: Web development relies on a variety of programming languages and technologies to create interactive and functional websites and web applications. Here are some key programming languages and technologies commonly used in web development:
  • HTML (HyperText Markup Language):
    1. Purpose: Defines the structure and content of web pages.
    2. Features: Uses tags to mark up elements such as headings, paragraphs, images, links, etc.
    3. Role: Fundamental for creating the basic layout and content of web pages.
  • CSS (Cascading Style Sheets):
    • Purpose: Controls the presentation and styling of web pages.
    • Features: Specifies colors, fonts, layouts, and other visual aspects.
    • Role: Enhances the appearance and user experience of web pages created with HTML.

20 of 56

Precision- Good Example

  • Prompt: Explain the key features that make Python a popular choice for web development.

21 of 56

Precision- Good Example

  • Answer: Python has become a popular choice for web development due to several key features and advantages it offers. Here are the main reasons why Python is widely used in web development:
  • Ease of Learning and Use:
    1. Clear and Readable Syntax: Python's syntax is clean, concise, and easy to understand, which reduces the cost of program maintenance and development.
    2. Beginner-Friendly: Its simplicity makes it accessible for beginners, allowing them to quickly start coding and building web applications.
  • Rich Ecosystem and Libraries:
    • Extensive Standard Library: Python comes with a comprehensive standard library that provides modules and packages for various tasks, reducing the need for external dependencies.
    • Third-party Libraries and Frameworks: Python has a vast ecosystem of third-party libraries and frameworks like Django, Flask, and Pyramid that streamline web development tasks such as URL routing, form handling, database interaction, and more.

22 of 56

Persona

  • Assume the persona
  • Provide context for role-play

23 of 56

Persona-Using

  • Prompt: Act as Zoologist, Write me What is python?

  • Answer: Certainly! In the realm of zoology, "Python" refers to a group of non-venomous constricting snakes belonging to the family Pythonidae. These magnificent reptiles are known for their robust bodies, keen senses, and remarkable adaptability to various habitats across Africa, Asia, and Australia.
  • Physically, pythons are characterized by their muscular build, which aids in suffocating prey by constriction. They possess heat-sensitive pits along their lips, enabling them to detect warm-blooded prey even in darkness. Pythons exhibit a diverse range of sizes, from the diminutive pygmy python to the massive reticulated python, which can exceed 20 feet in length.

24 of 56

Persona-Using

  • Prompt: Act as Programmer, Write me What is Python?
  • Answer: In the realm of programming, Python is a high-level, interpreted programming language known for its simplicity and readability. Created by Guido van Rossum and first released in 1991, Python has gained immense popularity due to its versatility and ease of use in various domains such as web development, data analysis, artificial intelligence, scientific computing, and more.
  • Key features of Python include:
  • Readable and Simple Syntax: Python emphasizes readability with its clean and straightforward syntax, making it easier to write and maintain code.
  • Interpreted and Interactive: Python is an interpreted language, meaning that code can be executed directly without the need for compilation. It also supports interactive mode, allowing quick experimentation and testing of code snippets

25 of 56

Prompt Example

Act as a friendly high school biology teacher who is explaining the process of photosynthesis to students who are learning about plant biology for the first time. Explain the process of photosynthesis in a clear and engaging way, focusing specifically on the role of chlorophyll. Use the example of how sunlight and carbon dioxide contribute to the production of glucose in plants, and ensure the explanation is easy for beginners to understand, using relatable analogies and a conversational tone.

Green-Persona

Light blue - Clarity

Pink - Precision

Orange - Context

25

26 of 56

Text-to-Text prompt technique

  • Task specification
    • For example: Translate this paragraph into French
  • Contextual Guidance
    • For example
    • Task: Introduce landmark in Khon Kaen
    • Generic prompt: Write me a short paragraph about Khon Kaen
    • Contextual guidance prompt: Write me a short paragraph about Khon Kaen, highlighting in its iconic landmark
  • Domain expertise
    • Text prompt uses domain-specific terminology in specialized field.

27 of 56

Text-to-Text prompt technique

  • Bias Mitigation
    • Text prompt provide explicit instructions to generate the neutral response
  • Framing
    • Text prompt guide LLM to generate response within the required boundaries.
  • Zero Shot prompt
    • A method wherein model generate meaningful response to prompt without prior training
  • User feedback loop
    • User will keep ask the LLM to adjust the response until it was satisfied.
  • Few shot prompting
    • technique used in prompt engineering where you provide the AI model with a few examples of the type of response or task you want it to perform before asking it to generate a new response.

28 of 56

Text-to-Text prompt technique

  • System prompt
    • provide starting sentence and let generative AI to complete it.

29 of 56

Evaluate the prompt by using RACCCA Framework

  • This framework stands for
    • Relevance (Does the response directly addressed the prompt.?)
    • Accuracy (Is the response factually correct?)
    • Completeness (Does the response cover all essential aspects of the prompt?)
    • Clarity (Is the response understandable?)
    • Coherence (Is the response logically structured?)
    • Appropriateness. (Is the response suitable for the audience and context?)
  • We use this framework for evaluate the output from the prompts that we use in ChatGPT. A good prompts will return the output that follow this framework.

30 of 56

Precautions of use

1.Ambiguity- If the prompt is not specific or doesn’t has a context

2.Bias reinforcement -If prompt included biased language , preconceived notions or assumptions regarding gender, race, or other sensitive factors.

3.Overfitting - Too specific prompt

4.Lack of context - Without context the response will ambiguity or not relate or cannot provide insight

5.Ethical considerations

6.Unintended side effects - If prompt is too complex or contradiction, the model might get confuse and cannot provide the properly answer

30

31 of 56

Precautions of use

7.Unrealistic dependency

8.Over-reliance on generative AI - might lead to a reduction in creative and critical thinking and the ability to make independent judgments about the quality of writing.

9.Publisher policy - Publishers have different policies about using AI in manuscript, please carefully review these polices before start use AI in your paper.

10.Plagiarism - Generative AI is trained from the exist publicly text that might include some articles.

31

32 of 56

Limitation

1.Can’t provide the content that protected by copyright law

2.Sometime ChatGPT can hallucinating.

3.ChatGPT given the answer that not matched our desire, depend on the prompt we used.

4. English is much more better than Thai.

5.ChatGPT cannot think, its answer is come from the data it trained from.

32

33 of 56

Using AI in academic writing

According to the study (Using artificial intelligence in academic writing and research: An essential productivity tool), The paper identifies six core domains where AI significantly supports academic writing and research:

1.Idea Development and Research Design

2.Content Development and Structuring

3.Literature Review and Synthesis

4.Data Management and Analysis

5.Editing, Review, and Publishing Support

6.Communication, Outreach, and Ethical Compliance.

33

34 of 56

Idea Development and Research Design

AI can support idea generation by providing insights from current trends, historical data, and cross-disciplinary studies. For example, AI might Identify a Relevant Research Topic, suggest hypotheses, Brainstorming and offer recommendations for study designs.

34

35 of 56

Example prompts

Identify a Relevant Research Topic:

1.Suggest relevant [SUBFIELD] in field of [FIELD] that is suitable for aim and scope of [JOURNAL TITLE] and would have high chance of acceptance.

2.What are the latest research areas in the field of [TOPIC]?

3.Can you help identify potential research topics for a [LEVEL] in the fields of [FIELD]? Please provide a list of at least 10 topics. For each topic, include a brief explanation of why it is interesting or significant, and why it was selected.

Hypothesis Creation:

1.Generate a list of research hypotheses related to [TOPIC SENTENCE]

35

36 of 56

Example prompts

Brainstorming:

1.I would like to do some brainstorming for my [TYPE OF PUBLICATION] topic. The general topic I’m interested in is [TOPIC]. Could you

please take on the role of a research adviser and ask me questions that will help brainstorm a project?

36

37 of 56

Example prompts

Brainstorming:

2.From now on, this chat will involve 3 persons based on the personas provided. The purpose of this chat is for brainstorming and discussion from each perspective about the [TOPIC] in the [FIELD] field..

Please adhere to the following personas:

1. [PERSONA1.] “””Including persona, context and expertise

2. [PERSONA2] “””Including persona, context and expertise

3. [PERSONA3] “””Including persona, context and expertise

You should give 3 responses, one response from each persona, using this format:

(PERSONA1): This is PERSONA1's response. (PERSONA2): This is PERSONA2's response. (PERSONA3): This is PERSONA3's response.

If you understand, please respond with "I kao jai leaw" for each persona and explain what to do, then assume your roles from the next answer.

37

38 of 56

Example prompts

Design study:

1.Act as a researcher, design an experiment for [TOPIC]

2.Could you create a detailed research plan for [Research Title], including a step-by-step timeline that ensures completion by [Deadline]? Please include key milestones, tasks, and any necessary resources or considerations.

38

39 of 56

Content Development and Structuring

AI assists in drafting and structuring content by expanding text, offering predictive text suggestions, and providing autocompletion features. It can also help outline documents and analyze the emotional tone to ensure appropriate audience engagement.

39

40 of 56

Example prompts

Predictive text suggestions:

1.The AI era is coming, it has potential to revolunize…

Outline:

1.Generate an outline for [TOPIC SENTENCE]

2.Provide me a guidance on what information I should include in the outline for [TYPE OF PUBLICATION] about [TOPIC]?

3.Developing a detailed outline for a scientific review article on the [TOPIC]? Please include sections for introduction, literature review, methodology, findings, discussion, and conclusion, and suggest relevant subheadings for each section to ensure thorough coverage of the topic.

40

41 of 56

Literature Review and Synthesis

AI facilitates literature review by extracting and analyzing vast amounts of information and synthesizing it into coherent summaries and able to providing context for each article. It can also perform semantic analysis to identify key trends and gaps in the literature.

41

42 of 56

Example prompts

Finding literature:

1.List the [PUBLICATION TYPE AND DOI] that relevant to [TOPIC]. These titles must be published during [YEAR] and ensure that the search results are verified and updated to include the most recent advancements in the field. Provide at least [NUMBER] titles.

42

43 of 56

Example prompts

Identify gap:

1.Identify a gap in research in [TOPIC] [ADD MORE CONTEXT AND DETAIL]

2.Synthesize the current literature on the effects of [TOPIC]? Please provide a comparative analysis and highlight any emerging trends or gaps in the research.

Summarized:

1.Can you summarize the findings of the latest review article on [TOPIC]?

2.Shorten to [1000] characters in [K12 student language] : [Paragraphs]

43

44 of 56

Example prompts

Generate Literature review:

Conduct a literature review on [TOPIC]. Must write suit the [PUBLICATION FORMAT] format. And provide in-text citations for sentences, phrase that you cited and list all the references papers at the end of this literature review. In-text citation and references must be [REFERENCE STYLE] styles. And this literature review must be at least [NUMBER] words lenght.

*Not recommended to use AI to generate the whole literature review

44

45 of 56

Data Management and Analysis

AI tools enhance data management by automating data curation, ensuring accuracy and accessibility, and providing detailed data visualizations and analyses.

45

46 of 56

Example prompts

Analyze and interpret the raw data from a study on the effects of a new educational intervention on student performance? Please provide a detailed summary of key findings, assess statistical significance, and discuss potential implications for educational practice. Ensure to include any relevant charts or graphs to support the analysis.

46

47 of 56

Editing, Review, and Publishing Support

AI assists in refining writing by providing examples, proofreading, editing, word choice, translation, drafting abstracts, suggesting improvements and paraphrasing.

It can also manage peer review processes, help authors respond to reviewer comments, and track manuscript submissions.

47

48 of 56

Example prompts

Abstract:

1.Generate an abstract for a scientific paper based on the following information: [PARAGRAPHS]? Ensure the abstract is concise, accurately reflects the main points, and adheres to standard scientific abstract conventions.

2.Give me abstract according to the pattern of open access articles on [JOURNAL TITLE].

3.Generate an abstract of [PARAGARPH] and must include the purpose of the study, the methodology, the participants, data analysis, the main findings, any limitations, future research, and contributions. Use academic language and have [NUMBER OF WORD] words length.

48

49 of 56

Example prompts

Refining writing:

1.Refine the style of my [paragraphs] to align with [specific academic writing standards]? Please focus on identify and highlight grammatical errors, ambiguous sentence structures, repetitive phrases, improving clarity, coherence, formal tone, and adherence to citation guidelines.

2.Provide detailed feedback on [paragraphs], focusing on areas such as structure, clarity, style, and coherence? Please suggest specific improvements and examples to enhance the overall quality of the writing.

49

50 of 56

Example prompts

Refining writing:

3.Write a transition sentence to seamlessly connect the following two paragraphs: [Paragraph 1] and [Paragraph 2]? Please ensure the transition maintains coherence and flow between the ideas presented in both paragraphs.

4.Review this [abstract/manuscript/proposal, etc.] draft and suggest where the grammar and/or syntax could be improved.

5.Review this [abstract/manuscript/proposal, etc.] draft and suggest where the writing style could be changed to conform with [JOURNAL/STANDARD] writing style.

50

51 of 56

Example prompts

Rewrite:

Rewrite the following paragraph using [simpler language and shorter sentences], making it suitable for [non-native English speakers]: [Paragraph]. Ensure the revised version retains the original meaning while enhancing readability and comprehension.

51

52 of 56

Communication, Outreach, and Ethical Compliance

AI enhances communication and outreach by tailoring content for different platforms, engaging audiences through social media, and ensuring language accessibility through translation tools. It also aids in maintaining ethical standards by detecting plagiarism and ensuring research integrity.

52

53 of 56

Example prompts

Provide strategies for using AI tools to enhance the dissemination of research findings on social media while ensuring ethical compliance? Please include examples of tools and ethical considerations.

53

54 of 56

References

Giray, L. (2023). Prompt Engineering with ChatGPT: A Guide for Academic Writers. In Annals of Biomedical Engineering (Vol. 51, Issue 12, pp. 2629–2633). Springer. https://doi.org/10.1007/s10439-023-03272-4

Huang, J., & Tan, M. (2023). The role of ChatGPT in scientific communication: writing better scientific review articles. In Am J Cancer Res (Vol. 13, Issue 4). www.ajcr.us/

Ingley, S. J., & Pack, A. (2023). Leveraging AI tools to develop the writer rather than the writing. In Trends in Ecology and Evolution (Vol. 38, Issue 9, pp. 785–787). Elsevier Ltd. https://doi.org/10.1016/j.tree.2023.05.007

55 of 56

References

Khalifa, M., & Albadawy, M. (2024). Using artificial intelligence in academic writing and research: An essential productivity tool. In Computer Methods and Programs in Biomedicine Update (Vol. 5). Elsevier B.V. https://doi.org/10.1016/j.cmpbup.2024.100145

Khlaif, Z. N., Mousa, A., Hattab, M. K., Itmazi, J., Hassan, A. A., Sanmugam, M., & Ayyoub, A. (2023). The Potential and Concerns of Using AI in Scientific Research: ChatGPT Performance Evaluation. JMIR Medical Education, 9(1). https://doi.org/10.2196/47049

Májovský, M., Černý, M., Kasal, M., Komarc, M., & Netuka, D. (2023). Artificial Intelligence Can Generate Fraudulent but Authentic-Looking Scientific Medical Articles: Pandora’s Box Has Been Opened. JOURNAL OF MEDICAL INTERNET RESEARCH, 25. https://doi.org/10.2196/46924

56 of 56

References

Course online on Coursera

1.Generative AI: Prompt Engineering Basics by IBM

URL:https://www.coursera.org/learn/generative-ai-prompt-engineering-for-everyone/

2.AI Foundations: Prompt Engineering with ChatGPT by Arizona State University

URL:https://www.coursera.org/learn/ai-foundations-prompt-engineering-with-chatgpt

56