Masih Moafi

AI/ML engineer building and evaluating AI coding agents, context engineering systems, LLM safety research, retrieval tools, and machine-learning projects.

Engineering Specialization & Core Pillars

I build, evaluate, and optimize autonomous LLM agent systems with an emphasis on context engineering, local hybrid retrieval (RAG), and empirical LLM safety research. My work bridges low-level systems programming in Rust and C++ with high-throughput neural pipelines in PyTorch and transformers.

  • Context Engineering & Agent Harnesses: Explicit token admission, context inspection, memory compaction, and session continuity for autonomous coding assistants.
  • High-Throughput Local Retrieval: Merging Tantivy BM25 lexical indexing with LanceDB columnar vector storage via Reciprocal Rank Fusion for air-gapped search.
  • LLM Safety & Red-Teaming: Controlled evaluations of prompt injection, role confusion, chain-of-thought forgery, and reasoning-channel leakage.

Selected Projects & Applied Research

  • Elpis

    An agent harness built on Codex, with a desktop app and a terminal app, where you choose what each agent sees.

  • rag-mcp

    An MCP server that finds relevant passages in local files and code without loading the whole workspace.

  • LLM Safety

    LLM safety research on tool-result ordering, framing and reasoning leakage, and agent hierarchies.

  • Financial Market Analysis

    EUR/USD research comparing a dual-tower Transformer with tree models in backtests.

  • WhisperType

    Local dictation for Linux/NVIDIA: speak, transcribe, and paste directly into the active app.