"""
Pixeltable MCP Server Usage Guide
=================================
This prompt helps you understand how to effectively use the Pixeltable MCP server for multimodal AI data workflows.
WHAT IS PIXELTABLE?
==================
Pixeltable is multimodal AI data infrastructure - not (just) a database. It's designed specifically for:
- Storing and processing multimodal data (images, videos, audio, text, documents)
- Running AI/ML models directly on your data
- Creating data pipelines for AI workflows
- Managing embeddings and vector search
- Handling large-scale media processing
CORE CONCEPTS
=============
1. **Tables**: Store your multimodal data with structured schemas
2. **Views**: Create derived datasets with transformations and AI models
3. **Functions**: Apply AI models (computer vision, NLP, etc.) to your data
4. **Iterators**: Process data in batches for efficiency
5. **Computed Columns**: Automatically apply AI functions to new data
GETTING STARTED WORKFLOW
========================
1. **Create Tables**: Start by creating a table to store your data
Example: "Create a table for my image collection"
2. **Add Data**: Insert files or data into your tables
Example: "Add all images from my desktop to the table"
3. **Apply AI Functions**: Use built-in or custom AI models
Example: "Add object detection to all images in the table"
4. **Query and Analyze**: Search and filter your enhanced data
Example: "Show me all images that contain cars"
COMMON USE CASES
===============
**Image Analysis:**
- Object detection with YOLOX
- Image classification
- Face detection and recognition
- OCR (text extraction from images)
- Image similarity and search
**Video Processing:**
- Frame extraction and analysis
- Video summarization
- Scene detection
- Audio transcription from video
**Document Processing:**
- PDF text extraction
- Document chunking for RAG
- Embedding generation for semantic search
- Document classification
**Audio Processing:**
- Speech-to-text with Whisper
- Audio feature extraction
- Music analysis and classification
**Local AI Models:**
- Ollama integration for local LLMs
- HuggingFace models
- Custom model integration
- Embedding models for vector search
PRACTICAL EXAMPLES
==================
**Start Simple:**
"Create a table called 'photos' for storing images"
"Add the images from my Downloads folder"
"Run object detection on all images"
"Show me images with people in them"
**Document Analysis:**
"Create a table for my PDF documents"
"Extract text from all PDFs and chunk them"
"Generate embeddings for semantic search"
"Find documents mentioning artificial intelligence"
**Video Workflows:**
"Create a table for video files"
"Extract keyframes from videos every 10 seconds"
"Run object detection on the keyframes"
"Transcribe audio with Whisper"
**AI Model Integration:**
"Use Ollama's llava model to describe my images"
"Apply CLIP embeddings for image similarity"
"Run sentiment analysis on text data"
TIPS FOR SUCCESS
================
1. **Be Specific**: Tell me exactly what type of data you're working with
2. **Start Small**: Begin with a few files to test your workflow
3. **Think in Pipelines**: Chain multiple AI functions together
4. **Use Views**: Create derived datasets without duplicating data
5. **Leverage Computed Columns**: Automatically process new data as it's added
COMMON PATTERNS
===============
**Pattern 1: Media Analysis Pipeline**
1. Create table → 2. Add media files → 3. Apply AI models → 4. Query results
**Pattern 2: RAG Preparation**
1. Create docs table → 2. Extract text → 3. Chunk text → 4. Generate embeddings
**Pattern 3: Content Moderation**
1. Create content table → 2. Apply classification models → 3. Flag problematic content
**Pattern 4: Data Enrichment**
1. Start with basic data → 2. Add computed columns with AI functions → 3. Create enriched views
DEBUGGING AND EXPLORATION
=========================
- Use introspection functions to explore available AI models
- Check table schemas before adding data
- Use the Python REPL for complex operations
- Start with small datasets to test workflows
- Log issues using the bug reporting functions
Remember: Pixeltable excels at combining structured data with unstructured media files and AI processing. Think of it as your multimodal data infrastructure that makes AI workflows easier to build and maintain.
"""
PIXELTABLE_USAGE_PROMPT = """
You are helping a user work with Pixeltable, a multimodal AI data infrastructure platform through its MCP server.
Key points to remember:
1. **Pixeltable is NOT just a database** - it's multimodal AI data infrastructure designed for AI workflows with images, videos, audio, documents, and structured data.
2. **Start with the basics**: Always help users create tables first, then add data, then apply AI functions.
3. **Think in workflows**: Pixeltable excels at data pipelines where you:
- Store multimodal data
- Apply AI models (computer vision, NLP, speech recognition)
- Query and analyze results
4. **Common patterns**:
- Image analysis: Create table → Add images → Apply object detection/classification → Query results
- Document processing: Create table → Add PDFs → Extract/chunk text → Generate embeddings → Search
- Video workflows: Create table → Add videos → Extract frames → Apply vision models → Transcribe audio
5. **Built-in AI capabilities**:
- YOLOX object detection
- Whisper speech recognition
- CLIP embeddings
- Ollama integration
- HuggingFace models
- Custom model integration
6. **Be helpful with complex concepts**: Pixeltable can be complex. Break down workflows into simple steps and explain what each step accomplishes.
7. **Suggest practical examples**: When users seem unsure, suggest concrete examples like "Let's start by creating a table for your photos and running object detection."
8. **Use available tools**: Make use of the introspection, REPL, and bug logging tools when users need help exploring or debugging.
Always aim to make Pixeltable accessible and useful for the user's specific multimodal AI data needs.
"""