Intelligent Healthcare Matching | TechCare

AI-Driven Recommendation System: Vector Embeddings for Intelligent Healthcare Matching

AI-Driven Recommendation System: Vector Embeddings for Intelligent Healthcare Matching

About the Project

Status

Beta testing with 200+ doctors and 1,000+ active users

Duration

4 weeks from conception to beta release

Team

2 engineers (1 Backend+ML Engineer, 1 Frontend Engineer)

Technologies

OpenAI Embedding API (text-embedding-3-large), Weaviate Vector Database, AWS ECS, AWS Lambda, API Gateway, Python, FastAPI

Next Milestone

Production release with 10,000+ doctor profiles (Q1 2026)

TechCare.Inc developed an AI-powered doctor recommendation system that intelligently matches patients with healthcare providers based on 50+ criteria. By implementing vector embedding technology with Weaviate and OpenAI, we created a fast, reliable, and semantically aware matching system that understands the nuanced relationship between patient needs and doctor specializations.

Performance Highlights

<2s

Matching Response

82%

Relevance Accuracy

200+

Doctors Indexed

1,000+

Active Users

The Challenges

Doctor Pool Management: Maintain a comprehensive database with dynamic updates and efficient querying across large datasets.

Multi-Dimensional Criteria (50+ attributes):

Professional: Expertise, specializations, certifications, experience
Logistical: Location, time slots, appointment types, telehealth
Demographic: Age groups, patient types, gender preferences
Communication: Languages, communication styles
Legal & Compliance: Insurance, licensing, accessibility
Cultural: Ethnicity, cultural competencies, religious considerations
Operational: Fees, wait times, emergency availability

User-Centric Onboarding: Intelligent questionnaire capturing patient preferences while balancing comprehensiveness with user experience and privacy.

Matching Performance: Sub-second response times, high accuracy, explainable recommendations, scalable to thousands of concurrent users.

AI-Driven Intelligence: Semantic understanding beyond keyword matching, context-aware recommendations, learning from interactions, handling ambiguous inputs.

Why Vector Embeddings?

After evaluating rule-based algorithmic matching versus vector embeddings, we chose the vector approach for its superior semantic understanding. The system recognizes that "pediatrician specializing in autism" and "child development specialist with ASD experience" represent highly similar concepts, even without exact keyword matches.

Key Advantages:

Semantic understanding of relationships between criteria
Natural language processing capabilities
Automatic adaptation to new patterns
Scalable similarity search

Solution Architecture

Phase 1: Doctor Profile Vectorization Pipeline

Profile Document Preparation

Each doctor profile includes professional identity, specializations, operational details, patient preferences, communication capabilities, and administrative information.

Batch Processing Infrastructure (AWS ECS)

Document Parsing: Normalize text, extract key-value pairs, expand medical terminology
Embedding Generation: OpenAI's text-embedding-3-large API (3072-dimensional vectors)
Vector Storage: Weaviate database with optimized indexes and metadata
Metadata Management: Composite indexes, geospatial indexing, temporal availability indexing

Phase 2: User Query Processing Pipeline

User-Facing Lambda Service

Serverless architecture handling patient queries:

Input Processing: Receive questionnaire via API Gateway, validate and structure responses
Query Vectorization: Convert answers into a natural language query — e.g. {age: 35, concern: "back pain", language: "Spanish", location: "Miami"} becomes "Looking for a doctor who treats back pain in adults, speaks Spanish fluently, and practices in Miami area. Prefer orthopedic or physical medicine expertise." — then embedded using the same OpenAI model as profiles
Semantic Search: Query Weaviate with patient vector, retrieve top-K neighbors (K=20-50), apply cosine similarity
Filtering & Ranking: Apply hard filters (location, insurance, availability), then re-rank by semantic similarity, exact matches, availability, reviews, and distance

System Architecture

System Architecture
System Architecture

Current Status & Results

System Performance (Beta)

Average response time: 2000ms (target: <500ms)
Vectorization: 50 profiles/minute
Database: 200+ doctor profiles
Capacity: 500+ concurrent users

Matching Accuracy

User satisfaction (top 3): 78%
Relevance agreement: 82%
Cross-validation agreement: 73%
Successful bookings: 64%

Key Learnings

Semantic Understanding: Handles synonyms, misspellings, and related concepts (e.g., "joint pain" → "rheumatology")
Hybrid Value: Cross-validation catches edge cases, provides explainability
User Preferences: Users prefer 5-7 recommendations; explanations increase bookings; location remains top priority
Technical Issues: 15-20 min re-vectorization latency, Lambda cold starts, balancing semantic similarity with constraints

Implementation Details

Technology Stack

Component Detail
Backend AWS ECS, AWS Lambda, API Gateway, Python 3.11+, FastAPI
Vector Weaviate with HNSW algorithm, hybrid search (vector + keyword)
AI OpenAI Embedding API (text-embedding-3-large), OpenAI Python SDK
Data NumPy, Pandas
Monitoring CloudWatch, custom metrics, A/B testing framework

Performance Optimization

Batch processing with OpenAI's batch API (50% cost reduction)
Pre-computed embeddings with caching
Approximate nearest neighbor search (ANN)
Progressive filtering and result caching
Horizontal Lambda scaling, Weaviate clustering

Benefits Achieved

For Patients: Time reduction from hours to seconds, discovery of relevant specialists, personalized recommendations, improved confidence

For Healthcare Providers: Better matching accuracy, improved utilization, reduced no-shows, demand analytics

For TechCare: 60% reduction in support queries, scalable growth, demand insights, foundation for AI features

Conclusion

TechCare's AI-driven doctor recommendation system represents a significant advancement in healthcare matching technology. By leveraging vector embeddings and semantic search, we've created a system that understands nuanced relationships between patient needs and provider capabilities far beyond traditional keyword matching.

Challenges & Solutions

1

API Latency & Cost

Pre-compute embeddings, use batch API (50% savings), implement CDN distribution

2

Cold Start

Hybrid scoring weights structured criteria higher for new doctors until interaction data exists

3

Criteria Imbalance

Two-stage filtering—hard constraints first, semantic similarity within qualified subset

4

Compliance

HIPAA-compliant architecture, disclaimers, human oversight for flagged cases

Lessons Learned

Hybrid Approach: Combines AI innovation with reliability

Explainability: Critical for healthcare context and user trust

Data Quality: Well-structured profiles produce better embeddings

API Optimization: Batch processing and caching control costs

Continuous Monitoring: Track both technical and business metrics

Scale Planning: Design for 10x growth from day one

Other Case Studies

Scaling Access & Value
Mental Health Care

Scaling Access & Value

Our healthcare platform project raised $550K, sustained success for 5+ years, and expanded reach with powerful mobile and web experiences.

Transforming Learning Platforms
Education

Transforming Learning Platforms

Our dedicated tech teams delivered innovative tech solutions, optimizing operations and driving impressive cost savings and growth.

AI K-Base Assistant for Multi-Stakeholder Teams
Artificial Intelligence / Productivity

AI K-Base Assistant for Multi-Stakeholder Teams

Built a Claude-powered chatbot that delivers real-time, personalized answers across teams, automating knowledge sharing and documentation.

E-commerce with a Mobile-First Experience
E-commerce

E-commerce with a Mobile-First Experience

One of Bangladesh's leading online bookstores and e-commerce platforms, serving millions of readers and shoppers across the country.

Turning Yardly's Website Into a Scalable Growth Engine
Home Maintenance

Turning Yardly's Website Into a Scalable Growth Engine

Yardly is a Canada-based yard care service provider offering year-round solutions including lawn maintenance, seasonal clean-ups, and snow removal across Edmonton and Calgary.

An AI HR Agent That Gave the People & Culture Team Their Time Back
AI HR Automation

An AI HR Agent That Gave the People & Culture Team Their Time Back

At TechCare, the People & Culture team was spending 8–12 hours every week answering the same five Slack questions. The data existed. The problem was access.