Skip to main content
Architecture · Knowledge systems

Architecture for AI internal knowledge systems

Design permission-aware knowledge search with source citations, document freshness, safe retrieval and measurable answer quality.

Practical engineering guidance · Engineering leads, knowledge owners and IT teams planning an internal search or question-answering assistant.
Illustrative image of an architecture workshop with a system plan
Illustrative architecture workshop

At a glance

What you need to know.

An internal knowledge assistant helps employees find approved answers and their sources. This reference design separates ingestion, permission-aware retrieval and generation. Begin with a bounded collection of policies or runbooks, retain original documents, and make uncertainty visible when evidence does not answer the question.

How the system fits together.

A reference flow to adapt to your data, users and operating constraints.

  1. 01

    Connect approved sources

    Register each repository, document owner, access policy and supported update mechanism.

  2. 02

    Prepare documents

    Extract text and preserve headings, versions, source locations and permission metadata.

  3. 03

    Build retrieval indexes

    Store searchable passages with stable document identifiers and deletion tracking.

  4. 04

    Resolve user access

    Apply current identity, department and document permissions before returning passages.

  5. 05

    Compose an answer

    Use the permitted evidence, cite the supporting passages and flag missing information.

  6. 06

    Review and refresh

    Capture useful feedback, monitor stale sources and re-evaluate changed documents or models.

Make source ownership part of the data model

A passage needs more than text and an embedding. Store its document identifier, source URL, version, owner, classification and access attributes. Keep effective dates when a policy has them. The document store remains the evidence authority; a search index is a derived view that must support updates and removal. A deleted document should stop being available through both keyword and semantic retrieval.

For an illustrative onboarding assistant, approved IT setup instructions and published employee policies form separate collections. Draft policies stay outside the default search scope. A question about leave eligibility may retrieve the employee handbook, but an individual compensation record remains inaccessible. This distinction must survive indexing, caching, citations and document downloads, rather than depending on a polite instruction to the model.

Retrieve within the requester’s permissions

Resolve authorization in application code and constrain retrieval to documents the requester may read. Recheck access when serving a citation or opening a source. Include user or policy scope in cache design so a previously generated answer cannot cross a permission boundary. A document identifier that is difficult to guess does not replace an access check. Permission revocation needs a defined propagation and cache invalidation process.

Retrieved text can contain malicious instructions, even when it came from an internal repository. Treat it as evidence to inspect, not authority to change application rules. Keep the assistant read-only initially. If later connected to tools, each operation needs its own caller authorization and argument validation. Prompt formatting and injection filters can help, but the execution boundary must enforce the actual permissions.

Define what a useful answer must contain

Return the answer, supporting source references and an explicit limitation when evidence is incomplete or conflicting. Link to the exact document version where possible. A policy question should distinguish the documented rule from a suggested next step. When two approved documents disagree, show the conflict and route it to the knowledge owner instead of choosing whichever passage happened to rank first.

Compare keyword search, hybrid retrieval and retrieval-assisted generation against the same employee questions. Semantic search can find differently worded concepts, while keyword search is often useful for exact product names and error codes. Smaller passages may improve relevance but lose surrounding conditions. Larger passages preserve context at a higher processing cost. Select passage size and retrieval depth using answer evidence, rather than a universal setting.

Test quality, freshness and failure behavior

Build an evaluation set containing answerable questions, unavailable information, contradictory documents and cross-department access attempts. Review retrieval relevance separately from answer correctness and citation support. Agree acceptable response time, refresh delay and refusal behavior with the owners. Track failures by question category so an improvement on easy questions does not conceal poor handling of exceptions.

Exercise connector outages, revoked access, a failed index update and an unavailable model. Keep the last verified index only within the agreed freshness window; show a stale-source notice when appropriate. Offer ordinary document search when generation is unavailable. Record identifiers, versions and decision outcomes for diagnosis, while excluding unnecessary sensitive query content. Assign an owner to investigate bad answers and correct their underlying sources.

Before you start.

  • Identify authoritative sources and document owners.
  • Test permission changes across retrieval, cache and citations.
  • Evaluate unanswered and conflicting questions.
  • Define source refresh, deletion and incident recovery.

Common questions.

Can employees search every internal document?

Only documents they are authorized to read. Permission checks need to apply to retrieved passages, generated responses, cached results and the source links themselves.

How should the assistant handle a missing answer?

State that the permitted evidence is insufficient, show useful sources when available and offer an owner or support route. A plausible unsupported answer should not count as a successful response.

Continue with the right next step.

Technical references

Map this to your workflow.

Bring the users, existing systems, data boundaries and success criteria. We can discuss the scope and the engineering decisions that need evidence.

Discuss your requirement