Context Intelligence
Production - Intelligent context analysis and adaptive truncation
Context Intelligence provides advanced analysis of conversation context, enabling intelligent decisions about what to include in the LLM context window.
12.6.4.1Intelligence Features
# Analyze context quality
curl -X POST http://localhost:8000/api/v1/llm/context-intelligence/analyze \
-H "Content-Type: application/json" \
-H "X-Tenant-ID: acme-corp" \
-d '{
"session_id": "sess-123",
"current_query": "Compare Q3 vs Q4 revenue"
}'{
"context_quality_score": 0.87,
"relevant_messages": 8,
"irrelevant_messages": 12,
"recommended_action": "summarize_and_filter",
"token_budget": {"available": 8000, "used": 5200, "recommended": 6500},
"key_topics": ["revenue", "quarterly_comparison", "time_series"]
}