-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
614e445
commit 22f57b3
Showing
8 changed files
with
215 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
--- | ||
title: "Markdown badges" | ||
--- | ||
|
||
Feel free to use any of these in your own projects to share which prompt eng technique you used | ||
|
||
### Active Prompting | ||
|
||
[![Active Prompting](https://img.shields.io/badge/Active_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Active Prompting](https://img.shields.io/badge/Active_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Automatic Prompt Engineering (APE) | ||
|
||
[![Automatic Prompt Engineering (APE)](https://img.shields.io/badge/Automatic__Prompt__Engineering__APE-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Automatic Prompt Engineering (APE)](https://img.shields.io/badge/Automatic__Prompt__Engineering__APE-blue)](https://shields.io) | ||
``` | ||
|
||
### Certainty/Uncertainty Prompting | ||
|
||
[![Certainty/Uncertainty Prompting](https://img.shields.io/badge/Certainty_/_Uncertainty__Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Certainty/Uncertainty Prompting](https://img.shields.io/badge/Certainty_/_Uncertainty__Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Chain-of-Density (CoD) Prompting | ||
|
||
[![Chain-of-Density (CoD) Prompting](https://img.shields.io/badge/Chain--of--Density__CoD__Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Chain-of-Density (CoD) Prompting](https://img.shields.io/badge/Chain--of--Density__CoD__Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Chain-of-Thought (CoT) Prompting | ||
|
||
[![Chain-of-Thought (CoT) Prompting](https://img.shields.io/badge/Chain--of--Thought__CoT__Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Chain-of-Thought (CoT) Prompting](https://img.shields.io/badge/Chain--of--Thought__CoT__Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Directional-Stimulus Prompting | ||
|
||
[![Directional-Stimulus Prompting](https://img.shields.io/badge/Directional--Stimulus_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Directional-Stimulus Prompting](https://img.shields.io/badge/Directional--Stimulus_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Few-Shot Prompting | ||
|
||
[![Few-Shot Prompting](https://img.shields.io/badge/Few--Shot_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Few-Shot Prompting](https://img.shields.io/badge/Few--Shot_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### General Knowledge Prompting | ||
|
||
[![General Knowledge Prompting](https://img.shields.io/badge/General__Knowledge_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![General Knowledge Prompting](https://img.shields.io/badge/General__Knowledge_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Generated Knowledge Prompting | ||
|
||
[![Generated Knowledge Prompting](https://img.shields.io/badge/Generated__Knowledge_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Generated Knowledge Prompting](https://img.shields.io/badge/Generated__Knowledge_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Instruction-Based Prompting | ||
|
||
[![Instruction-Based Prompting](https://img.shields.io/badge/Instruction--Based_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Instruction-Based Prompting](https://img.shields.io/badge/Instruction--Based_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Iterative Prompting | ||
|
||
[![Iterative Prompting](https://img.shields.io/badge/Iterative_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Iterative Prompting](https://img.shields.io/badge/Iterative_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Least-to-Most Prompting | ||
|
||
[![Least-to-Most Prompting](https://img.shields.io/badge/Least--to--Most_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Least-to-Most Prompting](https://img.shields.io/badge/Least--to--Most_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Multi-Turn Prompts | ||
|
||
[![Multi-Turn Prompts](https://img.shields.io/badge/Multi--Turn_Prompts-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Multi-Turn Prompts](https://img.shields.io/badge/Multi--Turn_Prompts-blue)](https://shields.io) | ||
``` | ||
|
||
### One-Shot Prompting | ||
|
||
[![One-Shot Prompting](https://img.shields.io/badge/One--Shot_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![One-Shot Prompting](https://img.shields.io/badge/One--Shot_Prompting-blue)](https://shields.io) | ||
```` | ||
|
||
### Prompt Chaining | ||
|
||
[![Prompt Chaining](https://img.shields.io/badge/Prompt__Chaining-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Prompt Chaining](https://img.shields.io/badge/Prompt__Chaining-blue)](https://shields.io) | ||
``` | ||
|
||
### Prompt Combination | ||
|
||
[![Prompt Combination](https://img.shields.io/badge/Prompt__Combination-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Prompt Combination](https://img.shields.io/badge/Prompt__Combination-blue)](https://shields.io) | ||
```` | ||
|
||
### ReAct (Reasoning + Acting) | ||
|
||
[![ReAct (Reasoning + Acting)](https://img.shields.io/badge/ReAct__Reasoning_+_Acting-blue)](https://shields.io) | ||
|
||
```markdown | ||
|
||
[![ReAct (Reasoning + Acting)](https://img.shields.io/badge/ReAct__Reasoning_+_Acting-blue)](https://shields.io) | ||
``` | ||
|
||
### Role-Based Prompting | ||
|
||
[![Role-Based Prompting](https://img.shields.io/badge/Role--Based_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Role-Based Prompting](https://img.shields.io/badge/Role--Based_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Self-Consistency Prompting | ||
|
||
[![Self-Consistency Prompting](https://img.shields.io/badge/Self--Consistency_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Self-Consistency Prompting](https://img.shields.io/badge/Self--Consistency_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
### Zero-Shot Prompting | ||
|
||
[![Zero-Shot Prompting](https://img.shields.io/badge/Zero--Shot_Prompting-blue)](https://shields.io) | ||
|
||
```markdown | ||
[![Zero-Shot Prompting](https://img.shields.io/badge/Zero--Shot_Prompting-blue)](https://shields.io) | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: "Markdown in Perplexity - Demanding Blocks" | ||
--- | ||
|
||
## Getting Perplexity AI to output markdown blocks | ||
|
||
### The Issue | ||
|
||
If you use Perplexity.AI to prompt an integrated LLM (say GPT-4o) the output, pulled from the integration, may loose some of its formatting. | ||
|
||
The backticks (```) which are used to separate code-fences (including markdown the LLM expects you'll want to copy in isolation from the rest of the text) are often stripped | ||
|
||
## Demo | ||
|
||
For example: | ||
|
||
I want to ask Perplexity to generate some nice markdown badges using the excellent Shields.io project. | ||
|
||
If I prompt like this: | ||
|
||
![alt text](../images/211124/3.png) | ||
|
||
Then we can see that the output generated is effectively useless: | ||
|
||
![alt text](../images/211124/4.png) | ||
|
||
The reason: loss of codefencing. | ||
|
||
## The Hack | ||
|
||
Now let me show you the workaround (this isn't necessary if you're using ChatGPT directly, but I have found it essential in Perplexity). | ||
|
||
Add an instruction like this to your prompt which explicitly tells the LLM to fence off the markdown in a codeblock so that you can copy it out: | ||
|
||
`Format the output like this (as a continuous block of markdown)` | ||
|
||
Or: | ||
|
||
`Format the output as a continuous block of markdown` | ||
|
||
For V2, I used the same prompt but with that tacked on: | ||
|
||
![alt text](../images/211124/v2.png) | ||
|
||
And as you can see, Perplexity has now formatted its output in a way that I can use: the badges I need for my project are fenced off in a codeblock and properly formatted. I can copy them straight out of the LLM and into my web project! | ||
|
||
![alt text](../images/211124/v2-2.png) |
File renamed without changes.