compact doc

This commit is contained in:
zachary62
2025-03-03 22:32:27 -05:00
parent 355e2573c4
commit 467c9dbbd8
17 changed files with 11 additions and 41 deletions
+1 -2
View File
@@ -98,5 +98,4 @@ search - "decide" >> decide # Loop back
flow = Flow(start=decide)
flow.run({"query": "Who won the Nobel Prize in Physics 2024?"})
```
```
+1 -2
View File
@@ -14,7 +14,6 @@ MapReduce is a design pattern suitable when you have either:
and there is a logical way to break the task into smaller, ideally independent parts.
You first break down the task using [BatchNode](../core_abstraction/batch.md) in the map phase, followed by aggregation in the reduce phase.
### Example: Document Summarization
```python
@@ -36,4 +35,4 @@ map_node >> reduce_node
# Create flow
summarize_flow = Flow(start=map_node)
summarize_flow.run(shared)
```
```
+1 -1
View File
@@ -122,4 +122,4 @@ reply - "continue" >> retrieve
flow = Flow(start=retrieve)
shared = {}
flow.run(shared)
```
```
-1
View File
@@ -70,7 +70,6 @@ Agent received: Network connectivity: stable | timestamp_2
Agent received: Processing load: optimal | timestamp_3
```
### Interactive Multi-Agent Example: Taboo Game
Here's a more complex example where two agents play the word-guessing game Taboo.
+1 -2
View File
@@ -9,7 +9,6 @@ nav_order: 2
Many real-world tasks are too complex for one LLM call. The solution is to decompose them into a [chain](../core_abstraction/flow.md) of multiple Nodes.
> - You don't want to make each task **too coarse**, because it may be *too complex for one LLM call*.
> - You don't want to make each task **too granular**, because then *the LLM call doesn't have enough context* and results are *not consistent across nodes*.
>
@@ -47,4 +46,4 @@ shared = {"topic": "AI Safety"}
writing_flow.run(shared)
```
For *dynamic cases*, consider using [Agents](./agent.md).
For *dynamic cases*, consider using [Agents](./agent.md).