docs: Add text guide - #5102
Conversation
There was a problem hiding this comment.
Greptile Summary
This PR adds comprehensive documentation for text processing capabilities in Daft by creating a new text guide (docs/modalities/text.md) and updating the turbopuffer connector documentation for consistency. The new text guide provides practical examples for two key text processing features: text embeddings and text chunking.
The text guide demonstrates how to use Daft's embed_text function with different providers, specifically Sentence Transformers and OpenAI. It includes complete code examples showing how to generate embeddings from text data, with proper installation instructions using Daft's optional dependency groups (daft[sentence-transformers] and daft[openai]). The guide also covers text chunking using spaCy within user-defined functions (UDFs), showing how to split large text documents into smaller, manageable chunks for processing.
The turbopuffer connector documentation was updated to align with the new installation pattern established in the text guide. Instead of standalone pip install commands for individual packages, the documentation now recommends using Daft's optional dependency groups (daft[turbopuffer], daft[openai], daft[sentence-transformers]). This change ensures users install compatible versions of third-party packages along with any additional dependencies that Daft requires for proper integration.
These changes integrate well with Daft's existing AI/ML infrastructure, building upon the framework's text embedding capabilities found in modules like daft/ai/sentence_transformers/ and daft/ai/openai/. The documentation follows Daft's established patterns for guides and provides users with clear, actionable examples for implementing text processing workflows.
Confidence score: 4/5
- This PR is safe to merge with only minor issues that should be addressed
- Score reflects well-structured documentation with clear examples, but contains several typos and minor inconsistencies that affect polish
- Pay close attention to the new text.md file for typos and code consistency issues
2 files reviewed, 3 comments
## Changes Made Add guide on embedding and chunking text.
Changes Made
Add guide on embedding and chunking text.