All selected work

Case study · LangGraph, pgvector

Vectriva: RAG over the documents companies actually have

An agentic multimodal RAG SaaS that answers from product PDFs, spreadsheets and images, and books a Google Meet appointment in the same conversation.

By Ali Raza, Senior AI EngineerLangGraph, LangChain, OpenAI, PostgreSQL, pgvector, Celery, FastAPI

RAG over clean text is easy. RAG over a company's real documents is not.

The job

Vectriva answers customer questions from a company's own product material, and when the customer is ready, books a Google Meet appointment without leaving the conversation. I architected it as a SaaS on LangGraph, LangChain, OpenAI, PostgreSQL with pgvector, Celery and FastAPI.

The hard part

Retrieval has to work across text, tables and images, not only prose. Product knowledge lives in spec sheets, price tables and photos as often as in paragraphs, and a retriever tuned for prose quietly fails on everything else.

How it is put together

  • LangGraph orchestrates the conversation: retrieval, answering and the booking tool.
  • Embeddings live in PostgreSQL with pgvector, next to the rest of the data.
  • Celery runs background work, and FastAPI serves the API.
  • Booking is a tool call with validated input, the same as any other write.

The checks I run before blaming the model

  1. Did extraction keep table structure, or did rows turn into word soup?
  2. Do chunks carry their source and page, so answers can cite them?
  3. Are spreadsheets indexed as rows with headers, not as one blob?
  4. For a test question, is the right chunk in the top results at all?
  5. When nothing relevant is retrieved, does the assistant say so instead of guessing?

Most bad RAG answers are retrieval failures. Fixing retrieval first is cheaper than any prompt change, and it is the only fix that holds when the documents change.

Building something like this?

I am open to remote AI engineering roles and contract work. Tell me about the system you need.