search_segment
Find relevant document segments using TF-IDF search, returning highlighted snippets with context around matched terms to locate specific information within large documents.
Instructions
Search for relevant segments using TF-IDF.
Returns snippets with matched terms highlighted.
Args: query: Search query (keywords or phrases). document_id: Optional: limit search to a specific document. segment_id: Optional: search within a specific segment only. limit: Maximum number of results to return (default: 5). context_words: Number of words around matches in snippets (default: 50).
Returns: Search results with scores and snippets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| document_id | No | ||
| segment_id | No | ||
| limit | No | ||
| context_words | No |