Appearance
Semantic Search
Query documents using natural language.
Basic Search
bash
curl -X POST https://api.gateflow.ai/v1/data/search \
-H "Authorization: Bearer gw_prod_..." \
-H "Content-Type: application/json" \
-d '{
"query": "What is the refund policy?",
"collection": "policies",
"limit": 10
}'Response:
json
{
"results": [
{
"chunk_id": "chunk_123",
"document_id": "doc_456",
"content": "Refunds are available within 30 days of purchase...",
"score": 0.92,
"metadata": {
"filename": "refund-policy.pdf",
"page": 2
}
}
]
}Filters
By Metadata
json
{
"query": "refund policy",
"filters": {
"department": "legal",
"year": {"$gte": 2023}
}
}By Classification
json
{
"query": "employee benefits",
"classification_max": "internal"
}Hybrid Search
Combine semantic and keyword search:
json
{
"query": "refund policy",
"mode": "hybrid",
"keyword_weight": 0.3,
"semantic_weight": 0.7
}Search with Rerank
json
{
"query": "refund policy",
"limit": 20,
"rerank": {
"enabled": true,
"model": "rerank-english-v3.0",
"top_k": 5
}
}Next Steps
- Rerank Integration - Improve results
- RAG Injection - Use with LLM