Skip to content
WorkflowAdvancedDocument Automation

Knowledge Base Answer with Source Links

Answer internal questions from approved documents, with citations and an explicit fallback when the answer is not covered.

AIAI Skills Hub ResearchResearch team Published Apr 21, 2026Updated May 7, 2026 Reviewed May 7, 2026

The problem

Staff ask the same questions repeatedly, and generic chatbots answer from model memory instead of company policy.

Documents are chunked and indexed. A retrieval step finds relevant passages, the model answers only from those passages, and the response includes links and a confidence signal.

Retrieval is a search problem first

Most disappointing internal chatbots have a retrieval problem, not a prompt problem. If the right passage is not retrieved, no prompt can reliably recover it. Start by measuring retrieval quality on a set of real questions.

Answer only from approved sources

The model should be allowed to say "I could not find this in the approved documents." That sentence is a feature. It routes the question to a person and protects the organisation from confident invention.

Tools and access

Tools

A vector store or search indexAn AI APIAn internal documentation sourceA chat interface

Credentials

  • • AI provider API key
  • • Search or vector database credentials

Requirements

  • Approved documents with owners
  • A document update process
  • An escalation path for unanswered questions

Build steps

Follow in order and test each step before connecting the next one.

  1. 1

    Inventory approved documents

    List documents, owners, versions and review dates. Exclude drafts and retired policies.

  2. 2

    Chunk with context

    Split by heading and keep the document title, version and section in each chunk.

  3. 3

    Build a test question set

    Collect 30 real questions with the correct source section. Measure whether retrieval finds it.

  4. 4

    Answer with citations

    Pass only retrieved passages and require a link or document reference for every answer.

  5. 5

    Add fallback and feedback

    Offer a contact route when confidence is low, and log every unanswered question for content improvement.

Test it before trusting it

Test input

What is the expense limit for client dinners, and who approves an exception?

Expected output

An answer quoting the policy section and limit, a link to the policy, and an instruction to contact the finance owner for exceptions if the policy does not specify one.

Troubleshooting

The bot answers from general knowledge

Instruct it to use only retrieved passages and to say "not found in the approved documents" otherwise.

Retrieved passages are outdated

Index document version and review date; filter out superseded versions and re-index on change.

Conflicting policies are returned

Rank by document owner and effective date, and show both with a warning when they conflict.

Maintenance

Re-index weekly and on document change. Review unanswered questions monthly. Remove retired documents from the index immediately.

Related resources