All repositories

Prompting & contextmicrosoft

LLMLingua

Compresses long prompts and context up to 20x with little quality loss by dropping low-value tokens. Saves money and speeds up responses.

Who it is for

For those paying for long contexts who want to shrink them.

How to start

  1. Install: pip install llmlingua.
  2. Create PromptCompressor() from llmlingua.
  3. Call compress_prompt(prompt, instruction="", question="", target_token=200) and use the result in your request.

Steps are taken from the README. Check the current version in the repository before running them.

Stars over the last 30 days

+103Sep 6 — Oct 6
6,6266,729

Author's description

[EMNLP'23, ACL'24] To speed up LLMs' inference and enhance LLM's perceive of key information, compress the prompt and KV-Cache, which achieves up to 20x compression with minimal performance loss.

anthropics

skills

Growing fastest

Anthropic's official collection of Agent Skills: folders with instructions and scripts that Claude loads for a task. A good reference for writing your own.

180Kstars+5.4K in 30 dPython

Formerly Awesome ChatGPT Prompts: a huge community library of prompts plus an interactive book on prompting. You can deploy your own private copy.

172Kstars+2.9K in 30 dHTML

A collection of system prompts and tool descriptions from popular AI products: Cursor, Devin, Windsurf, Lovable, Manus and others. Useful for studying how pros build them.

144Kstars+933 in 30 d

A detailed guide to prompt engineering: techniques from few-shot to chains of thought, papers, lectures and notebooks. Recently extended with context engineering and agents.

79Kstars+909 in 30 dMDX

A collection of examples and guides for the OpenAI API: from basic requests to function calling and RAG. Most code is Python.

76Kstars+676 in 30 dJupyter Notebook

Recipes from Anthropic as notebooks: tools, RAG, multimodality, subagents and other techniques for working with Claude. The code is ready to copy into your projects.

53Kstars+829 in 30 dJupyter Notebook