Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

LLM Workflow Patterns

This repository demonstrates practical patterns for building effective LLM-powered systems using pure Python. These patterns are based on real-world implementations and focus on simplicity and composability rather than complex frameworks.

🎯 Key Features

  • Pure Python implementation
  • No complex frameworks
  • Production-ready patterns
  • Practical examples
  • Detailed documentation

🏗️ Patterns Covered

  1. Building Blocks

    • Basic LLM calls
    • Structured output
    • Tool use
    • Retrieval
  2. Workflow Patterns

    • Prompt chaining
    • Routing
    • Parallelization
    • Orchestrator-Workers

🚀 Getting Started

To get started with this repository, follow these steps:

  1. Clone this repository to your local machine:

    git clone https://github.com/yourusername/llm-workflow-patterns.git

  2. Navigate into the project directory:

    cd llm-workflow-patterns

  3. Create a virtual environment and activate it:

    For Unix/macOS: python3 -m venv venv && source venv/bin/activate

    For Windows: python -m venv venv && venv\Scripts\activate

  4. Install the dependencies:

    pip install -r requirements.txt

  5. Create a .env file in the repository root with your OpenAI API key:

    OPENAI_API_KEY=your_openai_api_key_here

  6. Run any of the example scripts in the 'patterns/workflows/1-introduction/' directory.

    For example, to run the basic motivational quote example:

    python patterns/workflows/1-introduction/1-basic.py

  7. Explore further examples to learn more about structured output, tool use, and retrieval patterns.

Happy coding!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages