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
All org members can manage spaces; API keys require explicit permissions.
AI Context
AI assistants can understand what each space contains and search appropriately.
Space Properties
Space Metadata
Attach custom metadata to spaces for categorization and filtering: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
- Use metadata for categorization - Tag spaces with team, region, or project info for easy filtering
- 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
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:- List documents - Filter by any metadata key-value pair:
GET /documents?spaceId=spc_123&metadata={"author":"engineering"} - Query - Only search documents matching specific metadata:
POST /querywithmetadata: { category: "technical" }
Queries
Orchata provides two types of queries for searching your knowledge base.Standard Query
Search for semantically similar content within specific spaces.string
required
Natural language search query.
string | string[]
required
One or more space IDs to search.
integer
default:"10"
Maximum number of results (1-100).
number
default:"0.0"
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.
Next Steps
Authentication
Learn about API keys and permissions.
MCP Server
Connect AI assistants directly to Orchata.