Dexrag

Collections

Understand how collections organize your documents

Collections

Collections are the primary way to organize documents in Dexrag. Each collection acts as an isolated search space with its own adaptive learning model.

What is a Collection?

A collection is a group of related documents that share:

  • Common search patterns
  • Similar terminology
  • Related use cases

Collection Modes

Standard Mode

Basic Monte Carlo RAG without adaptive learning. Great for static document sets.

const collection = await dex.create({
  name: 'my-docs',
  mode: 'standard'
})

Learns from user behavior to improve over time. Personalized to your specific use case.

const collection = await dex.create({
  name: 'my-docs',
  mode: 'adaptive'
})

When to Create Multiple Collections

Create separate collections when you have:

  1. Different Domains: Legal docs vs technical docs
  2. Different Languages: English docs vs Spanish docs
  3. Different Use Cases: Customer support vs internal knowledge base
  4. Different Privacy Levels: Public vs confidential documents

Collection Limits

PlanCollectionsDocs/CollectionStorage
Hacker1100100MB
Startup1010,00010GB
Growth100100,000100GB
EnterpriseUnlimitedUnlimited1TB+

Best Practices

1. Use Descriptive Names

// Good
await dex.create({ name: 'legal-contracts-2024' })

// Bad
await dex.create({ name: 'coll1' })

2. Add Metadata

await dex.create({
  name: 'support-docs',
  description: 'Customer support documentation and FAQs',
  metadata: {
    department: 'support',
    language: 'en',
    version: '2.0'
  }
})

3. Monitor Performance

Track query performance and document relevance in the dashboard.

Deleting Collections

Deleting a collection removes:

  • All documents
  • Search history
  • Adaptive learning data
  • Analytics

This action cannot be undone.