Skip to content

Commit

Permalink
fix(docs): minor grammar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
trojan-bumble-bee committed Sep 20, 2024
1 parent af3c8d9 commit 43c8858
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion website/docs/chains/02-map-reduce-chains.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
```

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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

:::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

:::

Expand Down Expand Up @@ -59,7 +59,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
- 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:

Expand All @@ -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!
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 43c8858

Please sign in to comment.