# Company answers, with sources

Varveta reference design | Applied AI

Mock design with fictional data. This is a proposed design, not a completed client implementation.

## The need

Useful answers sit across documents and operational records. Employees need a way to find them without exposing information outside their role.

## Proposed approach

Connect approved sources to a searchable knowledge index. Retrieve information using the employee’s permissions, then generate an answer linked to its sources.

## System flow

1. Keycloak: Employee sign-in
2. PostgreSQL + pgvector: Permission-filtered retrieval
3. Hugging Face: Grounded response
4. Employee workspace: Answer and source links

## Design decisions

### Check access before retrieval

Carry source permissions into the index and apply access filters before any text reaches the model

### Let people inspect the answer

Link claims to source passages so employees can check context and document freshness

### Make uncertainty useful

When evidence is missing or conflicting, ask for clarification or say that the answer is unavailable

## Checks before release

- Confirm a restricted document cannot appear in another role’s answer
- Remove a source permission and verify retrieval respects the change
- Ask an unsupported question and confirm the assistant does not invent an answer

## Handover to agree in scope

Source code and configuration, architecture notes, operating runbook, acceptance evidence, and knowledge-transfer sessions.

## Before quoting

Confirm source systems, data volumes, access requirements, hosting environment, acceptance criteria, ownership, and ongoing support.

Discuss this design: https://varveta.com/contact?service=production-ai-integration
