ProfessionalAI and RAGCloud and infrastructure

Secure RAG assistant for firm procedures and training

A chat assistant that answers staff questions from the firm's procedures and training material, streams answers as they generate, and hands off to a supervisor when it cannot answer.

Role
Sole engineer, from agent design and prompts to the front end and back end
Context
Lotane & Associates
Users
Collectors, attorneys, and staff
Staff chatReact
Token streamAppSync WebSockets
Bedrock Agentprompts · tools · grounding
FAQanswered first
Knowledge baseSOPs and training
Escalate toolsummarizes and notifies
escalation
Supervisor consolelive queue · answers can be added to the FAQ
Solid borders are automated steps. The dashed border marks the human-in-the-loop path.

Problem

Collectors, attorneys, and staff needed answers from the firm’s standard operating procedures, training material, and document storage. Finding the right passage, or the right person to ask, took time away from their work.

How it works

  • Grounded answers. Agents built on Amazon Bedrock Agents answer from Bedrock Knowledge Bases over the firm’s procedures and training material. I created the agents and wrote their prompts.
  • Streaming. The React front end sends each question to an AWS back end and receives the answer token by token over AWS AppSync WebSockets, so responses start appearing immediately.
  • Escalation as a tool. When a user needs a person, the agent calls an Escalate tool. It summarizes the conversation and the question, and notifies a supervisor in the app.
  • Supervisor console. A real-time page lists incoming escalations. Opening one shows the chat history, the summary, a suggested answer, and a reply box back to the user.

Human in the loop

Supervisors can add their answer to a shared FAQ. The agents can read every FAQ entry and try it first on later questions, so each escalation can improve the next answer without re-ingesting documents.

About this write-up

The assistant was built for my employer, so the code and data are private. This page describes the design at a high level and leaves out firm documents, client information, and security configuration.

Stack

  • Amazon Bedrock Agents
  • Bedrock Knowledge Bases
  • AWS AppSync
  • React
  • AWS serverless