All work

Case study 01 / Agents & RAG

ATR GPT: agentic RAG assistant

An internal assistant that answers from company knowledge and acts on it, used by 900+ employees across 20 departments for 5,000 queries a month.

Role
AI Engineer: architecture, backend, deployment
Timeline
EVA Group · 2025 – present
Stack
FastAPI · PostgreSQL + pgvector · reranker · OpenAI · Claude

01Problem

Employees searched scattered documents and departmental repositories, or waited on subject-matter experts, to answer routine questions. Knowledge sat in silos across 20 departments, and every answer cost someone else's time.

02Solution & architecture

  • Two modes: Policy mode answers company-wide policy and procedure questions from the policy documents and cites the source document and section; Assistant mode (e.g. General Business) handles everyday work such as emails, summaries, ideas and code, with a recommended model per department.
  • Retrieval: a FastAPI RAG service on PostgreSQL + pgvector, with a reranking step so the model sees the most relevant passages first.
  • Agents: tool-calling agents with conversation memory that go beyond answering and produce PowerPoint and Word deliverables.
  • Model routing: each request goes to OpenAI or Claude based on cost, latency and quality.
  • Operations: guardrails on inputs and outputs, plus token and cost monitoring per request.
ATR GPT architectureAn employee's request goes to a FastAPI gateway with guardrails, then to a tool-calling agent with memory. The agent calls a retriever (pgvector plus reranker) and document tools (PowerPoint and Word), and sends prompts to a model router that chooses OpenAI or Claude. The router logs tokens and cost to a monitoring store.prompttokens · costEmployeeweb chat · 20 deptsFastAPI gatewayauth · guardrailsAgent + memoryplans · calls toolsModel routerOpenAI / ClaudeRetrieverpgvector + rerankerDocument toolsPowerPoint / WordLogs & cost monitorper-request usage
Request path: gateway → agent → retrieval and tools, with every model call routed and metered.

03Demo

Policy mode: an Arabic question about working hours, answered from the attendance policy with the source document and section cited.

Assistant mode (General Business): the department's recommended model drafts a vacation-request email.

04Results

  • 900+

    employees using it across 20 departments

  • 5,000

    queries per month

  • 2providers

    OpenAI and Claude, routed per request for cost, latency and quality

05What I'd improve next

  • Tracing: add LangSmith or Langfuse traces so any bad answer can be replayed step by step, from retrieval through tool calls to the model.
  • Evaluation in CI: turn the RAG evaluation set into a regression gate that runs on every prompt or retriever change.
  • Feedback loop: feed thumbs-up/down signals into reranker tuning and the eval set.

Enterprise project. The demos are recordings of the internal system, shared with George's approval; confidential details beyond what they show are not published.