How DriftOS Works
Understand semantic conversation routing
DriftOS organizes conversation history into semantic branches. Only the relevant branch goes to the LLM.
The Problem with Traditional Memory
Traditional chatbot memory sends the entire conversation history to the LLM on every request:
User: "Tell me about dogs"
User: "What about black holes?"
User: "I want to plan a vacation"
User: "Back to dogs—what's the adoption fee?"Traditional approach: All 4 messages + responses = 3,891 tokens sent to LLM
The LLM has to process irrelevant context (black holes, vacation) to answer a question about dogs.
The DriftOS Approach
DriftOS routes each message to a semantic branch. When you ask about adoption fees, the LLM only sees the "dogs" branch:
Branch 1 (dogs): 2 messages → 847 tokens
Branch 2 (black holes): 1 message → pruned
Branch 3 (vacation): 1 message → prunedResult: 78% token reduction. Faster responses. Focused context.
Routing Decisions
DriftOS analyzes each message and makes one of three decisions:
STAY (📌 Same Topic)
The message continues the current conversation branch.
Example:
Current Branch: dogs
User Message: "What's the adoption fee?"
Decision: STAY (continue in dogs branch)BRANCH (🌿 New Topic)
The message introduces a new semantic topic. DriftOS creates a new branch.
Example:
Current Branch: dogs
User Message: "Tell me about black holes"
Decision: BRANCH (create new branch: black-holes)ROUTE (🔀 Switch Topic)
The message returns to a previous topic. DriftOS switches to an existing branch.
Example:
Current Branch: black-holes
User Message: "Back to the dog thing—what's the fee?"
Decision: ROUTE (switch to existing branch: dogs)Note: ROUTE is only available with DriftOS Core (LLM routing). DriftOS Embed creates new branches instead.
Two Routing Engines
DriftOS offers two routing strategies:
DriftOS Core (LLM Routing)
Uses Groq-powered LLMs to analyze semantic meaning.
Strengths:
- High accuracy for nuanced topic shifts
- Detects sarcasm, negation, and context
- Can ROUTE back to old topics
Performance:
- Latency: ~100ms
- Cost: ~$0.001 per routing decision
- Accuracy: High
Best for: Multi-topic conversations where accuracy matters.
DriftOS Embed (Embedding Routing)
Uses vector similarity to compare message embeddings.
Strengths:
- Fast sub-50ms routing decisions
- Deterministic and predictable
- Zero LLM costs for routing
Performance:
- Latency: ~50ms
- Cost: $0 per routing decision
- Accuracy: Good
Best for: High-volume applications where speed matters.
Tradeoff: Cannot ROUTE to old topics—creates new branches instead.
Learn how to choose between Core and Embed →
Next Steps
- Routing Details - Deep dive into routing logic
- Branches - How branches are created and managed
- Choosing a Routing Engine - Core vs Embed
