promptbook 0.67.0-2 โ†’ 0.67.0-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +21 -37
  2. package/package.json +17 -17
package/README.md CHANGED
@@ -20,37 +20,23 @@ Supercharge your use of large language models
20
20
 
21
21
  ## ๐Ÿค The Promptbook Whitepaper
22
22
 
23
- When you have a simple, single prompt for ChatGPT, GPT-4, Anthropic Claude, Google Gemini, Llama 2, or whatever, it doesn't matter how it is integrated. Whether it's the direct calling of a REST API, using the SDK, hardcoding the prompt in the source code, or importing a text file, the process remains the same.
23
+ If you have a simple, single prompt for ChatGPT, GPT-4, Anthropic Claude, Google Gemini, Llama 2, or whatever, it doesn't matter how you integrate it. Whether it's calling a REST API directly, using the SDK, hardcoding the prompt into the source code, or importing a text file, the process remains the same.
24
24
 
25
- If you need something more advanced or want to extend the capabilities of LLMs, you generally have three ways to proceed:
25
+ But often you will struggle with the limitations of LLMs, such as hallucinations, off-topic responses, poor quality output, language drift, word repetition repetition repetition repetition or misuse, lack of context, or just plain w๐’†๐ขrd responses. When this happens, you generally have three options:
26
26
 
27
27
  1. **Fine-tune** the model to your specifications or even train your own.
28
28
  2. **Prompt-engineer** the prompt to the best shape you can achieve.
29
- 3. Use **multiple prompts** in a pipeline to get the best result.
30
-
31
- In any of these situations, but especially in (3), the Promptbook library can make your life easier and make **orchestraror for your prompts**.
32
-
33
- - **Separation of concerns** between prompt engineer and programmer; between code files and prompt files; and between prompts and their execution logic.
34
- - Set up a **common format** for prompts that is interchangeable between projects and language/technology stacks.
35
- - **Preprocessing** and cleaning the input data from the user.
36
- - Use default values - **Jokers** to bypass some parts of the pipeline.
37
- - **Expect** some specific output from the model.
38
- - **Retry** mismatched outputs.
39
- - **Combine** multiple models together.
40
- - Interactive **User interaction** with the model and the user.
41
- - Leverage **external** sources (like ChatGPT plugins or OpenAI's GPTs).
42
- - Simplify your code to be **DRY** and not repeat all the boilerplate code for each prompt.
43
- - **Versioning** of promptbooks
44
- - **Reuse** parts of promptbooks in/between projects.
45
- - Run the LLM **optimally** in parallel, with the best _cost/quality_ ratio or _speed/quality_ ratio.
46
- - **Execution report** to see what happened during the execution.
47
- - **Logging** the results of the promptbooks.
48
- - _(Not ready yet)_ **Caching** calls to LLMs to save money and time.
49
- - _(Not ready yet)_ Extend one prompt book from another one.
50
- - _(Not ready yet)_ Leverage the **streaming** to make super cool UI/UX.
51
- - _(Not ready yet)_ **A/B testing** to determine which prompt works best for the job.
29
+ 3. Use **multiple prompts** in a [pipeline](https://github.com/webgptorg/promptbook/discussions/64) to get the best result.
52
30
 
31
+ In all of these situations, but especially in 3., the Promptbook library can make your life easier.
53
32
 
33
+ - [**Separates concerns**](https://github.com/webgptorg/promptbook/discussions/32) between prompt-engineer and programmer, between code files and prompt files, and between prompts and their execution logic.
34
+ - Establishes a [**common format `.ptbk.md`**](https://github.com/webgptorg/promptbook/discussions/85) that can be used to describe your prompt business logic without having to write code or deal with the technicalities of LLMs.
35
+ - **Forget** about **low-level details** like choosing the right model, tokens, context size, temperature, top-k, top-p, or kernel sampling. **Just write your intent** and [**persona**](https://github.com/webgptorg/promptbook/discussions/22) who should be responsible for the task and let the library do the rest.
36
+ - Has built-in **orchestration** of [pipeline](https://github.com/webgptorg/promptbook/discussions/64) execution and many tools to make the process easier, more reliable, and more efficient, such as caching, [compilation+preparation](https://github.com/webgptorg/promptbook/discussions/78), [just-in-time fine-tuning](https://github.com/webgptorg/promptbook/discussions/33), [expectation-aware generation](https://github.com/webgptorg/promptbook/discussions/37), [agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39), and more.
37
+ - Sometimes even the best prompts with the best framework like Promptbook `:)` can't avoid the problems. In this case, the library has built-in **[anomaly detection](https://github.com/webgptorg/promptbook/discussions/40) and logging** to help you find and fix the problems.
38
+ - Promptbook has built in versioning. You can test multiple **A/B versions** of pipelines and see which one works best.
39
+ - Promptbook is designed to do [**RAG** (Retrieval-Augmented Generation)](https://github.com/webgptorg/promptbook/discussions/41) and other advanced techniques. You can use **knowledge** to improve the quality of the output.
54
40
 
55
41
  ## ๐Ÿง” Promptbook _(for prompt-engeneers)_
56
42
 
@@ -94,9 +80,7 @@ File `write-website-content.ptbk.md`:
94
80
  >
95
81
  > ## โœจ Improving the title
96
82
  >
97
- > - MODEL VARIANT Chat
98
- > - MODEL NAME `gpt-4`
99
- > - POSTPROCESSING `unwrapResult`
83
+ > - PERSONA Jane, Copywriter and Marketing Specialist.
100
84
  >
101
85
  > ```
102
86
  > As an experienced marketing specialist, you have been entrusted with improving the name of your client's business.
@@ -130,9 +114,7 @@ File `write-website-content.ptbk.md`:
130
114
  >
131
115
  > ## ๐Ÿฐ Cunning subtitle
132
116
  >
133
- > - MODEL VARIANT Chat
134
- > - MODEL NAME `gpt-4`
135
- > - POSTPROCESSING `unwrapResult`
117
+ > - PERSONA Josh, a copywriter, tasked with creating a claim for the website.
136
118
  >
137
119
  > ```
138
120
  > As an experienced copywriter, you have been entrusted with creating a claim for the "{title}" web page.
@@ -152,8 +134,7 @@ File `write-website-content.ptbk.md`:
152
134
  >
153
135
  > ## ๐Ÿšฆ Keyword analysis
154
136
  >
155
- > - MODEL VARIANT Chat
156
- > - MODEL NAME `gpt-4`
137
+ > - PERSONA Paul, extremely creative SEO specialist.
157
138
  >
158
139
  > ```
159
140
  > As an experienced SEO specialist, you have been entrusted with creating keywords for the website "{title}".
@@ -197,8 +178,7 @@ File `write-website-content.ptbk.md`:
197
178
  >
198
179
  > ## ๐Ÿ–‹ Write the content
199
180
  >
200
- > - MODEL VARIANT Completion
201
- > - MODEL NAME `gpt-3.5-turbo-instruct`
181
+ > - PERSONA Jane
202
182
  >
203
183
  > ```
204
184
  > As an experienced copywriter and web designer, you have been entrusted with creating text for a new website {title}.
@@ -377,7 +357,12 @@ The following glossary is used to clarify certain concepts:
377
357
 
378
358
  ### โž– When not to use
379
359
 
380
- - When you are writing just a simple chatbot without any extra logic, just system messages
360
+ - When you have already implemented single simple prompt and it works fine for your job
361
+ - When [OpenAI Assistant (GPTs)](https://help.openai.com/en/articles/8673914-gpts-vs-assistants) is enough for you
362
+ - When you need streaming _(this may be implemented in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/102))_.
363
+ - When you need to use something other than JavaScript or TypeScript _(other languages are on the way, [see the discussion](https://github.com/webgptorg/promptbook/discussions/101))_
364
+ - When your main focus is on something other than text - like images, audio, video, spreadsheets _(other media types may be added in the future, [see discussion](https://github.com/webgptorg/promptbook/discussions/103))_
365
+ - When you need to use recursion _([see the discussion](https://github.com/webgptorg/promptbook/discussions/38))_
381
366
 
382
367
  ## ๐Ÿœ Known issues
383
368
 
@@ -386,7 +371,6 @@ The following glossary is used to clarify certain concepts:
386
371
 
387
372
  ## ๐Ÿงผ Intentionally not implemented features
388
373
 
389
-
390
374
  - [โžฟ No recursion](https://github.com/webgptorg/promptbook/discussions/38)
391
375
  - [๐Ÿณ There are no types, just strings](https://github.com/webgptorg/promptbook/discussions/52)
392
376
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptbook",
3
- "version": "0.67.0-2",
3
+ "version": "0.67.0-3",
4
4
  "description": "Supercharge your use of large language models",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -44,23 +44,23 @@
44
44
  }
45
45
  ],
46
46
  "peerDependencies": {
47
- "@promptbook/core": "0.67.0-2"
47
+ "@promptbook/core": "0.67.0-3"
48
48
  },
49
49
  "dependencies": {
50
- "@promptbook/anthropic-claude": "0.67.0-2",
51
- "@promptbook/azure-openai": "0.67.0-2",
52
- "@promptbook/browser": "0.67.0-2",
53
- "@promptbook/cli": "0.67.0-2",
54
- "@promptbook/core": "0.67.0-2",
55
- "@promptbook/execute-javascript": "0.67.0-2",
56
- "@promptbook/fake-llm": "0.67.0-2",
57
- "@promptbook/langtail": "0.67.0-2",
58
- "@promptbook/markdown-utils": "0.67.0-2",
59
- "@promptbook/node": "0.67.0-2",
60
- "@promptbook/openai": "0.67.0-2",
61
- "@promptbook/remote-client": "0.67.0-2",
62
- "@promptbook/remote-server": "0.67.0-2",
63
- "@promptbook/types": "0.67.0-2",
64
- "@promptbook/utils": "0.67.0-2"
50
+ "@promptbook/anthropic-claude": "0.67.0-3",
51
+ "@promptbook/azure-openai": "0.67.0-3",
52
+ "@promptbook/browser": "0.67.0-3",
53
+ "@promptbook/cli": "0.67.0-3",
54
+ "@promptbook/core": "0.67.0-3",
55
+ "@promptbook/execute-javascript": "0.67.0-3",
56
+ "@promptbook/fake-llm": "0.67.0-3",
57
+ "@promptbook/langtail": "0.67.0-3",
58
+ "@promptbook/markdown-utils": "0.67.0-3",
59
+ "@promptbook/node": "0.67.0-3",
60
+ "@promptbook/openai": "0.67.0-3",
61
+ "@promptbook/remote-client": "0.67.0-3",
62
+ "@promptbook/remote-server": "0.67.0-3",
63
+ "@promptbook/types": "0.67.0-3",
64
+ "@promptbook/utils": "0.67.0-3"
65
65
  }
66
66
  }