Traditionally, sourcing relevant information from documents is laborious and often frustrating. This inefficiency not only affects productivity but also leads to the risk of missing critical information hidden within the document. The advent of chatbots in the conversational artificial intelligence (AI) domain has transformed this process. Using natural language processing (NLP) and machine learning (ML), chatbots analyze uploaded documents and provide summaries in response to specific questions.
The real value of chatbots lies in their ability to maintain context throughout a conversation. They remember previous interactions, allowing the user to revisit past discussions and find specific details as needed. This provides a fluid experience, offering effortless exploration of documents without compromising the stream of conversation.
Accenture demonstrated this process by using Amazon Q Business to implement a chatbot application. Amazon Q Business is AI-powered assistance that can answer questions, summarize content, generate content, and complete tasks securely based on the data in your business systems. It allows employees to be more creative, data-driven, efficient, prepared, and productive.
Accenture’s solution used an insurance provider case study, where Retrieval Augmented Generation (RAG) based Large Language Model (LLM) implementation was used to upload and compare policy documents efficiently. Policy documents were pre-processed and stored which allowed the system to retrieve relevant sections based on input queries.
This approach enhances the accuracy, transparency, and speed of policy comparison, ensuring that clients receive the best coverage options. The solution augments an Amazon Q Business application with persistent memory and context tracking throughout conversations, enabling better responses while recalling previous interactions, hence preserving the flow of conversation when navigating complicated inquiries. A custom Python class was also created for Amazon Q Business, streamlining the development workflow for this solution. The Python class maintains an internal state to persist conversation IDs for future interactions, providing a seamless user experience.
The solution developed a web application using Streamlit, Python, and AWS services, with a chat interface where users can interact with an AI assistant to ask questions or upload PDF documents for analysis. The application uses Amazon Q Business for conversation history management, knowledge base vectorising, context creation, and NLP.
A custom wrapper class for Amazon Q Business was used to keep the attachment and conversation history management as class variables, which simplifies and avoids repetitions in the middleware library code. AWS CodePipeline, a fully managed continuous delivery service is used to automate the build, test, and deploy phases of the software release process. For simplicity and because at the time the authors hadn’t experimented with IAM Identity Center on Amazon Q Business, they used Amazon Cognito user pools rather than AWS IAM Identity Center to authenticate users.
Post-deployment, a thorough clean-up plan was implemented to ensure efficient control of resources and minimize unnecessary costs. Regular review and adjustment of AWS services were also recommended to provide ongoing cost-effectiveness and operational efficiency.
This joint effort between Accenture and AWS can significantly help clients develop end-to-end conversational persistent chatbot applications at a large scale while also maintaining essential architectural practices and guidelines.