✅ MANUELA — COMPLETE TECHNICAL ASSESSMENT
Senior AI/ML + Blockchain + Cloud Architect.
Dataset used: US Border Crossing Port Activity Data (stored in MySQL us_border_crossing_data.border_crossing_entry_data).
Sample rows (same schema as CSV)
Port Name | State | Port Code | Border | Date | Measure | Value | Latitude | Longitude | Point
Jackman | Maine | 0104 | US-Canada Border | Jan-24 | Trucks | 6556 | 45.806 | -70.397 | POINT (-70.396722 45.805661)
Porthill | Idaho | 3308 | US-Canada Border | Apr-24 | Trucks | 98 | 49 | -116.499 | POINT (-116.49925 48.999861)
San Luis | Arizona | 2608 | US-Mexico Border | Apr-24 | Buses | 10 | 32.485 | -114.782 | POINT (-114.7822222 32.485)
Warroad | Minnesota | 3423 | US-Canada Border | Jan-24 | Personal Vehicle Passengers| 9266 | 48.999 | -95.377 | POINT (-95.376555 48.999)
Ysleta | Texas | 2401 | US-Mexico Border | Jan-24 | Personal Vehicle Passengers| 521714 | 31.673 | -106.335 | POINT (-106.335449846028 31.6731261376859)
Reference this table directly when prepping data for QLoRA/RAG; Point is stored as a spatial POINT.
SECTION 1 — AI/ML + MODERN LLM ENGINEERING
1.1 Practical Conceptual Questions (Short Technical Answers Required)
These map directly to real production AI work.
- Compare pretraining, SFT, RLHF, DPO, LoRA fine-tuning in LLMs.
- Provide concise, technical differences and when to use each.
- Explain how RAG reduces hallucinations when answering questions about border-crossing activity.
- Be precise about retrieval, grounding, and context-aware scoring.
- Explain tokenizers, positional encodings, and attention mechanisms using the border dataset as input examples.
- Map how each component processes tabular text into model-ready tensors.
- Explain KV-cache, quantization (4bit/8bit), speculative decoding and how they speed up inference for your RAG agent.
- Highlight memory reuse, reduced precision math, and shorter search paths.
- Compare vLLM vs TensorRT-LLM vs HuggingFace Transformers for high-throughput border analytics, small-batch low-latency inference, GPU optimization.
- List criteria per workload and GPU tuning differences.
- Explain how to protect your LLM API from prompt injection, jailbreak attempts, training data extraction (border records).
- Describe guardrails, filters, and watermarking.
Each answer must be short (5–7 lines), highly technical, and precise.
1.2 Hands-On ML Task
Task: Build a Border-Crossing QA Model (QLoRA + RAG + API)
A. QLoRA Fine-Tuning (Llama-3-8B)
- Deliverable:
train_llama_border_qlora.py
- Load Llama-3-8B using 4-bit quantization.
- Apply QLoRA/PEFT adapters.
- Convert your table into instruction-style JSONL.
- Train using PyTorch + Hugging Face Trainer.
- Save the LoRA adapter and log metrics (loss, perplexity).
B. Evaluation Pipeline
- Deliverable:
evaluate_border_qa.py
- Implement Exact Match (EM), F1 score, ROUGE-L.
- Use a small eval set manually derived from the dataset.
C. RAG Pipeline (FAISS)
- Deliverable:
rag_border_pipeline.py
- Chunking (each row = one document).
- Embedding using
bge-small-en or gte-large.
- FAISS index, retriever returning top-k rows.
- Re-ranking with a Cross-Encoder.
D. Inference API (FastAPI)
- Deliverable:
app.py
- Single endpoint
/ask performing retrieval, re-rank, LLM generation, guardrails, and response with sources.
SECTION 2 — AI/ML ENGINEERING (PRODUCTION)
2.1 Architecture Challenge — Real-Time LLM Microservice
Design a production inference system for border analytics covering:
- Support for vLLM or TensorRT-LLM.
- GPU autoscaling with AWS EKS/Karpenter.
- Server-Sent Events or WebSockets for streaming tokens.
- Feature store for caching, user embeddings, safety scores.
- Canary deployments.
- Vector DB integration (FAISS / Pinecone).
- A/B testing for different LoRA models.
Deliverables: Architecture Diagram, Component Responsibilities, Scaling Strategy, Failure Modes & Mitigations.
SECTION 3 — BLOCKCHAIN ENGINEERING
Use the border-crossing data as the economic asset: every record becomes an on-chain data point, users stake tokens on predictions, rewards depend on accuracy.
3.1 Smart Contract Assignment
- Deliverables:
/contracts/BorderStaking.sol and /test/border_staking.test.js or .t.sol.
- ERC-20 staking with fixed APR and early withdrawal penalty.
- Upgradeable via UUPS or Transparent Proxy.
- Full Hardhat or Foundry test suite with gas optimizations and security protections.
- Event logging for real-time analytics.
3.2 DApp Frontend
- Deliverable:
/frontend/ built with React + Vite + Wagmi.
- Dashboard linking wallet (Wagmi + Ethers.js) with stake/withdraw UI.
- Display user positions, APR, TVL, on-chain events.
- Backend indexer using Node.js + PostgreSQL / DynamoDB at
/indexer/.
SECTION 4 — BACKEND ENGINEERING (REST + GraphQL)
- Deliverable:
/backend/ supporting REST endpoints, GraphQL schema (borderSearch, nearestPorts, statistics), and JWT authentication.
- Integrations with the LLM inference microservice, blockchain indexer, and AWS S3 dataset storage.
- Provide Jest unit tests and a CI/CD pipeline (GitHub Actions or Bitbucket).
SECTION 5 — CLOUD + DEVOPS (AWS)
- Deploy full system on AWS with ECS or EKS GPU nodes, DynamoDB or RDS for border records, SQS/SNS for async processing.
- Expose APIs through API Gateway and serve the DApp via CloudFront.
- Implement IAM least-privilege, Terraform or AWS CDK IaC, CloudWatch logging, and Grafana dashboards.
- Deliverables:
/infra/terraform/*, infrastructure diagram, and blue/green vs rolling deployment explanation.
SECTION 6 — FULL-STACK FRONTEND
- Deliverable:
/dashboard/ with real-time inference logs, GPU utilization (metrics API), border traffic visualizations.
- Use Recharts or ECharts graphs with Zustand or Redux Toolkit state + Tailwind or Material UI styling.
SECTION 7 — FINAL SYSTEM DESIGN CHALLENGE
Design a full real-time AI-powered border analytics platform that:
- Ingests border crossing data, streams events through Kafka.
- Enriches + embeds documents, stores in a vector DB.
- Supports AI assistant queries, 50k concurrent users, <1s inference, horizontally sharded historical data, GPU autoscaling, security & governance.
Deliverables: System sequence diagram, data flow + storage schema, API service layout, scaling strategy, and security considerations.