CANIMAPSD I G I T A L
EN 4 languages ▾

How to test a Private AI answer source and user access rights

How to test a Private AI source, citation and access rights across roles, including denial, revoked permissions, cache isolation and audit evidence.

Published:

A practical Private AI test plan: ask one question under several user roles, prove the correct source, test denial, revoke access and preserve a repeatable protocol.

Testing a Private AI source and access rights is more than displaying a citation. The team must prove that the user was allowed to receive the exact chunk, that the passage supports the answer and that a forbidden role receives a safe refusal. A CANIMAPS DIGITAL implementation follows the agreed brief; this is a test method, not a promise of identical features, pricing or client outcomes.

Before testing, review preparing documents for a knowledge base, connect the results to Private AI pilot handover evidence and verify the Private AI service description.

A team tests one Private AI question across several user roles against a protected knowledge base.

1. Define the test question and expected source

The testable task in this section is to select one business question and record the approved document, exact section, permitted conclusion and prohibited assumption; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Define the test question and expected source”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: select one business question and record the approved document, exact section, permitted conclusion and prohibited assumption; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Define the test question and expected source”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

2. Create explicit user roles

The testable task in this section is to define at least a document owner, ordinary employee, restricted-department employee and external user with explicit permissions; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Create explicit user roles”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: define at least a document owner, ordinary employee, restricted-department employee and external user with explicit permissions; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Create explicit user roles”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

3. Assign classification and ownership to sources

The testable task in this section is to record classification, permitted roles, owner, effective date and next review for every document; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Assign classification and ownership to sources”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: record classification, permitted roles, owner, effective date and next review for every document; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Assign classification and ownership to sources”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

4. Retain permissions on every indexed chunk

The testable task in this section is to inherit classification and permitted roles on every chunk instead of relying only on the source folder; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Retain permissions on every indexed chunk”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: inherit classification and permitted roles on every chunk instead of relying only on the source folder; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Retain permissions on every indexed chunk”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

OWASP RAG guidance recommends access metadata on every chunk and permission checks at retrieval time. Source.

5. Enforce access before content reaches the model

The testable task in this section is to filter candidate chunks using the authenticated user rights before building any model context; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Enforce access before content reaches the model”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: filter candidate chunks using the authenticated user rights before building any model context; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Enforce access before content reaches the model”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

An analyst links a Private AI answer to the exact source passage, version and checksum.

6. Ask the same question under every role

The testable task in this section is to compare results in at least four roles while keeping the question, document version and model configuration constant; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Ask the same question under every role”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: compare results in at least four roles while keeping the question, document version and model configuration constant; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Ask the same question under every role”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

7. Verify that the citation supports the answer

The testable task in this section is to open the cited passage and confirm that it directly supports every material claim in the answer; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Verify that the citation supports the answer”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: open the cited passage and confirm that it directly supports every material claim in the answer; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Verify that the citation supports the answer”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

8. Record source version and checksum

The testable task in this section is to record document ID, version, approval date, chunk ID and checksum with the test result; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Record source version and checksum”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: record document ID, version, approval date, chunk ID and checksum with the test result; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Record source version and checksum”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

The NIST Generative AI Profile highlights provenance records that trace content origin and change history. Source.

9. Test the response when no suitable source exists

The testable task in this section is to require a clear refusal or insufficient-evidence statement instead of a guess from general model knowledge; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Test the response when no suitable source exists”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: require a clear refusal or insufficient-evidence statement instead of a guess from general model knowledge; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Test the response when no suitable source exists”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

10. Test revoked or changed access

The testable task in this section is to change the role or revoke access and prove that the next request returns neither content nor a stale cached answer; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Test revoked or changed access”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: change the role or revoke access and prove that the next request returns neither content nor a stale cached answer; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Test revoked or changed access”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

Two users with different permissions receive either an authorised answer or a safe denial.

11. Do not reveal the title of a forbidden source

The testable task in this section is to avoid mentioning the restricted document title, location, department or sensitive excerpt in the refusal; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Do not reveal the title of a forbidden source”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: avoid mentioning the restricted document title, location, department or sensitive excerpt in the refusal; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Do not reveal the title of a forbidden source”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

12. Test hidden instructions inside documents

The testable task in this section is to place a labelled prompt-injection string in a test document and prove retrieved text is treated as data rather than a command; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Test hidden instructions inside documents”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: place a labelled prompt-injection string in a test document and prove retrieved text is treated as data rather than a command; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Test hidden instructions inside documents”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

OWASP notes that RAG and fine-tuning do not fully remove prompt injection risk, so segregation, privilege control and adversarial tests remain necessary. Source.

13. Test cache isolation between users

The testable task in this section is to after an authorised answer, ask a similar question under another role and prove the first user response is not reused; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Test cache isolation between users”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: after an authorised answer, ask a similar question under another role and prove the first user response is not reused; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Test cache isolation between users”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

14. Create audit evidence without excess data

The testable task in this section is to retain user ID, role decision, source ID, model version, timestamp and outcome without logging full content by default; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Create audit evidence without excess data”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: retain user ID, role decision, source ID, model version, timestamp and outcome without logging full content by default; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Create audit evidence without excess data”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

15. Build a source and access test matrix

The testable task in this section is to record role, question, expected source, expected denial, observed result, evidence and decision for each case; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Build a source and access test matrix”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: record role, question, expected source, expected denial, observed result, evidence and decision for each case; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Build a source and access test matrix”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

A security lab blocks a hidden document instruction while preserving the approved source path.

16. Illustrative protocol with 24 questions

The testable task in this section is to use 24 questions, 4 roles, 6 sources and 5 deliberate failures in a labelled example, never as a client result; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Illustrative protocol with 24 questions”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: use 24 questions, 4 roles, 6 sources and 5 deliberate failures in a labelled example, never as a client result; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Illustrative protocol with 24 questions”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

17. Define human approval and escalation

The testable task in this section is to name who reviews a sensitive answer, approves the permission model and decides an incident or nonconformity; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Define human approval and escalation”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: name who reviews a sensitive answer, approves the permission model and decides an incident or nonconformity; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Define human approval and escalation”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

18. Repeat tests after every material change

The testable task in this section is to repeat the matrix after any document, permission, index, model, system-prompt, cache or connector change; express it as one test step with an input, explicit expected result, observable evidence and an accountable decision owner.

For “Repeat tests after every material change”, a successful demonstration is insufficient; include a negative case, forbidden role and failure state because they show whether the system actually respects the defined boundary.

When repeating the test, keep the same question, source version and technical configuration while changing only the condition under review: repeat the matrix after any document, permission, index, model, system-prompt, cache or connector change; this makes the result comparable without relying on memory or impression.

The process owner adds a review date and repair procedure to “Repeat tests after every material change”; when the result fails, do not expose the access path or answer to users until the issue is repaired and the test passes again.

Conclusion: a trustworthy answer is a verifiable access decision

A good test links the question, user role, exact source chunk, access decision and answer in one evidence chain. It does not guarantee error-free AI, but it makes the check repeatable, exposes drift and supports safe refusal when evidence or permission is missing.

Discuss Private AI

LET US START WITH YOUR NEEDS

Your next step
starts with a conversation.

Services of interest