Documents
Search Document Sentences
Search through document sentences using semantic similarity.
This endpoint performs a semantic search at the sentence level, which is best for:
- Finding very specific information or facts
- Getting precise answers to questions
- When you need the most granular search results
Performance Considerations:
- Slower search performance due to more vectors
- Highest memory usage
- Best for smaller, focused searches
- Consider impact on rate limits
Best Practices:
- Use only when specific facts are needed
- Keep document set focused using metadata filters
- Consider caching frequent queries
- Use smaller top_k values (5-10 recommended)
Sentence-level search provides the highest precision but with minimal context. Each result is a single, focused statement or fact from the document.
POST
Headers
Body
application/json
Request model for searching sentences.
The search query
Optional metadata filters using MongoDB-like query syntax
Number of results to return
Required range:
1 <= x <= 100
Whether to optimize metadata filter
Whether to optimize search query
Response
200
application/json
Successful Response
Response model for sentence search.
Response data
Schema for API error responses.
Example:
{
"error_code": "RESOURCE_NOT_FOUND",
"message": "Resource not found"
}
Metadata for API responses