# Prompt Hacking

#### Get intuition on various prompt techniques by hacking around:

{% hint style="info" %}
Hint: Try these with smaller/old/text models which show log losses to get the intuition faster.
{% endhint %}

<details>

<summary>Tic Tac Toe                                                      (Easy, Structured Generation)</summary>

Chatgpt free version itself can play tic tac toe. But prompt the bot that wont lose but Draws or Wins if you make a mistake.

* First move will be from Human.
* Add explainability of why the bot made that move.

</details>

<details>

<summary>Is that a yes or no?                                          (Few shot, Inner monologue, Classification)</summary>

Examples the prompt should work on

```python
Q: Do you have a car?
R: I bought a green Austin-Healey 3000 last week.
```

```python
Q: Are you going to pick up the blue block?
R: The blue block is sticky
```

```python
Q: Is Mark here
R: His daughter has the measles
```

```python
Q: Do you have Netflix or Prime?
R: I have Hotstar
```

```python
Q: Do you want to hear that story?
R: ️😍
```

Solution inspiration

* spoiler ahead:
* <https://aclanthology.org/W94-0322.pdf> or a longer version by same authors: <https://aclanthology.org/J99-3004.pdf>

</details>

<details>

<summary>Solve me today’s Wordle                               (Instructional, Medium)</summary>

To keep it more challenging try to do with as many less examples as possible or using smaller models than 3.5 turbo

[Wordle - A daily word game](https://www.nytimes.com/games/wordle/index.html)

(DM for solution)

</details>

<details>

<summary>Don’t judge me (Big 5 traits)                     (Chain of Thought, Extraction, Domain)</summary>

If we give a dialogue between two persons that is sufficient enough to extract all 5 traits, write a prompt that can map the persons into their respective 3 scale likert Big 5 traits

Example:

John:

Openness: Low

Conscientiousness: High

Extraversion: Neutral

Agreeableness: Low

Neuroticism: Unsure

</details>

<details>

<summary>Your Design Thinking Intern                        (Domain, Instructional, Chaining )      </summary>

If we give couple user problem statements, like:

```python
Customer 1: The power button on my phone is broken. The warranty is still valid.
Customer 2: My display stopped working.
Customer 3: The customer service rep didn't answer my email.
Customer 4: Every time I call customer support I get no answer.
Customer 5: The display screen cracked and it's still under warranty.
Customer 6: My power button fell off the phone. That's ridiculous.
Customer 7: I'm so frustrated with this company.
Customer 8: When I use the power button too much, it stops working.
```

follow design thinking ideas loosely to come up with **a list of solutions** ranked using any product prioritisation framework.

Bonus: Do one day version, one week version and 11 star rating versionn for each problem.

![](https://3980091207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxwiB3tV6oLM7g7SThvsv%2Fuploads%2Fuuty2wTlYBsGq1G9Ldjh%2Fimage.png?alt=media\&token=d96beb15-ccdf-4627-8c12-cd499d9ffff8)

*Note: Doesn't have to generate working brilliant ideas, just learn to seperate roles and context*

Spoiler: [Rough solution inspiration](https://github.com/alexchaomander/SK-Recipes/tree/main/e6-design-chain/skills/DesignThinkingSkill)

</details>

<details>

<summary>Late night show Monologue Jokes             (Chain of Thought, Domain Knowledge, Tools)</summary>

Make AI write a joke given a news item

References:

* [Joke Writing Workshop Archives - Joe Toplyn](https://joetoplyn.com/category/joke-writing-workshop/)
* 6 characteristics every good monologue joke topic must have by Joe Toplyn

</details>

<details>

<summary>Solution Spoiler for: Late night show Monologue Jokes</summary>

![](https://3980091207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxwiB3tV6oLM7g7SThvsv%2Fuploads%2FqCBZ9ag4lVVRQ3GATz56%2Fimage.png?alt=media\&token=d491912d-68f8-478d-8957-b78a01a4a18a)

<https://arxiv.org/pdf/2306.13195.pdf>

Tools:

[Pyphen - Hyphenation in pure Python](https://pyphen.org/)

Internet search: Niche pop cult![](https://3980091207-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxwiB3tV6oLM7g7SThvsv%2Fuploads%2FVQmNA2BI7kOLIpmpt7ny%2Fimage.png?alt=media\&token=2e92512c-8daf-4f66-9a0a-bbc2f95b69bb)ure, latest similar news

</details>

***

WIP (dm @siddish\_ if you have any ideas)

```
Movie Recommender                       (Planning, Embeddings, HyDE)
```

```
Trip Planning                            (Sub-question decomposition) 
```

```
                                           (Theory of Mind)
```

```
                                        (Criticism, Retrospection)
```

```
                                        (Self Consistency, Multiple CoTs)
```

<pre><code><strong>5x5 Crosswords                             (Backtracking, Tree of Thoughts)
</strong></code></pre>

```
Sorting                                   (Refining, Aggregating, Graph of Thoughts)
```

<pre><code><strong>                                               (Agents)
</strong></code></pre>
