Spaces
A Space is a logical container for related documents. Think of it as a folder with superpowers - it not only organizes your content but also provides semantic context for searches.Why Spaces Matter
Better Accuracy
Searching a focused space yields more relevant results than searching everything.
Organization
Keep different topics separate - product docs, support articles, research papers.
Access Control
Control who can access which spaces via API key permissions.
AI Context
AI assistants can understand what each space contains and search appropriately.
Space Properties
| Property | Description |
|---|---|
id | Unique identifier (e.g., spc_abc123) |
name | Human-readable name |
description | Explains what the space contains - used by Smart Query |
slug | URL-friendly identifier |
icon | Optional emoji icon |
isArchived | Soft-delete flag |
Best Practices
- Keep spaces focused - A space for “Product Documentation” is better than “Everything”
- Use descriptive names - Make it obvious what content lives there
- Write good descriptions - Help AI understand the space’s purpose
- Archive, don’t delete - Archiving preserves data while hiding the space
Documents
A Document is a piece of content within a space. When you upload a document, Orchata automatically:- Chunks the content into smaller pieces
- Embeds each chunk using AI models
- Indexes the embeddings for fast similarity search
Supported Content
Currently, Orchata supports:- Word documents
- Excel documents
- PowerPoint documents
- Markdown files
- Plain text files
- Images
Orchata automatically detects scanned PDFs and uses OCR to extract text content.
Document Properties
| Property | Description |
|---|---|
id | Unique identifier (e.g., doc_xyz789) |
spaceId | Parent space ID |
filename | Original filename |
status | Processing status: pending, processing, completed, failed |
metadata | Custom key-value pairs |
chunkCount | Number of chunks after processing |
Document Status
1
pending
Document created, waiting for processing.
2
processing
Content is being chunked and embedded.
3
completed
Ready for queries. All chunks are indexed.
4
failed
Processing failed. Check the error message.
Metadata
Attach custom metadata to documents for filtering and organization:Queries
Orchata provides two types of queries for searching your knowledge base.Standard Query
Search for semantically similar content within specific spaces.Natural language search query.
One or more space IDs to search.
Maximum number of results (1-100).
Minimum similarity score (0-1). Higher values return more relevant but fewer results.
Smart Query
Don’t know which space to search? Smart Query analyzes your query and recommends relevant spaces based on their descriptions.Putting It Together
Here’s a typical workflow for building a RAG application:1
Design Your Spaces
Plan how to organize your content. Group related documents together.
2
Upload Documents
Add content to each space. Let Orchata handle chunking and embedding.
3
Use Smart Query
When a user asks a question, use Smart Query to find relevant spaces.
4
Search Spaces
Query the recommended spaces with the user’s question.
5
Generate Response
Pass the retrieved content to your LLM to generate an answer.