Exnest Brain Search (EBS)
Exnest Brain Search (EBS) is an API-powered MongoDB search with 2-layer AI processing to find and analyze data intelligently.
How 2-Layer AI Works
Section titled “How 2-Layer AI Works”Layer 1: Keyword Extraction
Section titled “Layer 1: Keyword Extraction”- AI analyzes user query
- Extracts 3-7 most relevant keywords
- Example: “machine learning best practices” →
["machine", "learning", "practices"]
Layer 2: Intelligent Filtering
Section titled “Layer 2: Intelligent Filtering”- MongoDB search using keywords
- AI re-ranks results with persona context
- Scores each result 0-100
- Returns only highly relevant results (≥50)
- Provides reasoning for each result
Request Parameters
Section titled “Request Parameters”Required
Section titled “Required”| Parameter | Type | Description |
|---|---|---|
query | string | Search query (3-2000 chars) |
mongoUrl | string | MongoDB connection string |
dbName | string | Database name |
collection | string | Collection name |
Optional
Section titled “Optional”| Parameter | Type | Default | Description |
|---|---|---|---|
model | string | API key default | AI model to use |
persona | string | ”helpful assistant” | Personality for AI analysis |
limit | number | 10 | Max results (1-100) |
systemPrompt | string | default | Custom system prompt |
metadata | object | Custom metadata |
Raw HTTP Examples
Section titled “Raw HTTP Examples”curl -X POST https://api.exnest.app/v1/ebs/search \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "machine learning algorithms", "mongoUrl": "mongodb://localhost:27017", "dbName": "testdb", "collection": "articles" }'curl -X POST https://api.exnest.app/v1/ebs/search \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "best practices for scalable systems", "mongoUrl": "mongodb://localhost:27017", "dbName": "testdb", "collection": "articles", "persona": "expert software architect", "model": "gpt-4-mini", "limit": 10 }'Response Format
Section titled “Response Format”{ "success": true, "status_code": 200, "message": "EBS search completed successfully.", "data": { "query": "machine learning", "keywords": ["machine", "learning", "algorithms"], "raw_results": [ { "_id": 1, "title": "...", "content": "..." } ], "ai_analysis": { "summary": "Found 3 articles about ML...", "filtered_results": [ { "original_data": {...}, "relevance_score": 95, "reason": "Directly addresses ML algorithms" } ], "recommendations": ["...", "..."] } }, "meta": { "timestamp": "2025-12-07T...", "execution_time": "2.543s", "execution_time_ms": 2543, "request_id": "req_...", "version": "v1.0" }}