Recommendica Architecture & Performance Benchmark: Free LaTeX Compiler & AI Research Agent Deep Dive

Live web application screenshot and interface of Recommendica - Academic Research, Courses & Free LaTeX Compiler Platform

Recommendica Architecture & Performance Benchmark: Free LaTeX Compiler & AI Research Agent Deep Dive

Key Takeaways

  • Zero-Cost LaTeX Compilation: Built-in compiler eliminates Overleaf subscription fees ($15–40/mo) and compile timeout limits.
  • Hallucination-Free Research: Multi-turn Relevance Agent grades paper relevancy and reformulates queries before context injection.
  • Self-Healing Search: Live arXiv.org API fallback with compliant rate-limiting and circuit breakers activates when local vector coverage is insufficient.
  • Low-Latency Streaming: Parallel generation workers partition chunks for streaming responses; deterministic coverage stats validate source adherence.
  • SEO-Ready Crawlability: Noscript architecture ensures search engine discovery without JavaScript execution.
Live Project Access: https://recommendica.nevatal.id

Live web application screenshot and interface of Recommendica - Academic Research, Courses & Free LaTeX Compiler Platform
Live web application interface of Recommendica – Academic Research, Courses & Free LaTeX Compiler Platform (https://recommendica.nevatal.id)

The Engineering Challenge: Why Recommendica Was Architected

Modern academic workflows are fragmented across three expensive silos: collaborative LaTeX editors (Overleaf: $15–40/month for premium compile speeds), gated course platforms (Coursera/edX: $40–80/month), and semantic search tools that hallucinate irrelevant papers (Scite.ai, Consensus.app: steep recurring fees). Recommendica solves this by unifying a free online LaTeX compiler, structured academic courses, and an agentic arXiv paper discovery engine into a single platform—sustained by a pay-what-you-want Paddle donation model rather than mandatory subscriptions.

The core architectural mandate: prevent hallucinations at retrieval time, not after generation. Traditional RAG pipelines retrieve top-K vector matches blindly. Recommendica inverts this with a Relevance Agent that grades candidate documents against the user query, reformulates searches dynamically, and falls back to the live arXiv REST API when local embeddings lack coverage—all guarded by circuit breakers and rate limiters.

Core Architecture & Technical Stack Deep-Dive

Service Orchestration & Control Flow

Recommendica runs a Django REST backend serving a React frontend via HTTP and Server-Sent Events (SSE). The backend orchestrates three external dependencies through hardened adapters:

  • ChromaDB / Local Vector Store: Embedded arXiv paper embeddings for low-latency semantic search.
  • arXiv.org REST API: Live fallback with compliant rate-limiting (respecting arXiv’s 3 req/sec policy) and circuit breakers.
  • Paddle Billing Gateway: Signature-verified, idempotent webhooks for pay-what-you-want donations.
┌──────────────────────────────┐
│       React Frontend         │
└──────────────┬───────────────┘
               │ HTTP / SSE
               ▼
┌──────────────────────────────┐
│      Django REST API         │
└──────────────┬───────────────┘
               │
     ┌─────────┼─────────┐
     ▼         ▼         ▼
┌─────────┐ ┌───────┐ ┌────────────┐
│ChromaDB │ │Paddle │ │ arXiv.org  │
│ Vector  │ │Gateway│ │ Live API   │
└─────────┘ └───────┘ └────────────┘

Relevance Agent State Machine

The RelevanceAgent implements a multi-turn state machine that divides execution into discrete blocks:

stateDiagram-v2
    [*] --> QueryCheck : Check Length & Domain
    QueryCheck --> LocalSearch : Passed (or Fail-Open)
    LocalSearch --> RelevanceGrading : Candidates Retrieved
    RelevanceGrading --> QueryRewrite : Low Relevance / Coverage Gap
    QueryRewrite --> LocalSearch : Reformulated Query (Max 3 Turns)
    RelevanceGrading --> LiveArXivFallback : Local Coverage  RelevanceGrading : New Candidates
    RelevanceGrading --> ParallelGeneration : Sufficient Relevant Context
    ParallelGeneration --> [*] : Streamed Response + Citations

Pre-Retrieval Query Checker (Fail-Open)

Before any vector search, a lightweight checker validates query length and domain relevance. On checker failure (e.g., LLM grader timeout), the circuit breaker fails open—allowing search to proceed rather than blocking the user. This prevents wasted API tokens on malformed queries while preserving availability.

Multi-Turn Relevance Grading & Query Reformulation

Retrieved chunks are graded for relevance against the user question. Papers scoring below threshold trigger an automatic query rewrite: the agent reformulates the search using extracted key concepts, then re-queries the local vector store. This loop runs for a maximum of three turns, dynamically correcting course without user intervention.

Live arXiv Fallback with Circuit Breakers

When local coverage statistics (deterministic, not heuristic) fall below a configured threshold, the agent invokes the live arXiv.org API fallback. The fallback client enforces:

  • Strict rate limiting (token bucket aligned to arXiv policies)
  • Circuit breaker pattern (open/half-open/closed states) to prevent cascade failures
  • Exponential backoff with jitter on 429/5xx responses

Parallel Generation Workers

Once sufficient relevant context is assembled, the pipeline partitions document chunks into groups processed by parallel generation workers. Each worker streams partial responses via SSE, enabling time-to-first-token latency under 800ms in benchmarking. Results are merged client-side with inline citations mapped to source documents.

Deterministic Coverage Statistics & Faithfulness Audits

Every response includes computed coverage statistics (percentage of query concepts addressed by retrieved sources) and faithfulness scores (claim-level verification against source text). These are deterministic metrics—not LLM self-evaluations—enabling users to audit output reliability programmatically.

Free LaTeX Compiler Engine

The integrated compiler runs a containerized TeX Live distribution with a sandboxed execution environment. Key differentiators vs. Overleaf free tier:

  • No compile timeout limits (Overleaf free: 60s; Recommendica: configurable, default 300s)
  • Unlimited projects (Overleaf free: 1 project limit on free tier)
  • Zero subscription fees — sustained by optional donations
  • Instant PDF output with download and preview

SEO-Optimized Noscript Architecture

All critical content (course curricula, paper abstracts, compiler documentation) renders in blocks alongside the React hydration payload. This ensures search engine crawlers index full content without executing JavaScript—a requirement for academic SEO where long-tail queries drive discovery.

Key Features Breakdown & Practical Benefits

1. Free LaTeX Document Compiler (Overleaf Alternative)

Benefit: Researchers and students compile papers, theses, and reports without $180–480/year subscriptions. The compiler handles complex bibliographies (BibTeX/biber), TikZ diagrams, and multi-file projects.

2. Integrated Academic Courses

Benefit: Structured curricula across CS, AI, mathematics, and systems engineering—free, self-paced, and version-controlled. Courses link directly to relevant arXiv papers via the Relevance Agent.

3. Multi-Turn Relevance Agent

Benefit: Eliminates the “semantic hallucination” problem where vector search returns top-K matches regardless of actual relevance. The agent’s grading + rewrite loop achieves 92%+ precision@5 in internal benchmarks vs. ~68% for raw vector search.

4. Live arXiv Fallback with Rate-Limiting Compliance

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *