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'
})Adaptive Mode (Recommended)
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:
- Different Domains: Legal docs vs technical docs
- Different Languages: English docs vs Spanish docs
- Different Use Cases: Customer support vs internal knowledge base
- Different Privacy Levels: Public vs confidential documents
Collection Limits
| Plan | Collections | Docs/Collection | Storage |
|---|---|---|---|
| Hacker | 1 | 100 | 100MB |
| Startup | 10 | 10,000 | 10GB |
| Growth | 100 | 100,000 | 100GB |
| Enterprise | Unlimited | Unlimited | 1TB+ |
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.