AI Agents & Automation

Internal AI knowledge assistants that answer from your documents, with sources

An internal knowledge assistant lets staff ask questions in plain language and get answers drawn only from your approved documents, with a link to the passage behind each claim. It is built with retrieval-augmented generation: the system first finds the relevant passages, then the model writes an answer from them. Whether people trust it depends on the work around the model: choosing sources, splitting them well, respecting who may read what, keeping content current and testing answers against real questions.

Book a workflow review

Choosing the sources the assistant may use

Pointing an assistant at the whole shared drive is the fastest way to get confident wrong answers. Drafts, duplicates, superseded policies and personal notes all look like evidence to a retrieval system. Start with sources that have an owner and a review date: policies and procedures, product manuals, the employee handbook, approved templates and the internal help desk's articles.

Picture a hypothetical engineering consultancy whose procedures live in SharePoint, whose handbook is a set of PDFs and whose project lessons sit in Google Drive. A sensible first scope is the procedures and the handbook, because each has an owner who can confirm an answer is right. Project lessons can follow once their access rules are clear. Clear ownership of each source is part of data governance, and it is what makes an assistant correctable.

Ingestion and chunking

Ingestion connects to each source, converts every file to clean text and keeps its structure. Scanned PDFs need OCR first; document processing covers that step. Each document is then split into chunks small enough to retrieve precisely but large enough to make sense alone.

  • Split along the document's own structure, by heading and section, rather than every few hundred characters, which cuts sentences and tables in half.
  • Carry context into every chunk: the document title, the heading path and the effective date, so “the limit is three days” still means something on its own.
  • Keep tables whole, or repeat the header row in each piece, so values keep their labels.
  • Store metadata with each chunk: source, version, owner, language and access group.

Chunks are turned into embeddings, numeric representations of meaning, and stored in a vector database or in PostgreSQL with the pgvector extension. Semantic search alone struggles with exact terms such as policy codes, part numbers and names, so we combine it with keyword search and re-rank the results before the model sees them.

Permissions for every document

The assistant must never reveal a passage the person asking could not open themselves. That is enforced at retrieval: every chunk carries its access groups, and the search filters by the user's groups, taken from your identity provider or the source system, before any text reaches the model. Telling the model “do not mention confidential documents” is not a control.

  • Sync permission changes promptly, so someone who loses access to a folder loses it in the assistant too.
  • Test with two accounts that have different access, and check that the answers differ as they should.
  • Leave the most sensitive material, such as HR cases and board papers, out of scope unless there is a strong reason and a separate design.

The principle is least privilege, applied to search results.

Citations people can check

Every answer should cite the passages it used, with a link that opens the document at the right section. Citations turn the assistant from an oracle into a fast way to find the source, and they let readers catch errors. We also check citations in code: each one must point to a passage that was actually retrieved for that question.

When retrieval finds nothing relevant, the assistant should say it does not know and name the document owner or team to ask. That answer is frustrating once and builds trust over time. Citations make AI hallucination visible rather than impossible, so answers that matter, such as safety procedures, should still be read against the source.

Keeping answers current

  • Sync on change, using the source system's change notifications where it offers them, plus a scheduled full check to catch anything missed.
  • Remove deleted and superseded documents from the index the same day, not only add new ones.
  • Prefer the current approved version when two versions match, and show the document's date in the answer.
  • Report gaps to owners: questions with no good answer, and old documents that are cited often.

An assistant is only as current as its sources. If the travel policy changed last month and the old PDF is still in the folder, the assistant will find it.

Evaluating answers before and after launch

Build a test set from questions staff already ask, taken from help channels and from emails to HR, IT and operations, with the expected answer and the source for each. Then measure separately:

  • Retrieval: did the right passage come back near the top?
  • Answer correctness: is the answer right and complete, according to the document owner?
  • Citation accuracy: does each citation support the sentence it is attached to?
  • Refusals: does the assistant decline when the answer is not in the sources?

Grade with simple rules where possible, a model-graded check for scale, and owner review for a sample. Rerun the whole set whenever the chunking, the model or the instructions change. AI agent testing and the LLM evaluation entry explain the method.

Arabic and English in one knowledge base

Staff may ask in Arabic about a document written in English, or the reverse. Multilingual embedding models retrieve across languages, but test them on your own content. Keyword search in Arabic needs normalisation, for example treating the different forms of alef as one and ignoring diacritics, or a search for one spelling misses another. The assistant answers in the language of the question and quotes the source in its original language, so nothing is lost in translation. A short bilingual glossary of internal terms, such as department and product names, improves both retrieval and answers. For more on Arabic language handling, see Arabic AI assistants.

A small first step

A 30-minute workflow review

Pick one process that costs your team time. We look at it with you and tell you honestly whether automation or an AI agent pays, what it would take, and what to measure first.

Message us on WhatsApp

Questions we get asked

  • Uploading files gives one person a private, temporary view of a few documents. A knowledge assistant indexes approved sources for everyone, keeps them in sync, applies each person's access rights, cites its sources, is tested against real questions and is logged. It is a managed system with owners, not a personal shortcut.

  • Usually not. Retrieval keeps answers tied to the current version of each document and to each user's permissions, and a changed policy takes effect as soon as it is re-indexed. [Fine-tuning](/glossary/fine-tuning) shapes style and format, does not reliably teach facts and must be repeated when documents change. It can complement retrieval later, but rarely replaces it.

  • Yes, but structured data is better queried than embedded. The assistant can call a tool that runs a safe, read-only query or an API request and then explains the result, with the same permission checks. Embedding rows of numbers as text tends to produce vague or wrong answers to questions about totals and trends.

  • Fix it at the source first: archive superseded versions outside the indexed folders. Then add status and effective dates to the metadata, prefer current versions in ranking, show the date in each answer, and send owners a list of old documents that are cited often. The assistant cannot know a document is outdated unless the sources say so.

  • Wherever they already work: a web page behind your single sign-on, a bot in Microsoft Teams or Slack, or a panel inside your intranet or internal tools. Every entry point should apply the same permissions and logging, so access depends on who is asking, not on where they ask.

Keep exploring

Ready to build something secure?

Tell us about your product. We will reply with a clear plan.

Start a project

We would like to use Microsoft Clarity to see how visitors use the site, so we can improve it. It sets cookies and is off unless you accept. Cookie policy