RAG Agent

Neolens Support Agent

Enterprise-grade AI agent for technical API support. LangGraph orchestration with 7 specialized nodes, advanced RAG with FAISS, real-time streaming. Architecture ready for deployment.

Neolens Support Agent Interface

Overview

🎯

Objective

Automate technical support for a medical imaging API. Instantly answer developer questions about 34 documents (50k words) of technical documentation.

Performance

Response time 2-10 seconds depending on complexity, vector search < 500ms, available 24/7 in French and English.

🔒

Reliability

137 automated tests (76% coverage), double input/output validation, systematic source citations.

Features in Action

Discover the agent's advanced capabilities through these demonstrations

Code Snippets with Syntax Highlighting

Professional display of Python, JavaScript, cURL code examples with Prism.js syntax highlighting and functional copy buttons.

  • ✓ Multi-language syntax highlighting
  • ✓ Copy to clipboard buttons
  • ✓ Professional markdown rendering

Automatic Source Citations

Intelligent RAG with FAISS vector search, automatic source citations with document names.

  • ✓ Vector search < 500ms
  • ✓ Systematic source citations
  • ✓ Documentation-based responses

Zero Hallucination - Robust Validation

Double input/output validation, out-of-scope question rejection, pedagogical messages to guide the user.

  • ✓ Strict input/output validation
  • ✓ Out-of-scope question rejection
  • ✓ Clear error messages

Multilingual Support FR/EN

Automatic French/English detection, conversational consistency, localized responses according to user language.

  • ✓ Automatic language detection
  • ✓ Conversational consistency
  • ✓ Localized error messages

Conversational Memory

Anaphora resolution ("it", "this", "that"), memory of last 5 exchanges, intelligent rephrasing to improve search.

  • ✓ Memory of last 5 exchanges
  • ✓ Automatic anaphora resolution
  • ✓ SQLite persistence between sessions

Short Query → Full Answer

Automatic rephrasing of short queries to enrich context, detailed and structured responses even for minimal questions.

  • ✓ Intelligent rephrasing
  • ✓ Context enrichment
  • ✓ Complete and detailed responses

Technical Architecture

LangGraph Orchestration with 7 nodes

State-of-the-art architecture with advanced orchestration, conditional routing and multi-level validation.

graph TD; __start__([

__start__

]):::first memory(memory) validation_input(validation_input) retrieve(retrieve) validation_output(validation_output) generate(generate) fallback(fallback) reject(reject) __end__([

__end__

]):::last __start__ --> memory; generate -.  success  .-> __end__; generate -.-> fallback; memory --> validation_input; retrieve --> validation_output; validation_input -.-> fallback; validation_input -.-> generate; validation_input -.-> reject; validation_input -.-> retrieve; validation_output -.-> fallback; validation_output -.-> generate; fallback --> __end__; reject --> __end__; classDef default fill:#f2f0ff,line-height:1.2 classDef first fill-opacity:0 classDef last fill:#bfb6fc

LangGraph Orchestration: data flow between the 7 nodes

1

Memory Node

Intelligent conversational history management with SQLite checkpointing

2

Input Validation

Double-level validation: 500 character limit, XSS filtering, content moderation

3

Retrieval Node

FAISS semantic search in 250 chunks (50k words), query expansion, prioritization

4

Output Validation

Confidence evaluation, relevance scoring, hallucination detection

5

Generation Node

Contextual GPT-4 generation, SSE streaming, markdown formatting

6

Fallback Node

Graceful error handling, pedagogical messages, alternative suggestions

7

Reject Node

Inappropriate query filtering, abuse protection, rate limiting

Complete Technical Stack

Backend & AI

  • Python 3.11+ - Main language
  • FastAPI - High-performance async web framework
  • LangGraph - Orchestration and state machine for AI agents
  • LangChain - Framework and tools for AI agents
  • OpenAI GPT-4 - Language model
  • FAISS - Vector search
  • SQLite - Conversation persistence

Frontend

  • Next.js 14 - React framework with App Router
  • TypeScript - Type-safe development
  • Tailwind CSS - Utility-first design system
  • React Markdown - Markdown rendering with syntax highlighting
  • Prism.js - Code syntax highlighting

Tests & Quality

  • Pytest - 93 automated backend tests
  • Jest - 44 Frontend tests
  • React Testing Library - Component tests
  • Coverage - 76% code coverage
  • CI/CD - Automated pipeline

Deployment & Monitoring

  • Docker - Containerization
  • Render - Backend hosting
  • Netlify - Frontend hosting
  • Structured logging - Detailed traces
  • Real-time metrics - Performance monitoring

Performance Metrics

2-10s
Response time (depending on complexity)
< 500ms
Vector search
137
Automated tests (Backend + Frontend)
76%
Code coverage
50k words
Indexed technical content (34 docs)
250
Vector chunks (1000 chars, overlap 200)
24/7
Multilingual availability

Ready to deploy a similar agent?

This architecture is replicable and adaptable to your use case. From validation to enterprise solutions.