xAI Grok Collections API Release
xAI has announced the Collections API, a managed knowledge base service that allows developers to upload and search through entire datasets—including PDFs, Excel sheets, and codebases—to build Retrieval-Augmented Generation (RAG) applications without managing their own indexing and retrieval infrastructure.
Managed Indexing and Document Understanding
The Collections API handles the complexities of data ingestion and storage. It utilizes OCR and layout-aware parsing to extract text while preserving the structural integrity of documents, such as the hierarchy of Excel tables, the layout of PDFs, and the syntax of code.
Key management features include:
- Broad Format Support: The API supports a wide range of file types.
- Efficient Reindexing: The system automatically reindexes files when they change to ensure the knowledge base remains current.
- File Management: Developers can upload, update, and download files within their collections.
Retrieval Methods and Search Capabilities
To optimize for different use cases, the Collections API provides three distinct retrieval methods:
- Semantic Search: Used for queries based on meaning and intent.
- Keyword Search: Used for precise term matching.
- Hybrid Search: Combines keyword and semantic search for maximum accuracy. This method supports reciprocal rank fusion and a dedicated reranker model.
Performance Benchmarks
xAI reports that the Collections API, paired with Grok 4.1 Fast, delivers state-of-the-art retrieval performance in domains characterized by long, dense documents, such as finance, legal, and coding.
Domain-Specific Accuracy
According to internal benchmarks, Grok 4.1 Fast outperformed or matched competitors in several key tasks:
| Task | xAI Grok 4.1 Fast | Google Gemini Pro 3 | OpenAI GPT 5.1 |
|---|---|---|---|
| Finance (Tabular and numerical questions) | 93.0 | 85.9 | 84.7 |
| Legal (Complex reasoning over multiple chunks) | 73.9 | 74.5 | 71.2 |
| Coding (Code understanding and large file systems) | 86 | 85 | 81 |
Specialized Dataset Evaluations
- Financial Analysis: Hybrid search is highlighted as a critical tool for retrieving tabular and numerical data from sources like SEC filings.
- Legal Analysis: Using the LegalBench dataset (128 question-answer pairs from commercial contracts), the API was tested for its ability to handle nuanced legal language and cross-references.
- DeepCodeBench: The API's code understanding capabilities were evaluated using the DeepCodeBench dataset, which includes tasks from real-world open-source repositories and complex algorithmic problems. End-to-end answer performance was tested across 8 repositories containing 8,000 files.
Data Privacy and Pricing
Data Privacy: xAI states that user data stored in Collections is not used for model training purposes unless the user provides explicit consent.
Pricing: For the initial launch phase, file indexing and storage are free for the first week. Retrieval is priced at a flat rate of $2.50 per 1,000 searches.
Sources
- OriginalGrok Collections API
Related
- Dispatch
- Dispatch
- Dispatch
- Dispatch
- Dispatch