Giter Club home page Giter Club logo

llm-prompt-recurse's Introduction

llm-prompt-recurse

NOTE: This is my personal repo for testing prompt recursion in LLM. You can use this as a reference to implement prompt recursion in your own LLM fork.

Summary

The main focus is to refine the process of prompt engineering by using meta-prompts, which are prompts that instruct an LLM to generate other prompts. This recursive approach aims to streamline the creation of effective prompts for various tasks.

The prompts directory contains the JSON files that define the tasks, The llm_prompt_recurse.py script is used to generate meta-prompts based on the JSON task definitions.


NOTE: This project is a personal endeavor and serves as a practical reference for anyone interested in implementing prompt recursion in their own projects with LLMs. Its based off of langsmith-cookbook/assisted-prompt-engineering but has now diverted significantly.

Installation

  1. Clone the repository:
git clone <repo-url>
cd llm-prompt-recurse
  1. Install the required packages:
poetry install

Usage

  1. Define the tasks in the prompts directory. Each task is defined in a separate JSON file at tasks/<task-name>.json. See prompts/examples.json for examples.

  2. Run the script:

poetry run python llm_prompt_recurse.py <task-name>

This generates a meta-prompt for the specified task based on the JSON definition.

llm-prompt-recurse's People

Contributors

eriknomitch avatar

Watchers

 avatar Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.