Recursive Context
Recursive Context, previously documented as RELP, lets your LLM work with documentation larger than its context window by decomposing queries and orchestrating multiple focused retrievals.
Reduced Hallucination
Recursive Context grounds responses in your actual documentation, providing source-attributed answers that reduce unsupported claims.
The Problem
Modern LLMs have context windows ranging from 8K to 200K tokens. But real-world documentation often exceeds these limits:
- A typical codebase: 500K+ tokens of docs, comments, and READMEs
- Enterprise documentation: Often 1M+ tokens across wikis and specs
- API references: Can easily reach 200K+ tokens
Without Recursive Context, you either truncate your docs (losing context) or pay to send everything (expensive and slow). Both approaches lead to incomplete answers and unsupported claims.
How Recursive Context Works
Recursive Context solves this by breaking complex queries into focused sub-queries, each retrieving precisely relevant context within your token budget.
The Three Recursive Context Tools
snipara_decompose
Breaks a complex query into focused sub-queries with dependency analysis. Returns an execution plan optimized for your token budget.
snipara_decompose("implement auth system"){ "sub_queries": [ "login flow and validation", "JWT token generation", "session management" ], "estimated_tokens": 12000}snipara_multi_query
Executes multiple queries in a single call with shared token budget. Efficiently retrieves context for all sub-queries.
snipara_multi_query({ queries: ["login flow", "JWT tokens"], max_tokens_per_query: 4000})snipara_plan
Generates a complete execution plan for complex tasks. Includes dependency ordering, estimated tokens, and execution strategy.
snipara_plan("refactor auth to use OAuth2"){ "strategy": "RELEVANCE_FIRST", "steps": [...], "total_estimated_tokens": 25000}Plan Availability
| Tool | Free | Pro ($49/mo) | Team ($149/mo) | Enterprise |
|---|---|---|---|---|
snipara_context_query | ✓ | ✓ | ✓ | ✓ |
snipara_decompose | ✗ | ✓ | ✓ | ✓ |
snipara_multi_query | ✗ | ✓ | ✓ | ✓ |
snipara_plan | ✗ | ✗ | ✓ | ✓ |
Token Budget Management
Recursive Context intelligently distributes your token budget across sub-queries:
Reducing Hallucination
Recursive Context reduces unsupported claims through several mechanisms:
- Grounded responses: Every answer is based on actual documentation, not just training data
- Focused context: Each sub-query gets precisely relevant sections, reducing ambiguity
- Source attribution: Responses include file paths and line numbers for verification
- Shared context: Team coding standards are always injected, preventing non-compliant suggestions
Example: Complex Task Execution
# Your LLM receives this complex request"Implement user authentication with JWT tokens, following our existing patterns and error handling" Step 1: LLM calls snipara_decomposesnipara_decompose("implement auth with JWT") Step 2: LLM calls snipara_multi_query for each sub-querysnipara_multi_query(["login flow", "JWT tokens", "sessions"]) Step 3: LLM calls snipara_shared_context for team standardssnipara_shared_context("error handling patterns") Result: Accurate, grounded implementationExpected Query Usage
Different task complexities consume different numbers of queries:
| Task Complexity | Example | Queries Used |
|---|---|---|
| Simple | "What is the API endpoint for users?" | 1-2 |
| Medium | "How does authentication work?" | 3-5 |
| Complex | "Implement a new feature following our patterns" | 8-15 |
| Planning | "Refactor the entire auth system" | 15-25 |
Next Steps
MCP Tools Reference
Complete documentation for all Snipara MCP tools including Recursive Context tools.
Integration Guide
Set up Snipara with Claude Code, Cursor, Continue, and other MCP clients.
Getting Started
New to Snipara? Start here for a 5-minute setup guide.
Try Recursive Context
Free plans include 1,000 monthly queries. Upgrade to Pro for Recursive Context tools.