Overview
L0: Abstract
~100 tokensQuick filtering and vector search
L1: Overview
~2k tokensContent navigation and rerank
L2: Detail
UnlimitedFull content, on-demand loading
L0: Abstract
The most concise representation of content, used for vector retrieval and quick filtering.Characteristics
- Ultra-short: Maximum ~100 tokens
- Quick perception: Allows Agent to quickly perceive content relevance
- Vectorized: Used for semantic search in vector index
- Always text: Even for multimedia content, L0 is text description
Example: Documentation Abstract
Example: Code File Abstract
API Usage
L1: Overview
Comprehensive summary with navigation guidance, used for rerank and understanding access methods.Characteristics
- Moderate length: ~1-2k tokens
- Navigation guide: Tells Agent how to access detailed content
- Structural information: Describes subdirectories and file organization
- Usage hints: Provides guidance on when to load L2 details
Example: Documentation Overview
Example: Code Module Overview
API Usage
L2: Detail
Complete original content, loaded only when needed.Characteristics
- Full content: No token limit, preserves all information
- On-demand loading: Read only when confirmed necessary through L0/L1
- Original format: Preserves source structure and formatting
- Multimodal: Can be text, image, video, audio, or binary files
Example: Full Documentation
API Usage
Generation Mechanism
L0 and L1 layers are automatically generated by OpenViking’s semantic processing system.
When Generated
- Resource Addition
- Session Archiving
When adding resources, L0/L1 are generated asynchronously:
- Parser parses document and creates directory structure
- TreeBuilder moves files to AGFS and enqueues semantic processing
- SemanticQueue processes bottom-up, generating L0/L1 for each directory
- Vector Index stores L0/L1 vectors for semantic search
Who Generates
Generation Order
Bottom-up aggregation: Child directory L0s are aggregated into parent L1, forming hierarchical navigation.1
Process Leaf Nodes
Generate L0/L1 for individual files at the deepest level
2
Aggregate to Parent
Collect child abstracts and generate parent directory L0/L1
3
Recursive Upward
Continue aggregating up the directory tree
4
Complete at Root
Final root directory L0/L1 provides project-level overview
Directory Structure
Each directory follows a unified file structure:Multimodal Support
OpenViking supports multimodal content with text-based L0/L1 descriptions.
Text Content
- L0/L1: Generated from text content
- L2: Original text file
Multimedia Content
For binary content (images, videos, audio), L0/L1 describe in text:- Image
- Video
Best Practices
Quick relevance check - Use L0
Quick relevance check - Use L0
When you need to quickly filter relevant contexts from search results:
Understand content scope - Use L1
Understand content scope - Use L1
When you need to understand what a resource contains before loading:
Detailed information extraction - Use L2
Detailed information extraction - Use L2
Only load L2 when you need the complete content:
Building context for LLM - Use L1
Building context for LLM - Use L1
L1 is usually sufficient for building context:
Token Budget Management
Implementation Details
Related Concepts
Architecture
System architecture and data flow
Context Types
Resource, Memory, and Skill types
Viking URI
URI specification and structure
Extraction
L0/L1 generation details
