Man

Development & AI | Alper Akgun

LLM prompt examples & hints

September, 2023

Hints

1. Give simple tasks

2. Use instructions like "Write", "Classify", "Summarize", "Translate"

3. Be very specific, and avoid imprecise language

4. Say what to not and not what not to do.

5. Split tasks into simpler ones.

6. Ask the model to explain before answering.

Text Summarization

Summarizing a long text has many flavors and tactics. In one line, in two sentences, to a 5 year old, with bullet points.

.......
Explain the above in one sentence:
            

Information Extraction

Given a long text, you can ask for a short detail.

.......
Mention the criminal based in the paragraph above:
            

Question Answering

Answer the question based on the context below. Keep the answer short
and concise. Respond "Unsure about answer" if not sure about the
answer.

Context: ....

Question: Where did the alien come from

Answer:           

Text Classification

Sentiment based classification is one example

.......

Sentiment:
            

Conversation

The LLM can play a role, and you can keep a chat going on.

The following is a conversation with an cosmologist. The tone is
 technical and scientific.

Student: Hello, who are you?
Cosmologist: Greeting! How can I help you today?
Human: Can you tell me about the evaporation of blackholes?
AI:            

Code generation

You can ask the LLM to generate some code, autocomplete some code etc.

// Completion
console.log('Hello JavaScript');
....

// Create a Circle class with radius, area
class Circle {
...