KatInterview

Building a Policy-Driven Support Assistant with RAG

Machine LearningModel answer
MediumModel answerMachine Learningragnlpml-systems

Last updated

Design an ML system that transforms company policy documents into actionable support workflows with evidence tracking and version control.

You're building an AI assistant that helps support teams handle customer inquiries. The system ingests internal policy documentation and generates concrete action sequences that agents can follow when resolving cases.

Requirements

Your system should produce evidence-backed workflows for human agents, not execute automated changes to customer accounts. Policy documents evolve over time with different effective dates and may contain conditional logic (region-specific rules, account-tier restrictions, role-based access). Generated workflows must faithfully represent what policies actually permit—no fabricated exceptions or shortcuts.

Address the full lifecycle: how policies are stored and retrieved, how evidence becomes actionable steps, and how you validate correctness and diagnose failures.

Areas to Address

Policy Storage and Retrieval
How do you organize policy content to support effective retrieval? Consider versioning, metadata tracking, access restrictions, and preserving logical dependencies between policy sections. Your retrieval strategy should surface not just topically similar content but also prerequisites, exceptions, and edge-case rules.

Workflow Generation
How does retrieved policy content transform into an ordered sequence of actions? Address applicability checks (when does a rule apply?), required customer information, conditional branching, evidence citations, and explicit handoff when policies don't cover a scenario.

Validation and Debugging
How do you measure whether generated workflows are correct? Design test strategies for retrieval quality and procedural accuracy. Explain how a support manager would debug a workflow that gave incorrect guidance, tracing back through retrieval results and model decisions.

Questions You Might Ask

  • What categories of support requests should the system handle?
  • How are policy conflicts resolved when multiple documents apply?
  • Should the system prompt for missing information before generating steps?
  • What happens when policies are unclear, outdated, or contradictory?

Hints

Hint 1

Think about how to preserve conditional logic and ordering constraints when chunking policy documents for retrieval

Hint 2

Consider what metadata enables filtering policies by effective date, geography, or customer segment before retrieval

Hint 3

Design explicit representations for 'policy doesn't cover this' versus 'insufficient information to apply policy'