← Back to Services
Fixed-price project or monthly retainer Remote

AI Integration and RAG - Answers From Your Own Documents

Retrieval-augmented AI that answers from your documents and cites the page it used, or says it does not know. Built and run in production, not a demo.

Most “AI for your business” work is a chat box over a prompt. This is the other kind: a retrieval system that reads your own material, cites what it used, and declines when your documents do not answer the question.

I know it works because I run one. Irshad AI Employee is a live multi-tenant product on this site - 946 Pakistani federal statutes and 2,552 Lahore High Court judgments, about 117,000 embedded chunks, answering on a website widget, on WhatsApp and in a web portal from a single engine. You can ask it something now without signing in.

The hard part is never the model. It is retrieval. Statute text defeats plain vector search because every passage reads alike - in my own corpus, the section answering “what is the punishment for theft” ranked 25th, behind a schedule of section numbers and an unrelated Ordinance, until I added a structural lookup that finds a provision by its printed heading. That is the sort of problem this work is really made of, and it is why a benchmark comes before a demo.

Stack I reach for: Django REST on Cloud Run, Postgres with pgvector, OpenAI embeddings and reasoning models, React or Astro on the front end. I will build in yours if you have one, and say plainly which I would choose and why.

What's included in the package

Document ingestion with provenance

PDF, Word, scans and photos. Every chunk keeps its document, page and retrieval date, so an answer can point at its source.

Retrieval that is measured, not assumed

Embeddings plus the lexical rescues dense search cannot do - exact identifiers, titles, and structural lookups.

Grounded-or-silent answering

Cites the source, or says plainly that the documents do not cover it and hands over to a human. No confident guessing.

A channel your users already use

Embeddable website widget, WhatsApp, or a web portal - one engine behind all three.

An evaluation harness

A benchmark of your own questions with expected sources, so a prompt change can be shown to help rather than hoped to.

How the installation goes

  1. 1

    Read your corpus first

    Before any code, I look at what you actually have. Scanned contracts, a wiki, a folder of PDFs and a database each need different handling, and answer quality is decided here more than anywhere else.

  2. 2

    Build a small benchmark

    Twenty to fifty real questions with the source that should answer each. It takes a day, and it is the only way to tell improvement from a good demo.

  3. 3

    Ingest, retrieve, answer

    Chunking and embeddings, then the retrieval layer, then the answer prompt with its refusal rules - each measured against the benchmark.

  4. 4

    Ship on one channel, then widen

    One channel working properly beats three half-working. Usually the website widget first, because you can watch real questions arrive.

  5. 5

    Hand over the question log

    Every question, answer and retrieval diagnostic, so you can see what people ask and where it falls short.

Frequently asked questions

How is this different from pasting documents into ChatGPT?

Two things. It searches a corpus far too large to paste - the system I run in production holds about 117,000 embedded chunks - and it refuses rather than invents. A pasted-context chatbot answers confidently when the answer is not there, and that is the failure that matters in law, medicine and support.

Will it make things up?

It is built not to, and that is measurable rather than a promise. Answers cite the document and page. When the corpus does not cover the question, it says so. I published a research preprint on exactly this behaviour.

Do you use my documents to train a model?

No. Your documents are indexed for retrieval and stay yours. Nothing is used for training.

Can it work in Urdu?

Yes - English, Urdu and Roman Urdu. The query is normalised for retrieval and the reply comes back in the language the person asked in.

What if an answer is wrong?

Every answer links its source, so a wrong one is visible rather than plausible. The question log exists for this: read it, find what failed, fix retrieval or the prompt, measure again.

Other things I build

The work behind these is public: the AI product, its live demo, the cited answer pages it produces, and the research paper measuring it.

Ready to start?

Send a short brief — what you need built, roughly when, and the budget you have in mind. You'll get a reply from Muhammad Kashif Irshad himself, in writing, within one working day, saying plainly whether this is a good fit.

AI Q&A