What is LlamaIndex Integration?
The Moorcheh Vector Store integration with LlamaIndex provides a powerful way to build advanced document processing and retrieval systems. This integration combines Moorcheh’s lightning-fast semantic search with LlamaIndex’s sophisticated document processing capabilities.Key Features
Document Processing
Advanced document loading, chunking, and processing with LlamaIndex
Vector Storage
Efficient vector storage and retrieval using Moorcheh’s MIB technology
Query Engine
Powerful query engine with metadata filtering and advanced search
AI Integration
Seamless integration with various AI models for generative answers
Installation
Install the required packages:Quick Start
Import Required Libraries
Configure Logging
Load Moorcheh API Key
Document Processing
Load and Chunk Documents
Adjust
chunk_size and chunk_overlap based on your document type and requirements. Larger chunks provide more context but may reduce precision.Vector Store Setup
Initialize Vector Store
Configuration Parameters
Namespace Configuration
Namespace Configuration
- namespace: Unique identifier for your vector store
- namespace_type: “text” for text-based or “vector” for vector-based namespaces
- vector_dimension: Dimension of vectors (None for text-based namespaces)
Performance Settings
Performance Settings
- batch_size: Number of documents to process in each batch
- add_sparse_vector: Whether to include sparse vectors for hybrid search
Create Vector Store Index
Querying the Vector Store
Basic Query
AI-Powered Query
Advanced Features
Metadata Filtering
Filter documents based on metadata:Supported Filter Operators
EQ
Equal to
NEQ
Not equal to
GT
Greater than
GTE
Greater than or equal
LT
Less than
LTE
Less than or equal
IN
In list
NIN
Not in list
Multiple Filters
Configuration Options
Chunking Strategy
Customize how documents are chunked:Batch Processing
Optimize batch size for your use case:Sparse Vectors
Enable hybrid search with sparse vectors:AI Models
Supported Models
| Model ID | Name | Provider | Description |
|---|---|---|---|
| anthropic.claude-sonnet-4-20250514-v1:0 | Claude Sonnet 4 | Anthropic | Hybrid reasoning, extended thinking, efficient code generation |
| anthropic.claude-sonnet-4-5-20250929-v1:0 | Claude Sonnet 4.5 | Anthropic | Latest Claude model with enhanced capabilities and agentic search |
| meta.llama4-maverick-17b-instruct-v1:0 | Llama 4 Maverick 17B | Meta | 1M token context, fine tuning, text summarization, function calling |
| meta.llama3-3-70b-instruct-v1:0 | Llama 3.3 70B | Meta | Advanced reasoning and decision making capabilities |
| amazon.nova-pro-v1:0 | Amazon Nova Pro | Amazon | 300K context, chat optimized, complex reasoning, math |
| deepseek.r1-v1:0 | DeepSeek R1 | DeepSeek | Advanced reasoning and code generation |
| openai.gpt-oss-120b-1:0 | OpenAI GPT OSS 120B | OpenAI | Hybrid reasoning, extended thinking, efficient research |
| qwen.qwen3-32b-v1:0 | Qwen 3 32B | Qwen | Text generation and code generation |
Model Selection
Choose the best model for your use case:Best Practices
Document Preparation
1
Organize Documents
Place documents in a structured directory for easy loading
2
Set Appropriate Chunk Size
Balance between context and precision (512-1024 characters)
3
Add Rich Metadata
Include file paths, dates, and other relevant metadata
4
Test Different Configurations
Experiment with different chunk sizes and overlap values
Performance Optimization
- Use appropriate batch sizes based on your memory constraints
- Enable sparse vectors for hybrid search when needed
- Monitor API usage and rate limits
- Cache frequently accessed results
Error Handling
Troubleshooting
Common Issues
API Key Issues
API Key Issues
- Ensure MOORCHEH_API_KEY is set in environment variables
- Check API key permissions and validity
- Verify the key has access to the specified namespace
Document Loading Problems
Document Loading Problems
- Check document file paths and formats
- Ensure documents are readable and not corrupted
- Verify directory structure for SimpleDirectoryReader
Query Performance
Query Performance
- Adjust chunk size and overlap settings
- Use metadata filters to narrow down results
- Consider enabling sparse vectors for better search
Memory Issues
Memory Issues
- Reduce batch size for large document collections
- Process documents in smaller batches
- Monitor memory usage during indexing
Debug Mode
Enable detailed logging for troubleshooting:Advanced Usage
Custom Embeddings
Custom Vector Store
Hybrid Search
Examples
Financial Document Analysis
Legal Document Search
Further Resources
LlamaIndex Documentation
Complete LlamaIndex documentation and guides
Moorcheh SDK
Moorcheh Python SDK repository
Examples Repository
Practical examples and tutorials
Community Support
Join the LlamaIndex community
Support
Need help with the LlamaIndex integration?Get Support
Contact our support team for assistance