Shiny RAG App - Shiny Contest Submission

Shiny RAG App

Authors: Joshua Hill, Tyler Knapp, Shelby Wentz

Abstract: To run this application from the terminal, enter "shiny run app.py" to start the server. The message "Uvicorn running on http://127.0.0.1:8000/" will display within the console. Click the link to open up the application in the browser. Once the application is loaded, a homepage will be displayed welcoming the user containing a collapsable side pannel, a drop down menu, and an output area near the center.

In the side pannel to the left, click "Browse" to upload your files or drag and drop them into the "Browse" area. Accepted file types are txt, doc, docx, pdf, xlsx, csv, and pptx. Select all or any number of uploaded files. Click "Process Selected Files" to initiate processing. This will extract content, chunk it, and add embeddings to FAISS index. Enter your OpenAI API key to use GPT-3.5-Turbo for summarization and answering questions. Select files and click "Summarize Selected Files" or "Submit Question." "Summarize Selected Files" will summarize the following content in a concise manner, capturing the main points and key information. "Submit Question" will answer the question based on the given context, report exact numbers or percentages if they are present in the context, and indicate if the context doesn't provide relevant information. Output will be displayed below in the format of question, answer, relevant files, and model used.

If a sensitive file with the keyword "admin" is processed, it will be saved in the sensitive_files.json and appear with the word SENSITIVE in red to denote sensitive data. To delete a file, select one or multiple files from the Uploaded files and click "Delete Selected Files." This will delete the file(s) from the FAISS vector database, FAISS index, and sensitive_files.json.

For usage instructions with the deployed application using Shiny, follow the previous instructions after the application is loaded.

Full Description: Shiny RAG App is a RAG (retrieval-augmented generation) application that leverages AI technologies and provides innovation by seamlessly summarizing, retrieving, and performing key concept extraction on various file types. This project was built to create a competitive advantage against industry peers, increase operational efficiency for the project management and research teams, and result in informed decision making across companies. It solves the problem of needing informed decision-making with AI-generated summaries and recommendations for fast retrieval, further reading, and related topics. Some things learned throughout this project were seeing the benefits of a low code UI layer like Shiny for seemlessly integrating AI models, Unstructured Serverless API effortlessly extracts and transforms complex data for use with every major vector database and LLM (Large Language Model) framework, understanding the importance of vector databases to store embeddings for easy retrieval, and LLMs can give vastly different contextual summaries and answers depending on the model, tokenization, and chunk-overlapping.


Shiny app: Shiny RAG App
Repo: GitHub - kobrakitty/shiny-rag-app: Shiny RAG app for the 2024 Shiny Contest

Thumbnail:
image

Full image: