Dash: SQL grounded in known patterns
Dash holds three kinds of knowledge under oneKnowledge instance:
When a user asks “what’s our MRR trend?”, the Analyst retrieves matching table descriptions, similar past queries, and the MRR definition. The model writes SQL with all of that in context. Hallucination rate drops.
search_type="hybrid" runs both vector similarity and BM25 keyword search, then merges results. Catches both “what’s the same idea worded differently?” (semantic) and “find the doc that mentions this exact term” (keyword).
Loading knowledge
Knowledge content gets loaded once at boot or via a script:--recreate rebuilds from scratch. Without the flag, content gets upserted by primary key.
How retrieval gets injected
Whenadd_knowledge_to_context=True, AgentOS:
- Takes the user’s message.
- Runs hybrid search against the
Knowledgevector DB. - Pulls top-k chunks with metadata (configurable).
- Injects them into the system prompt under a “Relevant context” section.
- The model answers with both the message and the retrieved context.
search_knowledge=True is also set, the agent gets a search_knowledge_base(query) tool and can run additional searches mid-run when it needs to.
See it in action
When hybrid search isn’t enough
For very large knowledge bases, add reranking. PgVector + a reranker (Cohere, BGE) tightens the top-k:agents/dash/