Skip to content
NewSecurity Audit for AI-Built Apps. Fixed scope, clear report
GeekTech
AI Automation

How to Build an Internal Knowledge Assistant with AI

How to build an internal knowledge assistant with AI: start with one knowledge area, give every document an owner, cite sources and route open questions.

7 min read

GeekTech Engineering Team18 years building and securing software

To build an internal knowledge assistant with AI, start with one knowledge area, such as IT or HR policies, and the questions staff already ask about it. Give every document an owner, index only current versions, and have the assistant answer from retrieved passages with a link to each source. With no supporting passage, it should say so and route the question to the owning team.

The model is the easy part. Most failures come from the documents: an old travel policy nobody deleted, or a spreadsheet shared company-wide by accident. The assistant answers from whatever it can reach.

What an internal knowledge assistant does, step by step

Staff ask questions in a chat tool or on an intranet page. Each question runs through the same steps:

  1. Identify the user and the groups they belong to.
  2. Search an index of approved documents, filtered to what that user may open.
  3. Pass the most relevant passages to the model with the question.
  4. Generate an answer that cites the passages it used.
  5. Check that the answer has at least one citation, or replace it with a "not found" reply and a route to a person.
  6. Log the question, the retrieved documents, the answer and any feedback.

This is retrieval-augmented generation (RAG). RAG vs fine-tuning explains why retrieval fits here: policies change and answers need sources.

Start with one knowledge area and real questions

"Answer anything about the company" is a scope nobody can test. Pick one area with a clear owner, frequent repeat questions and existing documents, such as IT support or HR policies.

Then collect real questions from a few months of the IT channel, HR inbox or helpdesk, with personal details removed. Aim for 50 to 100, each paired with the document that holds the answer. That set becomes your test suite and shows gaps early: a common question with no written answer is a writing task for the owning team, and no model can fix it.

Give every document an owner before you index it

Indexing a shared drive as it stands copies every outdated draft. Build a small inventory first:

FieldExampleWhy it matters
SourceHR policies siteDefines what gets synced
OwnerHR operations teamWho fixes wrong answers
AudienceAll employees, or managers onlyDrives the permission filter
StatusCurrent, superseded or draftOnly current documents get indexed
Review dateEvery 6 monthsFlags content that may be stale
SupersedesTravel policy, previous versionStops old versions from answering

Record owners as roles or teams so they survive staff changes. Leave out drafts, personal folders and unowned documents.

Resolve conflicting documents before indexing them. The OWASP entry on vector and embedding weaknesses describes knowledge conflict errors when sources contradict each other. For example, if the handbook says 25 vacation days and the HR site says 28, the assistant will confidently pick one. Ask the owner which is right and retire the other.

How to build an internal knowledge assistant that cites its sources

Citations let staff check answers in seconds and let owners trace wrong answers to their documents. Build them in from the start:

  • Split documents along their structure, keeping each heading with its section, so a citation points to a meaningful passage.
  • Store the title, URL, section heading and last-updated date with every passage.
  • Show the cited passage and a link under each answer, with the document's date.

Anthropic's citations feature returns the exact passages behind each claim, and its documentation states that citations are guaranteed to contain valid pointers to the provided documents. A valid pointer proves the passage exists. It doesn't prove the passage supports the sentence next to it, so keep checking sampled answers against their sources.

Documents can carry instructions too. The first example scenario in the same OWASP entry is a resume with hidden white-on-white text telling the system to recommend the candidate. A wiki anyone can edit carries the same risk, so strip hidden text during extraction, mark document text clearly as context and keep the assistant read-only.

Decide what happens when there's no answer

An assistant that always answers will eventually invent an HR policy. Make "I couldn't find this in our documents" an expected response:

  • Instruct the model to answer only from the provided passages and to say when they don't contain the answer.
  • In code, reject any answer without a citation and replace it with the "not found" reply.
  • Attach a route to that reply: the IT ticket form, the HR inbox or the owning team's channel.
  • Log every unanswered question with its topic, and send each owner a weekly list.

That list tells each team which questions their documents don't answer, ranked by how often staff ask.

Keep the assistant away from decisions. It can explain the parental leave policy. Approving leave or granting an exception goes to a person.

An internal knowledge assistant makes oversharing visible. A salary spreadsheet shared company-wide years ago was hard to find. Once indexed, a plain question surfaces it.

Bought assistants work the same way. Microsoft's Copilot privacy documentation states that Copilot only surfaces organizational data to which individual users have at least view permissions, and points admins to the permission models in services such as SharePoint. That protects restricted files. It does nothing about files shared too widely.

Before launch, review sharing on every source you plan to index, looking for company-wide groups and "anyone with the link" shares. In a custom build, copy each document's permissions into the index and filter inside the search query. RAG access control explains how to enforce and test that.

Keep the index in sync with the sources

Schedule a sync job that:

  • Re-indexes changed documents, with a nightly full comparison as a backstop.
  • Removes deleted and superseded documents within hours.
  • Updates permissions when sharing changes, on the same schedule as content.
  • Flags documents past their review date and notifies the owner.
  • Alerts someone when a source fails to sync.

Test deletion: remove a test document at the source, wait one sync cycle and confirm the assistant can't quote it.

Common mistakes when rolling out a knowledge assistant

  • Indexing an entire drive or wiki on day one, archives and drafts included.
  • Launching without the test set, so nobody can tell whether a change improved answers.
  • Hiding sources to make answers look cleaner.
  • Treating every unanswered question as a model problem when the document doesn't exist.
  • Letting staff upload their own files into the shared index.

How to roll out and measure a knowledge assistant

  1. Run the test set. Check that each question retrieves the right document and that the answer matches it. Fix retrieval before tuning prompts.
  2. Pilot with one team. Start with the people who answer these questions today, such as the IT helpdesk, and have them flag wrong answers.
  3. Open it to staff with feedback. Add a thumbs-down button with a reason field to every answer.
  4. Review weekly. Read flagged answers, a random sample of the rest and the unanswered list.

Track these against a pre-launch baseline: repeat questions reaching the team's channel or inbox, the "not found" rate by topic and wrong answers confirmed by owners. Evaluating LLM output quality in production covers sampling and grading.

An internal knowledge assistant is item 18 in 20 AI automations SMBs deploy first. Our AI automation service builds internal knowledge assistants that answer from your own documents, with sources, and keeps them running as documents change.

Frequently asked questions

Should we use Microsoft Copilot or build our own assistant?

If your documents live in Microsoft 365 and permissions are in good shape, the built-in assistant is often the faster start. A custom build fits when knowledge sits in other systems, when you need control over which versions get indexed, or when unanswered questions must route into your own ticketing. Either way, clean up sharing first.

Can the assistant answer from Slack or Teams conversations?

It can, but chat history is a weak source. Messages are informal, often outdated and full of personal data, and decisions in threads are rarely marked final. When a chat answer proves useful, have the owner write it into a document.

Does an internal knowledge assistant need a vector database?

Not always. A small, stable document set can fit in the prompt, and keyword search may be enough for a pilot. Vector search helps when staff phrase questions differently from the documents, such as "working from abroad" against a policy titled "International remote work." Pairing it with keyword search keeps exact matches like policy numbers reliable.

Who should own the assistant after launch?

Split it. A technical owner runs sync, permissions and monitoring. Each knowledge area keeps a content owner who works through the unanswered list and fixes wrong documents. Without content owners, accuracy drops as documents age.

Insights

Related insights

More on AI Automation →
  • AI Automation

    How to Automate Recurring Reports with AI

    How to automate recurring reports with AI: compute every figure in code, let the model write only the commentary, check its claims and hold bad runs.

    7 min read

  • AI Automation

    How to Automate CRM Data Entry with AI

    How to automate CRM data entry with AI: extract updates from emails and calls, match the right record, limit which fields AI writes and log every change.

    7 min read

  • AI Automation

    How to Automate Support Ticket Triage with AI

    How to automate support ticket triage with AI: define categories, classify each ticket to a schema, route in code and measure reroutes before going live.

    6 min read

Get AI security and automation insights, monthly

AI security, automation and governance, written by engineers. No spam, unsubscribe any time.

Book a free 30-min call