Skip to main content
Knowledge bases provide agents with access to domain-specific information, documents, and organizational knowledge. AMAS supports two types of knowledge bases, each optimized for different use cases.

Available Knowledge Base Types

Comparison

FeatureMilvusUKnow
Data SourceUploaded filesCloud storage (OAuth)
SetupUpload documents to collectionsConnect cloud account
Search TypeSemantic vector searchSemantic search via UKnow API
File ManagementManual upload/deleteAutomatic sync from cloud
CustomizationFull control (chunking, embeddings)Managed by UKnow
Best ForCustom knowledge basesExisting cloud documents

When to Use Each Type

Use Milvus When:

You need full control over document processing and chunking
Building custom knowledge bases from uploaded files
Want to fine-tune embedding models and retrieval parameters
Need to manage document lifecycle (add, update, delete)

Use UKnow When:

Documents already exist in Google Drive, SharePoint, etc.
Want automatic sync with cloud storage
Need to search across multiple cloud providers
Prefer OAuth-based access over file uploads

Configuration Basics

Milvus Configuration

knowledge_bases:
  - name: "company_docs"
    knowledge_base_type: "milvus"
    id: "kb_abc123"
    config:
      top_k: 10
      metric_type: "COSINE"

UKnow Configuration

knowledge_bases:
  - name: "sharepoint_docs"
    knowledge_base_type: "uknow"
    enabled: true
    config:
      username: "[email protected]"
      drive_key: "oauth_key_123"
      path_filter: "/documents/"

Using Multiple Knowledge Bases

Agents can use multiple knowledge bases simultaneously:
agents:
  - name: "comprehensive_assistant"
    agent_type: "llm_agent"
    
    knowledge_bases:
      # Vector database for uploaded docs
      - name: "internal_kb"
        knowledge_base_type: "milvus"
        id: "kb_001"
        config:
          top_k: 5
      
      # Cloud storage for live docs
      - name: "sharepoint"
        knowledge_base_type: "uknow"
        enabled: true
        config:
          username: "[email protected]"
          drive_key: "key_123"
          path_filter: "/"
    
    system_prompt: |
      You have access to both internal documentation and live SharePoint files.
      Search both knowledge bases to provide comprehensive answers.

How Knowledge Bases Work

1

Agent Receives Query

User asks a question that requires domain knowledge
2

Semantic Search

Agent searches configured knowledge bases using semantic similarity
3

Retrieve Relevant Documents

Top-k most relevant documents/chunks are retrieved
4

Context Injection

Retrieved content is added to agent’s context
5

Generate Response

Agent generates response using both its knowledge and retrieved context

Best Practices

Start Small: Begin with one knowledge base type and expand as needed
Combine Types: Use Milvus for stable internal docs and UKnow for dynamic cloud content
Tune Retrieval: Adjust top_k and search parameters based on your use case
Token Limits: More knowledge bases = more retrieved content. Monitor token usage and adjust retrieval settings accordingly.

Next Steps