Senior Backend Engineer & AI Backend Lead
$ echo $IMPACT_METRICS
$ cat tech-stack.json
π€ AI & Machine Learning
β‘ Core Technologies
π§ Supporting Stack
βοΈ Infrastructure & DevOps
$ cat README.md
At RightHub (acquired by Anaqua), I was brought in to build the entire AI backend from the ground up. This wasn’t about adding AI features to an existing product β it was about fundamentally transforming how the platform handled knowledge, search, and decision-making.
The challenge was significant: take a successful IP management platform and infuse it with generative AI capabilities that enterprise customers could trust with their sensitive intellectual property data.
Over 2+ years, I architected and shipped systems that are now processing thousands of daily queries, enabling legal and IP professionals to work 50% faster while maintaining the strict compliance requirements of enterprise software.
$ git log --oneline responsibilities/
$ grep -r "achievement" ./
$ cat CHALLENGES.md
Enterprise-Grade RAG for Legal Documents
Legal and patent documents contain highly specialized terminology, complex document structures, and citation networks that generic RAG approaches couldn't handle effectively.
Developed a custom chunking strategy that respects document structure (claims, citations, legal provisions). Built a specialized embedding model fine-tuned on IP/legal corpus. Implemented citation-aware retrieval that follows reference chains to provide complete context.
Multi-LLM Orchestration with Cost Control
Different AI tasks required different model capabilities, but naive approaches led to either poor quality (using cheap models for complex tasks) or exploding costs (using GPT-4 for everything).
Built an intelligent routing layer that classifies task complexity in real-time and routes to appropriate models. Implemented prompt caching with semantic similarity matching, reducing redundant LLM calls by 60%. Added circuit breakers and fallback chains for reliability.
Reliable AI Agents for Enterprise Workflows
AI agents needed to perform multi-step tasks (document analysis, entity extraction, comparison) but would occasionally hallucinate or make incorrect tool calls that could corrupt data.
Implemented structured output validation using Pydantic models for every agent action. Built a human-in-the-loop approval system for high-stakes operations. Added comprehensive observability with LangSmith and custom metrics to detect anomalies early.
Context-Aware Generation at Scale
Generic AI responses weren't personalized enough for enterprise users who needed context-aware assistance based on their role, current project, and historical interactions.
Designed CAG (Context-Aware Generation) architecture that maintains session memory, injects user/task metadata into prompts, and implements prompt chaining for multi-turn conversations. This became a core product differentiator.
$ cat details.md
The RightHub β Anaqua Journey
When I joined RightHub in 2023, it was a growing IP management platform with a clear vision: bring AI capabilities to the traditionally conservative world of intellectual property and legal tech. Within a year, this vision attracted Anaqua β a leader in IP management software β to acquire RightHub.
My role was to build the technical foundation that made this AI transformation possible.
Deep Dive: The AI Architecture
Vector Search Infrastructure
The core of our AI capabilities was a custom vector search system built on PGVector. Unlike generic implementations, ours was specifically designed for legal documents:
| |
Key innovations:
- Structure-aware chunking that keeps legal provisions, patent claims, and citations intact
- Hybrid search combining semantic similarity with keyword matching for legal terminology
- Citation-aware retrieval that follows reference chains to provide complete context
AI Agent Framework
Our agents weren’t simple chatbots β they were autonomous systems capable of:
- Analyzing multi-page patent documents
- Extracting and classifying entities (inventors, assignees, classifications)
- Comparing documents and identifying conflicts
- Generating summary reports with citations
The key to reliability was structured outputs:
| |
Every agent action was validated against strict schemas, with graceful fallbacks and human escalation paths.
Technical Leadership
Beyond building systems, I established patterns and practices that the engineering team adopted:
- AI Service Template: A standardized FastAPI service structure for all AI features
- Prompt Engineering Guidelines: Documentation and examples for effective prompt design
- Cost Monitoring Dashboard: Real-time visibility into LLM usage and costs
- Testing Strategies: Evaluation frameworks for measuring AI output quality
The Acquisition
The AI capabilities we built were a key factor in the Anaqua acquisition. Our systems demonstrated that:
- AI could be trusted with sensitive enterprise data
- Complex legal workflows could be meaningfully accelerated
- The architecture was scalable and maintainable for the long term
This validated my approach of building production-grade AI systems rather than impressive demos.
Related
Technologies: LangChain, RAG Systems, PGVector, FastAPI, Spring Boot, OpenAI, Anthropic Claude, Python, AI Agents
Similar Roles: Senior Engineer at Flowrite | Founder at Sparrow Intelligence