From 43c885823a1b328334edb2b234006877e087b416 Mon Sep 17 00:00:00 2001 From: trojan-bumble-bee Date: Fri, 20 Sep 2024 07:14:03 +0000 Subject: [PATCH] fix(docs): minor grammar fixes --- website/docs/chains/02-map-reduce-chains.md | 2 +- .../getting-started-tutorial/01-setting-up-a-project.md | 2 +- .../02-generating-your-first-llm-output.md | 2 +- .../03-using-prompt-templates-and-parameters.md | 2 +- .../04-building-a-multi-step-chain.md | 6 +++--- .../05-summarizing-text-with-map-reduce.md | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/website/docs/chains/02-map-reduce-chains.md b/website/docs/chains/02-map-reduce-chains.md index a979ae7b..ba8e88a9 100644 --- a/website/docs/chains/02-map-reduce-chains.md +++ b/website/docs/chains/02-map-reduce-chains.md @@ -47,7 +47,7 @@ async fn main() -> Result<(), Box> { } ``` -n this example, we start by importing the necessary modules and defining the main function. We then create a new ChatGPT executor using the executor!() macro. +In this example, we start by importing the necessary modules and defining the main function. We then create a new ChatGPT executor using the executor!() macro. Next, we create the "map" and "reduce" steps using Step::for_prompt_template(). The "map" step is responsible for summarizing each article chunk, while the "reduce" step combines the summaries into a single output. diff --git a/website/docs/getting-started-tutorial/01-setting-up-a-project.md b/website/docs/getting-started-tutorial/01-setting-up-a-project.md index b2326464..98276e80 100644 --- a/website/docs/getting-started-tutorial/01-setting-up-a-project.md +++ b/website/docs/getting-started-tutorial/01-setting-up-a-project.md @@ -2,7 +2,7 @@ :::tip -Having problems? Don't worry reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. +Having problems? Don't worry, reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. ::: diff --git a/website/docs/getting-started-tutorial/02-generating-your-first-llm-output.md b/website/docs/getting-started-tutorial/02-generating-your-first-llm-output.md index aa488aaa..bd86fc6c 100644 --- a/website/docs/getting-started-tutorial/02-generating-your-first-llm-output.md +++ b/website/docs/getting-started-tutorial/02-generating-your-first-llm-output.md @@ -2,7 +2,7 @@ :::tip -Having problems? Don't worry reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. +Having problems? Don't worry, reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. ::: diff --git a/website/docs/getting-started-tutorial/03-using-prompt-templates-and-parameters.md b/website/docs/getting-started-tutorial/03-using-prompt-templates-and-parameters.md index 08362a41..052f49d8 100644 --- a/website/docs/getting-started-tutorial/03-using-prompt-templates-and-parameters.md +++ b/website/docs/getting-started-tutorial/03-using-prompt-templates-and-parameters.md @@ -2,7 +2,7 @@ :::tip -Having problems? Don't worry reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. +Having problems? Don't worry, reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. ::: diff --git a/website/docs/getting-started-tutorial/04-building-a-multi-step-chain.md b/website/docs/getting-started-tutorial/04-building-a-multi-step-chain.md index 915843fb..9e9fc46d 100644 --- a/website/docs/getting-started-tutorial/04-building-a-multi-step-chain.md +++ b/website/docs/getting-started-tutorial/04-building-a-multi-step-chain.md @@ -2,7 +2,7 @@ :::tip -Having problems? Don't worry reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. +Having problems? Don't worry, reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. ::: @@ -59,7 +59,7 @@ async fn main() -> Result<(), Box> { - The first step has a prompt to make a personalized birthday email for a company. - The second step has a prompt to summarize the email into a tweet. - Both prompts use placeholders (e.g., `{{name}}`, `{{date}}`, and `{{text}}`) that will be replaced with specific values later. Importantly the value of `{{text}}` will replaced by result of the first step in the chain. + Both prompts use placeholders (e.g., `{{name}}`, `{{date}}`, and `{{text}}`) that will be replaced with specific values later. Importantly, the value of `{{text}}` will be replaced by result of the first step in the chain. 5. We run the `Chain` with the provided parameters: @@ -74,6 +74,6 @@ When working with sequential chains, consider the following tips and best practi 1. Use descriptive and clear instructions for the system role to help guide the LLM. 2. Keep the chain as short and simple as possible. Longer chains are harder to manage and debug. -3. Test each step independently before in +3. Test each step independently before testing the entire sequence. For the next tutorial we will switch our focus from sequential to map-reduce chains. Map reduce chains are more complicated than sequential chains but allow us to do things that sequential chains can't. Stay tuned! diff --git a/website/docs/getting-started-tutorial/05-summarizing-text-with-map-reduce.md b/website/docs/getting-started-tutorial/05-summarizing-text-with-map-reduce.md index d2ac1a50..3e070ad9 100644 --- a/website/docs/getting-started-tutorial/05-summarizing-text-with-map-reduce.md +++ b/website/docs/getting-started-tutorial/05-summarizing-text-with-map-reduce.md @@ -2,13 +2,13 @@ :::tip -Having problems? Don't worry reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. +Having problems? Don't worry, reach out on [discord](https://discord.gg/kewN9Gtjt2) and we will help you out. ::: Map-reduce is a powerful technique for processing and aggregating data in parallel. In this tutorial, we'll explore how to use map-reduce in `llm-chain` to summarize text effectively. We'll cover implementing a basic map-reduce for text summarization. -To start create a file named in "article_to_summarize.md" take the content of a wikipedia article and paste it in there. +To start, create a file named "article_to_summarize.md", take the content of a wikipedia article and paste it in there. Here's a Rust program that demonstrates how to create a map-reduce chain for summarizing text: