1. Home
  2. Blog
  3. AI for Nigerian Businesses
  4. How to Build an AI Document Assistant for Your Business

How to Build an AI Document Assistant for Your Business

Business colleagues in a meeting in a cafe — an article about AI document assistant

Documents are where Nigerian businesses lose the most quiet hours: a logistics firm re-typing waybill numbers into a spreadsheet, a law firm reading 80-page agreements for one indemnity clause, an importer reconciling Form M, bills of lading and supplier invoices, a school processing hundreds of admission forms. Most of this is reading, finding and copying, which is exactly what language models are now good at, provided the pipeline around them is built carefully.

This article explains how to build an AI document assistant: the three jobs it does, the pipeline components, a step-by-step build sequence, how to handle scanned and poor-quality Nigerian documents, validation so that extracted numbers can be trusted, data-protection safeguards, a labelled hypothetical example and indicative costs. It is about the assistant that reads and extracts; the separate article on automating business documents with AI covers document generation workflows in more detail.

What an AI document assistant does

An AI document assistant is software that turns documents into text, indexes that text so it can be searched by meaning, and uses a language model to answer questions about the documents, pull specific fields out of them into structured records, or draft new documents using their content. It works on PDFs, Word files, spreadsheets, emails and photographs of paper, which matters in Nigeria where a large share of business paperwork still arrives as a WhatsApp photo.

Which documents benefit most? Any that are numerous, repetitive in structure and currently handled by reading and re-typing:

  • Invoices, receipts, purchase orders and delivery notes
  • Contracts, tenancy agreements, NDAs and service agreements
  • Shipping and customs paperwork
  • Tender and RFP documents
  • KYC and onboarding forms
  • Staff documents, CVs and HR letters
  • Policies, manuals and standard operating procedures

Three jobs: question-answering, extraction and drafting

A document assistant does three distinct jobs, and each needs a slightly different build. Deciding which you need first shapes the whole project.

JobExample requestCore techniqueRisk if wrong
Question-answering"What is the notice period in the Ikoyi lease?"Retrieval plus generation (RAG) with citationsMedium; answer cites source for checking
Extraction"Pull invoice number, date, supplier, total and VAT from these 300 invoices"Structured output with a fixed schema and validationHigh; numbers flow into accounts
Drafting"Draft a supply agreement for this new distributor using our standard terms"Templates plus retrieval of your clausesMedium; a human must review before signing

Most Nigerian businesses get the fastest return from extraction (invoices, waybills, forms) because it removes typing, and the most relief from question-answering on contracts and policies. Drafting is valuable but should come last, once your templates and clause library are in good shape.

The document pipeline explained

Every document assistant, whether built with no-code tools or custom code, runs the same pipeline: ingest, convert, chunk, index, retrieve or extract, generate, validate, and store. Understanding the stages helps you brief a developer and judge quotations.

  1. Ingest: documents arrive from email, WhatsApp, a shared drive, a scanner or an upload form. Each is tagged with type, source and date.
  2. Convert to text: digital PDFs and Word files are parsed directly; scans and photos go through OCR (optical character recognition). Modern multimodal models can also read images directly, which helps with stamps, handwriting and skewed photos.
  3. Chunk: long documents are split into passages (by clause, section or page) so the relevant part can be found later.
  4. Index: each chunk is converted into an embedding (a numeric representation of meaning) and stored in a vector database alongside metadata such as document name, page and date.
  5. Retrieve or extract: for questions, the most relevant chunks are fetched and given to the model; for extraction, the whole document (or its pages) is given to the model with a strict output schema.
  6. Generate: the model writes the answer, the structured record or the draft, citing the source passage.
  7. Validate: rules check the output (totals add up, dates are valid, VAT is 7.5% where applicable, required fields present) and route exceptions to a human.
  8. Store and act: results go into your accounting system, CRM, database or document management tool, with a link back to the source.

The stages that determine quality are conversion and validation, not the model. Poor OCR or absent validation is why most failed document projects fail.

Step-by-step: building the assistant

The core steps are: choose one document type, gather samples, define the output, build conversion and indexing, add the model with tools, add validation and review, connect to the destination system, then pilot. Here is each step in practice.

  1. Pick one document type and one job. For example, supplier invoices, extraction only. Broad "read all our documents" projects stall.
  2. Collect 50–100 real samples. Include the bad ones: blurry WhatsApp photos, stamped copies, handwritten additions, multi-page scans. This sample set is your test suite.
  3. Define the output precisely. For extraction, a schema: field names, types, required or optional, allowed values. For question-answering, the citation format. For drafting, the template and which fields vary.
  4. Build conversion. Parse digital files; OCR or multimodal-read the scans. Measure how many samples convert cleanly and keep a list of failure patterns.
  5. Build indexing (for question-answering). Chunk by section or clause, embed, store with metadata. Test retrieval by asking 30 known questions and checking whether the right passage is found.
  6. Add the model and tools. Give the model a search_documents tool for questions and a structured-output schema for extraction. Instruct it to say "not found" rather than guess.
  7. Add validation rules and a review queue. Arithmetic checks, date sanity, duplicate detection, confidence thresholds. Anything failing goes to a person with the source page displayed alongside the extracted fields.
  8. Connect the destination. Push validated records to accounting software, a database or a spreadsheet; push answers to WhatsApp, email or a web interface.
  9. Secure the pipeline. Access control, encryption at rest, retention rules, and a decision on which model provider (or self-hosted model) processes sensitive documents.
  10. Pilot for a month with review on everything. Measure extraction accuracy per field and time saved. Reduce review only for fields with consistently correct results.

Handling scanned, photographed and messy documents

Scanned and photographed documents are the norm in Nigerian business, so conversion quality decides the project. Plan for it rather than hoping every document arrives as a clean PDF.

  • Photos from WhatsApp: often compressed, skewed and shadowed. Pre-process (deskew, crop, increase contrast) before OCR, or use a multimodal model that reads the image directly and ask it to flag low-confidence fields.
  • Stamps, signatures and handwriting: OCR struggles; multimodal models do better but should be asked to output a confidence indicator so humans check the doubtful ones.
  • Multi-page and mixed documents: a single scan may contain an invoice, a delivery note and a receipt. Add a classification step that splits and labels pages before extraction.
  • Nigerian formats: account numbers, TINs, CAC RC numbers, phone numbers with +234 or leading zero, amounts written with or without ₦ or "NGN". Add normalisation rules so the destination system gets consistent values.
  • Languages and phrasing: most business documents are in English, but names, addresses and product terms need care. Keep a glossary of your own product codes and customer names for the model to match against.

Set a target: for example, 95% of sample invoices converted with all required fields readable. If you cannot reach it on the sample set, fix the intake (ask suppliers for PDFs, add a scanner) before building the rest.

Validation: making extracted data trustworthy

Validation is the set of automatic checks applied to every extracted record before it enters your systems. It is what allows an AI document assistant to be used for money-related documents at all.

Typical checks:

  • Arithmetic: line items sum to subtotal; subtotal plus VAT equals total; VAT rate matches the expected rate (7.5% in Nigeria as of 2026; verify current FIRS rules).
  • Format: dates are real dates in a sensible range; invoice numbers match the supplier's known pattern; bank account numbers have the right length.
  • Reference matching: supplier name matches a known supplier; purchase order number exists; the amount matches the PO within tolerance.
  • Duplicates: the same invoice number from the same supplier has not already been processed.
  • Confidence thresholds: fields the model marks as uncertain, or that OCR read with low confidence, go to review automatically.

Every exception is shown to a human with the source image beside the extracted fields, so review takes seconds. Over time you learn which fields are reliable and which suppliers' documents always need a look.

What changes for Nigerian businesses

Building a document assistant in Nigeria differs from the generic playbook in four ways: documents arrive as photos through WhatsApp, paperwork mixes digital and stamped paper, sensitive personal and financial data falls under the NDPA 2023, and model costs are in dollars.

WhatsApp as the document channel. Suppliers, agents and customers send documents as photos or forwarded PDFs on WhatsApp. Using the WhatsApp Business Platform, the assistant can receive these directly, acknowledge them and start processing, which removes the "download, rename, upload" step entirely.

Regulatory paperwork. Customs, tax and CAC documents have specific formats and reference numbers. The assistant can extract and cross-check them, but decisions about compliance remain with your clearing agent, accountant or lawyer. Do not treat AI output as professional advice.

Data protection. Contracts contain names, phone numbers, salaries and bank details. Under the NDPA 2023 you should limit what goes to external model providers, keep retention short, control access by role and be able to delete data on request. For highly sensitive documents (medical, legal, HR), consider a private deployment; the article on building a private AI assistant covers the options. Verify current NDPC guidance; this is not legal advice.

Costs in dollars. OCR and model usage are billed per page or per token in USD. Long contracts are expensive to process repeatedly, so index once and retrieve small passages rather than sending whole documents each time. Set monthly caps.

Power and connectivity. Run the pipeline in the cloud with queued processing, so documents uploaded during a power cut at the office are processed when the connection returns, and nothing is lost.

Example (hypothetical): a clearing and forwarding agent in Apapa

Example (hypothetical): A clearing and forwarding agency in Apapa handles shipments for around 60 importers. Each shipment produces a bill of lading, commercial invoice, packing list, Form M, assessment notice and several receipts, most of which arrive as WhatsApp photos from clients and agents. Two staff spend most of their day re-typing reference numbers, container numbers and amounts into the agency's tracking spreadsheet and cross-checking them.

The agency builds a document assistant for one job first: extraction from bills of lading and commercial invoices into structured shipment records. Documents arrive via a WhatsApp Business Platform number, are classified by type, converted with a multimodal model that flags uncertain fields, validated against the client's expected container numbers and invoice totals, and pushed into the tracking database with a link to the source image. Exceptions go to a review screen.

In the pilot month, the review queue reveals that one shipping line's documents are always photographed at an angle and need pre-processing, and that container number check-digits catch several OCR errors automatically. Once accuracy on required fields is consistent, the agency adds question-answering ("what is the status of the Dangote-bound consignment under B/L number X?") for clients. This is an illustrative scenario, not a Linestech client result.

How much does an AI document assistant cost in Nigeria?

The cost of an AI document assistant in Nigeria depends on the number of document types, the share of scans and photos, the strictness of validation, and the systems it must write into. The figures below are indicative 2026 ranges; actual quotes vary with scope, vendor and exchange rate.

ScopeIndicative one-off costTypical contents
Single document type, extraction with validation and a review queue₦1,000,000–₦3,500,000Conversion, schema, rules, spreadsheet or database output
Question-answering assistant over contracts or policies with citations₦1,500,000–₦5,000,000Indexing, retrieval, web or WhatsApp interface, access control
Multi-type assistant with extraction, Q&A, drafting and integration into accounting or custom software₦5,000,000–₦15,000,000+Classification, multiple schemas, workflow, audit and admin tools

Recurring costs, mostly in USD:

  • OCR and model usage, priced per page or per token; volume and document length drive it.
  • Vector database and cloud hosting: from roughly ₦150,000–₦800,000 per year for a modest cloud plan, more at high volume.
  • Maintenance: schema changes, new suppliers' formats and prompt tuning; ₦20,000–₦150,000 per month or a retainer.

Compare two or three written quotes on the same scope: document types, sample set, required fields, validation rules, destination systems, review interface, data-handling terms and ownership of code. Ask specifically how accuracy will be measured and reported.

Mistakes to avoid

  • No sample set. Without 50–100 real documents, nobody can measure accuracy, and the vendor demo will look better than reality.
  • Skipping validation. Letting extracted totals flow straight into accounts is how one misread digit becomes a wrong payment.
  • Sending whole documents to the model for every question. Slow, expensive in USD and unnecessary; index once and retrieve passages.
  • Ignoring photo quality at intake. Fix intake (PDF requests, a scanner, a photo guide for suppliers) before spending on clever pre-processing.
  • Treating answers as legal or tax advice. The assistant finds the clause; the lawyer interprets it.
  • No citations. Every answer should point to document, page and passage, so a human can verify in seconds.
  • Uploading sensitive documents without a data-handling decision. Decide which provider or private deployment handles HR, medical or legal files before the first upload.

Conclusion

An AI document assistant pays for itself when it removes reading and re-typing from a document type you handle every day. Build it one document type at a time, start with a real sample set, invest in conversion quality and validation rather than in the fanciest model, always show citations and source images, and decide up front how sensitive documents will be handled under the NDPA. Indicatively, a focused first assistant costs from around ₦1,000,000 in Nigeria plus USD-denominated usage, and the review queue you build in the pilot is what makes it trustworthy.

If you have a pile of invoices, contracts or shipping paperwork that your team re-types every week, Linestech can help you assess a sample set, define the extraction schema and validation rules, and scope a document assistant that fits your systems.

Frequently asked questions

Can an AI document assistant read photos of documents sent on WhatsApp?

Yes, if it is built to receive messages through the WhatsApp Business Platform and to process images with OCR or a multimodal model. Quality depends on the photo; skewed, dark or cropped images reduce accuracy, so the assistant should flag low-confidence fields for human review and you should give suppliers simple photo guidelines.

How accurate is AI extraction from invoices?

On clean digital invoices, extraction of standard fields is typically very reliable once validated. On photographed or stamped documents accuracy drops and varies by field; handwritten amounts are the hardest. Rather than trusting a general figure, measure accuracy per field on your own sample set and keep human review for fields that do not meet your threshold.

Is a document assistant the same as an AI knowledge base?

They overlap. A knowledge base is the indexed, searchable store of your documents; a document assistant uses that store for question-answering but also performs extraction into structured records and drafting, which a knowledge base alone does not do. If your only need is "find and answer", build the knowledge base first.

Do I need a vector database?

For question-answering across many documents, yes, or a database with vector search support. For pure extraction of fields from individual documents, no; each document is processed on its own and the results go straight to your systems. Many projects start with extraction and add the vector store later.

Can the assistant draft contracts for my business?

It can draft from your own templates and clause library, filling in the variable details and suggesting clauses used in similar past agreements. Every draft should be reviewed by a qualified person before signing; the assistant speeds up drafting but does not provide legal advice.

What happens to confidential documents sent to the AI provider?

The text or image included in each request is processed by the provider under its data-handling terms, which usually cover retention and whether inputs are used for training. Review those terms, send only the passages needed, and for highly sensitive material consider a self-hosted or private deployment. Document your approach for NDPA 2023 accountability.

How long does it take to build?

A single-document-type extraction assistant with validation can be piloted in three to six weeks, most of which is testing on samples. Question-answering over a contract library takes a similar time. Multi-type assistants with accounting integration and drafting typically take two to four months.

Sources and further reading

Figures, platform rules and regulations change. These are the primary references behind this article and the places to check before you act on it.