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)
- Use min_relevance to filter out low-quality matches
Sentence-level search provides the highest precision but with minimal context. Each result is a single, focused statement or fact from the document.
You can provide either:
- A text query (which will be converted to embeddings)
- A pre-computed embedding vector (1536 dimensions)
Filter options:
- min_relevance: Set a threshold (0-1) to only return results above a certain relevance score
POST
Authorizations
Headers
Body
application/json
Request model for searching sentences.
Response
200
application/json
Successful Response
Response model for sentence search.