Note: All code in this guide uses the official HydraDB TypeScript SDK (@hydradb/sdk). Base URL:https://api.hydradb.com. Get your API key at app.hydradb.com.
Prerequisites
Required knowledge: TypeScript/JavaScript basics, REST APIs, environment variablesRequired tools:
- HydraDB API key
- Node.js 18+ (
node --version) npm install @hydradb/sdk
What You’ll Build
By the end of this cookbook, you’ll be able to:- Upload structured candidate profiles into HydraDB with rich metadata (experience, skills, company history, education)
- Search candidates using natural language queries like “Find me someone who has 5+ years of ML experience and worked at Apple”
- Rank candidates by fit score and generate personalized interview questions per candidate
- Personalize candidate suggestions with each recruiter’s preferences and past successful hires
The Problem with Traditional Hiring Platforms
Traditional hiring platforms force recruiters to think like databases:- Keyword matching: “Machine Learning OR Apple OR 5 years”
- Boolean operators: Complex database-style search syntax
- Manual screening: Hours spent reviewing irrelevant profiles
- Missed candidates: Great candidates who don’t match exact keywords
The AI-Powered Solution
With HydraDB, recruiters can search naturally:- “Find me someone who has 5+ years of experience in machine learning and has worked at Apple before”
- “I need a senior frontend developer who has experience scaling React applications at a startup”
- “Show me candidates who transitioned from consulting to product management at a tech company”
- “Fetch the essays for the candidates that have gone to Harvard for their masters in computer science”
Architecture Overview
Step 1: Data Ingestion Strategy
Understanding Candidate Data Structure
Good search starts with well-structured candidate data. Here’s how to organize a profile:Core Candidate Profile Structure
metadata is capped at 16 KiB and additional_metadata at 1 KiB. A metadata value can nest one level (a list of strings, or a flat object), so a list of company objects is rejected. Put long history in content.text.
Upload the profile as an app source. Ingestion is asynchronous: poll GET /context/status until its indexing_status is completed (or errored) before you rely on search results.
Critical Metadata Fields for Hiring Success
Experience Metadata
Skills and Technology Metadata
Education and Achievement Metadata
Step 2: Natural Language Search Implementation
Understanding Query Intent
The power of AI search lies in understanding what recruiters really mean:Query Types and Patterns
Implementing HydraDB Search for Hiring
Send the samecollection you ingested the profiles into; a query without collection reads only the database’s default collection.
Step 3: AI Memories for Personalized Recruiting
Understanding Recruiter Patterns
A recruiter profile captures each recruiter’s preferences and hiring patterns:What AI Memories Capture
Implementing Personalized Search
Pass your profile lookup function tonew PersonalizedRecruitingSearch(getRecruiterProfile). To keep the profile in HydraDB, store it as memories per recruiter and read it back with a type: "memory" query.
Example: AI Memory in Action
Here’s what a recruiter profile changes for the same query:Without a Recruiter Profile
With a Recruiter Profile
Step 4: Advanced Search Features
Complex Query Understanding
Real recruiter queries mix several requirements at once. Here is how they break down:Multi-Criteria Searches
Metadata-assisted filtering
Use HydraDB metadata filters for exact hard requirements (for examplejob_search_status: "actively_looking") on fields declared in the database metadata schema. Keep range requirements such as years of experience or salary in the natural-language query and in your own ranking step; metadata_filters support equals, contains, and contains_any, not range operators.
Pass an acceptsCandidate(candidate, criteria) function that checks salary, experience, and deal-breakers against your profile fields. Return false when a required value is missing. The method requires this function and returns only candidates it accepts.
Step 5: Intelligent Candidate Matching
Semantic Understanding vs. Keyword Matching
Traditional platforms rely on exact keyword matches. AI search understands concepts and relationships:Traditional Keyword Search Limitations
Semantic Search
Smart Ranking and Scoring
This example scores experience againstsearchContext.experience_requirements. Add your own checks for skills, availability, and other job requirements. These scores are application rules, not HydraDB relevance scores.
Step 6: Real-World Search Examples
The examples below are illustrative output of the full pipeline: HydraDB retrieval plus the ranking and scoring code above.Example 1: Technical Role Search
Example 2: Leadership Transition Search
Example 3: Specialized Domain Search
Step 7: AI-Powered Interview Preparation
Intelligent Interview Question Generation
Use the retrieved profile to draft interview questions. This example takes arole with title and min_experience:
Step 8: Best Practices for AI-Powered Hiring
Data Quality Guidelines
Essential Fields for Optimal Search Results
Search Strategy Recommendations
Progressive Search Refinement
Query Optimization Tips
- Use Natural Language: Write queries as you would speak to a human recruiter
- Include Context: Add company stage, team size, and cultural requirements
- Specify Experience: Use ranges (3-5 years, 5+ years) rather than exact numbers
- Combine Hard and Soft Skills: Technical requirements + leadership/communication needs
- Add Industry Context: Startup vs. enterprise, B2B vs. consumer, etc.
Performance Optimization
Search Efficiency Best Practices
Step 9: Measuring Success
Key Metrics for AI Hiring Platforms
Conclusion
HydraDB moves recruiting from a manual, keyword-based process to a conversational one. With natural language search, rich metadata, and recruiter memory, recruiters can:- Find better candidates faster: AI understands intent beyond keywords
- Improve matching accuracy: Semantic search finds relevant candidates traditional systems miss
- Personalize the experience: Recruiter profiles capture each recruiter’s preferences and successful patterns
- Scale efficiently: Handle complex queries that would require multiple traditional searches
- Make data-driven decisions: Rich insights and scoring help prioritize candidates
- Rich data ingestion: Comprehensive candidate profiles with structured metadata
- Natural language interface: Let recruiters search as they think and speak
- Recruiter memory: Keep each recruiter’s preferences and past hires, and feed them into ranking
- Iterative refinement: Improving search quality based on hiring outcomes
