LLMSlim Documentation
Master enterprise prompt compression, Priority Tier protection, offline TF-IDF centrality ranking, and API integration.
Overview & Philosophy
Learn how LLMSlim cuts LLM token costs by 40-70% with guaranteed 100% instruction fidelity.
Python SDK Integration
Integrate compress() into OpenAI, Claude, LangChain, and FastAPI pipelines in 1 line of code.
Getting Started
Learn how LLMSlim cuts LLM token costs by 40-70% while guaranteeing 100% instruction fidelity across OpenAI, Claude, and local LLM infrastructure.
Detailed installation instructions for LLMSlim across PyPI, npm, uv, and poetry with hardware acceleration options.
Step-by-step tutorial on integrating LLMSlim into Python pipelines, OpenAI SDK calls, and LangChain agents.
Core Concepts
In-depth guide to LLMSlim's 6-step compression DAG, LexRank centrality scoring, and entity preservation algorithms.
Deep dive into LLMSlim's specialized optimizers for JSON, XML, Markdown, and conversational transcripts.
Comprehensive blueprint of LLMSlim's execution graph, C-extension interfaces, and ONNX acceleration roadmaps.
API Reference
Complete CLI command reference for llmslim compress, analyze, benchmark, and cost commands.
Full Python API documentation for compress(), ContextCompressor, analyze(), compress_chat_messages(), and cost estimation utilities.
Full API documentation for @llmslim/core JavaScript and TypeScript packages across Vercel Edge, Node.js, and Next.js.
Learn how to configure LLMSlim rules, custom sentence patterns, and tier priorities via code or pyproject.toml.
Guides & Strategies
Master tail-focused, head-focused, and semantic density strategies tailored for specific LLM workloads.
Integration tutorials and code patterns for popular LLM frameworks including LangChain, LlamaIndex, and FastAPI middleware.
Best practices for writing compression-friendly prompts, role markers, and structured output instructions.
Guidelines for deploying LLMSlim in mission-critical backend environments, monitoring token savings, and caching strategies.
Resources
Comprehensive repository of all frequently asked questions regarding LLMSlim installation, performance, security, and usage.
Solutions to common issues, import errors, low compression ratios, and unexpected content truncation.
Step-by-step migration guide for updating legacy LLMSlim installations to v0.2.0 API standards.
Production-ready code snippets for LangChain, OpenAI, Claude, RAG, Chatbot history, and CLI workflows.