mirror of
https://github.com/aljazceru/Tutorial-Codebase-Knowledge.git
synced 2025-12-19 07:24:20 +01:00
add just doc
This commit is contained in:
49
docs/_config.yml
Normal file
49
docs/_config.yml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# Basic site settings
|
||||||
|
title: Pocket Flow
|
||||||
|
tagline: A 100-line LLM framework
|
||||||
|
description: Minimalist LLM Framework in 100 Lines, Enabling LLMs to Program Themselves
|
||||||
|
|
||||||
|
# Theme settings
|
||||||
|
remote_theme: just-the-docs/just-the-docs
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
nav_sort: case_sensitive
|
||||||
|
|
||||||
|
# Aux links (shown in upper right)
|
||||||
|
aux_links:
|
||||||
|
"View on GitHub":
|
||||||
|
- "//github.com/the-pocket/PocketFlow"
|
||||||
|
|
||||||
|
# Color scheme
|
||||||
|
color_scheme: light
|
||||||
|
|
||||||
|
# Author settings
|
||||||
|
author:
|
||||||
|
name: Zachary Huang
|
||||||
|
url: https://www.columbia.edu/~zh2408/
|
||||||
|
twitter: ZacharyHuang12
|
||||||
|
|
||||||
|
# Mermaid settings
|
||||||
|
mermaid:
|
||||||
|
version: "9.1.3" # Pick the version you want
|
||||||
|
# Default configuration
|
||||||
|
config: |
|
||||||
|
directionLR
|
||||||
|
|
||||||
|
# Callouts settings
|
||||||
|
callouts:
|
||||||
|
warning:
|
||||||
|
title: Warning
|
||||||
|
color: red
|
||||||
|
note:
|
||||||
|
title: Note
|
||||||
|
color: blue
|
||||||
|
best-practice:
|
||||||
|
title: Best Practice
|
||||||
|
color: green
|
||||||
|
|
||||||
|
# The custom navigation
|
||||||
|
nav:
|
||||||
|
- Home: index.md # Link to your main docs index
|
||||||
|
- GitHub: "https://github.com/the-pocket/PocketFlow"
|
||||||
|
- Discord: "https://discord.gg/hUHHE9Sa6T"
|
||||||
69
docs/index.md
Normal file
69
docs/index.md
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: "Home"
|
||||||
|
nav_order: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
# Pocket Flow
|
||||||
|
|
||||||
|
A [100-line](https://github.com/the-pocket/PocketFlow/blob/main/pocketflow/__init__.py) minimalist LLM framework for *Agents, Task Decomposition, RAG, etc*.
|
||||||
|
|
||||||
|
- **Lightweight**: Just the core graph abstraction in 100 lines. ZERO dependencies, and vendor lock-in.
|
||||||
|
- **Expressive**: Everything you love from larger frameworks—([Multi-](./design_pattern/multi_agent.html))[Agents](./design_pattern/agent.html), [Workflow](./design_pattern/workflow.html), [RAG](./design_pattern/rag.html), and more.
|
||||||
|
- **Agentic-Coding**: Intuitive enough for AI agents to help humans build complex LLM applications.
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<img src="https://github.com/the-pocket/.github/raw/main/assets/meme.jpg?raw=true" width="400"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
## Core Abstraction
|
||||||
|
|
||||||
|
We model the LLM workflow as a **Graph + Shared Store**:
|
||||||
|
|
||||||
|
- [Node](./core_abstraction/node.md) handles simple (LLM) tasks.
|
||||||
|
- [Flow](./core_abstraction/flow.md) connects nodes through **Actions** (labeled edges).
|
||||||
|
- [Shared Store](./core_abstraction/communication.md) enables communication between nodes within flows.
|
||||||
|
- [Batch](./core_abstraction/batch.md) nodes/flows allow for data-intensive tasks.
|
||||||
|
- [Async](./core_abstraction/async.md) nodes/flows allow waiting for asynchronous tasks.
|
||||||
|
- [(Advanced) Parallel](./core_abstraction/parallel.md) nodes/flows handle I/O-bound tasks.
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<img src="https://github.com/the-pocket/.github/raw/main/assets/abstraction.png" width="700"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
## Design Pattern
|
||||||
|
|
||||||
|
From there, it’s easy to implement popular design patterns:
|
||||||
|
|
||||||
|
- [Agent](./design_pattern/agent.md) autonomously makes decisions.
|
||||||
|
- [Workflow](./design_pattern/workflow.md) chains multiple tasks into pipelines.
|
||||||
|
- [RAG](./design_pattern/rag.md) integrates data retrieval with generation.
|
||||||
|
- [Map Reduce](./design_pattern/mapreduce.md) splits data tasks into Map and Reduce steps.
|
||||||
|
- [Structured Output](./design_pattern/structure.md) formats outputs consistently.
|
||||||
|
- [(Advanced) Multi-Agents](./design_pattern/multi_agent.md) coordinate multiple agents.
|
||||||
|
|
||||||
|
<div align="center">
|
||||||
|
<img src="https://github.com/the-pocket/.github/raw/main/assets/design.png" width="700"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
## Utility Function
|
||||||
|
|
||||||
|
We **do not** provide built-in utilities. Instead, we offer *examples*—please *implement your own*:
|
||||||
|
|
||||||
|
- [LLM Wrapper](./utility_function/llm.md)
|
||||||
|
- [Viz and Debug](./utility_function/viz.md)
|
||||||
|
- [Web Search](./utility_function/websearch.md)
|
||||||
|
- [Chunking](./utility_function/chunking.md)
|
||||||
|
- [Embedding](./utility_function/embedding.md)
|
||||||
|
- [Vector Databases](./utility_function/vector.md)
|
||||||
|
- [Text-to-Speech](./utility_function/text_to_speech.md)
|
||||||
|
|
||||||
|
**Why not built-in?**: I believe it's a *bad practice* for vendor-specific APIs in a general framework:
|
||||||
|
- *API Volatility*: Frequent changes lead to heavy maintenance for hardcoded APIs.
|
||||||
|
- *Flexibility*: You may want to switch vendors, use fine-tuned models, or run them locally.
|
||||||
|
- *Optimizations*: Prompt caching, batching, and streaming are easier without vendor lock-in.
|
||||||
|
|
||||||
|
## Ready to build your Apps?
|
||||||
|
|
||||||
|
Check out [Agentic Coding Guidance](./guide.md), the fastest way to develop LLM projects with Pocket Flow!
|
||||||
Reference in New Issue
Block a user