diff --git a/.cursorrules b/.cursorrules index 8f05631..ec33fa0 100644 --- a/.cursorrules +++ b/.cursorrules @@ -56,7 +56,7 @@ Agentic Coding should be a collaboration between Human System Design and Agent I 3. **Utilities**: Based on the Flow Design, identify and implement necessary utility functions. - Think of your AI system as the brain. It needs a body—these *external utility functions*—to interact with the real world: -
+
- Reading inputs (e.g., retrieving Slack messages, reading emails) - Writing outputs (e.g., generating reports, sending emails) @@ -127,7 +127,7 @@ Agentic Coding should be a collaboration between Human System Design and Agent I - > **You'll likely iterate a lot!** Expect to repeat Steps 3–6 hundreds of times. > - >
+ >
{: .best-practice } 8. **Reliability** @@ -244,7 +244,7 @@ A [100-line](https://github.com/the-pocket/PocketFlow/blob/main/pocketflow/__ini - **Agentic-Coding**: Intuitive enough for AI agents to help humans build complex LLM applications.
- +
## Core Abstraction @@ -259,7 +259,7 @@ We model the LLM workflow as a **Graph + Shared Store**: - [(Advanced) Parallel](./core_abstraction/parallel.md) nodes/flows handle I/O-bound tasks.
- +
## Design Pattern @@ -274,7 +274,7 @@ From there, it’s easy to implement popular design patterns: - [(Advanced) Multi-Agents](./design_pattern/multi_agent.md) coordinate multiple agents.
- +
## Utility Function @@ -794,7 +794,7 @@ nav_order: 1 A **Node** is the smallest building block. Each Node has 3 steps `prep->exec->post`:
- +
1. `prep(shared)` @@ -964,7 +964,7 @@ nav_order: 1 Agent is a powerful design pattern in which nodes can take dynamic actions based on the context.
- +
## Implement Agent with Graph @@ -1122,7 +1122,7 @@ 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. @@ -1192,7 +1192,7 @@ nav_order: 3 For certain LLM tasks like answering questions, providing relevant context is essential. One common architecture is a **two-stage** RAG pipeline:
- +
1. **Offline stage**: Preprocess and index documents ("building the index"). @@ -1475,7 +1475,7 @@ nav_order: 2 Many real-world tasks are too complex for one LLM call. The solution is to **Task Decomposition**: 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*. diff --git a/README.md b/README.md index 1cca3b2..29d884f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
- +
@@ -29,7 +29,7 @@ Pocket Flow is a [100-line](pocketflow/__init__.py) minimalist LLM framework Current LLM frameworks are bloated... You only need 100 lines for LLM Framework!
- + | | **Abstraction** | **App-Specific Wrappers** | **Vendor-Specific Wrappers** | **Lines** | **Size** | @@ -48,14 +48,14 @@ Current LLM frameworks are bloated... You only need 100 lines for LLM Framework! The [100 lines](pocketflow/__init__.py) capture the core abstraction of LLM frameworks: Graph!
- +

From there, it's easy to implement popular design patterns like ([Multi-](https://the-pocket.github.io/PocketFlow/design_pattern/multi_agent.html))[Agents](https://the-pocket.github.io/PocketFlow/design_pattern/agent.html), [Workflow](https://the-pocket.github.io/PocketFlow/design_pattern/workflow.html), [RAG](https://the-pocket.github.io/PocketFlow/design_pattern/rag.html), etc.
- +

✨ Below are basic tutorials: @@ -88,7 +88,7 @@ From there, it's easy to implement popular design patterns like ([Multi-](https:
- IMAGE ALT TEXT + IMAGE ALT TEXT

diff --git a/assets/abstraction.png b/assets/abstraction.png deleted file mode 100644 index 252b007..0000000 Binary files a/assets/abstraction.png and /dev/null differ diff --git a/assets/agent.png b/assets/agent.png deleted file mode 100644 index 63f4507..0000000 Binary files a/assets/agent.png and /dev/null differ diff --git a/assets/design.png b/assets/design.png deleted file mode 100644 index 1219dee..0000000 Binary files a/assets/design.png and /dev/null differ diff --git a/assets/mapreduce.png b/assets/mapreduce.png deleted file mode 100644 index 28f6e5c..0000000 Binary files a/assets/mapreduce.png and /dev/null differ diff --git a/assets/meme.jpg b/assets/meme.jpg deleted file mode 100644 index f628eb5..0000000 Binary files a/assets/meme.jpg and /dev/null differ diff --git a/assets/meme2.jpg b/assets/meme2.jpg deleted file mode 100644 index cac4829..0000000 Binary files a/assets/meme2.jpg and /dev/null differ diff --git a/assets/node.png b/assets/node.png deleted file mode 100644 index 3b2a388..0000000 Binary files a/assets/node.png and /dev/null differ diff --git a/assets/rag.png b/assets/rag.png deleted file mode 100644 index ed91249..0000000 Binary files a/assets/rag.png and /dev/null differ diff --git a/assets/success.png b/assets/success.png deleted file mode 100644 index f709922..0000000 Binary files a/assets/success.png and /dev/null differ diff --git a/assets/title.png b/assets/title.png deleted file mode 100644 index fe4ef59..0000000 Binary files a/assets/title.png and /dev/null differ diff --git a/assets/tutorial.png b/assets/tutorial.png deleted file mode 100644 index 34fe141..0000000 Binary files a/assets/tutorial.png and /dev/null differ diff --git a/assets/utility.png b/assets/utility.png deleted file mode 100644 index ae4ea15..0000000 Binary files a/assets/utility.png and /dev/null differ diff --git a/assets/vibe_coding.gif b/assets/vibe_coding.gif deleted file mode 100644 index f8a13e7..0000000 Binary files a/assets/vibe_coding.gif and /dev/null differ diff --git a/assets/workflow.png b/assets/workflow.png deleted file mode 100644 index 27239d0..0000000 Binary files a/assets/workflow.png and /dev/null differ diff --git a/assets/youtube.png b/assets/youtube.png deleted file mode 100644 index 97ca28b..0000000 Binary files a/assets/youtube.png and /dev/null differ diff --git a/docs/core_abstraction/node.md b/docs/core_abstraction/node.md index de6586b..bf3360d 100644 --- a/docs/core_abstraction/node.md +++ b/docs/core_abstraction/node.md @@ -10,7 +10,7 @@ nav_order: 1 A **Node** is the smallest building block. Each Node has 3 steps `prep->exec->post`:
- +
1. `prep(shared)` diff --git a/docs/design_pattern/agent.md b/docs/design_pattern/agent.md index 3141bd5..a086426 100644 --- a/docs/design_pattern/agent.md +++ b/docs/design_pattern/agent.md @@ -10,7 +10,7 @@ nav_order: 1 Agent is a powerful design pattern in which nodes can take dynamic actions based on the context.
- +
## Implement Agent with Graph diff --git a/docs/design_pattern/mapreduce.md b/docs/design_pattern/mapreduce.md index de680e3..237b3cb 100644 --- a/docs/design_pattern/mapreduce.md +++ b/docs/design_pattern/mapreduce.md @@ -14,7 +14,7 @@ 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. diff --git a/docs/design_pattern/rag.md b/docs/design_pattern/rag.md index a2629e4..a534782 100644 --- a/docs/design_pattern/rag.md +++ b/docs/design_pattern/rag.md @@ -10,7 +10,7 @@ nav_order: 3 For certain LLM tasks like answering questions, providing relevant context is essential. One common architecture is a **two-stage** RAG pipeline:
- +
1. **Offline stage**: Preprocess and index documents ("building the index"). diff --git a/docs/design_pattern/workflow.md b/docs/design_pattern/workflow.md index 476dfb4..92dc536 100644 --- a/docs/design_pattern/workflow.md +++ b/docs/design_pattern/workflow.md @@ -10,7 +10,7 @@ nav_order: 2 Many real-world tasks are too complex for one LLM call. The solution is to **Task Decomposition**: 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*. diff --git a/docs/guide.md b/docs/guide.md index 4d29e79..eba0049 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -56,7 +56,7 @@ Agentic Coding should be a collaboration between Human System Design and Agent I 3. **Utilities**: Based on the Flow Design, identify and implement necessary utility functions. - Think of your AI system as the brain. It needs a body—these *external utility functions*—to interact with the real world: -
+
- Reading inputs (e.g., retrieving Slack messages, reading emails) - Writing outputs (e.g., generating reports, sending emails) @@ -127,7 +127,7 @@ Agentic Coding should be a collaboration between Human System Design and Agent I - > **You'll likely iterate a lot!** Expect to repeat Steps 3–6 hundreds of times. > - >
+ >
{: .best-practice } 8. **Reliability** diff --git a/docs/index.md b/docs/index.md index d16d65a..fa2e0e3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,7 +13,7 @@ A [100-line](https://github.com/the-pocket/PocketFlow/blob/main/pocketflow/__ini - **Agentic-Coding**: Intuitive enough for AI agents to help humans build complex LLM applications.
- +
@@ -29,7 +29,7 @@ We model the LLM workflow as a **Graph + Shared Store**: - [(Advanced) Parallel](./core_abstraction/parallel.md) nodes/flows handle I/O-bound tasks.
- +
## Design Pattern @@ -44,7 +44,7 @@ From there, it’s easy to implement popular design patterns: - [(Advanced) Multi-Agents](./design_pattern/multi_agent.md) coordinate multiple agents.
- +
## Utility Function