Productionize LLM RAG App in Django — Part I: Celery | by Wen Yang | Apr, 2024

Automate Pinecone Daily Upsert Task with Celery and Slack monitoring

Wen Yang
Towards Data Science
Image credit: Outside Inc

It’s been a while since my last LLM post and I’m excited to share that my prototype has been successfully productionized as Outside’s first LLM-powered chatbot, Scout. If you are an Outside+ member, you can check it out over at https://scout.outsideonline.com/.

This journey began as my weekend curiosity project back in March 2023. I had the idea to build a Q&A chatbot using OpenAI’s LLMs and Outside’s content as a knowledge base. Later I shared my prototype at our internal product demo day and I was thrilled by the interest it managed to spark. Scout quickly became an official project. On November 28th 2023, we launched Scout to limited Outside+ members. Fast forward to today, April 12th, 2024, over 28.3k unique users have already utilized this Outdoor Companion AI tool.

I couldn’t be more grateful for this moonstruck experience and I’ve been planning to write a mini-series to share some behind-the-scenes insights into what it takes to bring LLM & RAG powered apps to life. So far I’ve planned to cover the following three parts:

  • ???? Part 1: Automate Pinecone Daily Upserts with Celery and Slack monitoring
  • ???? Part 2: Building an LLM Websocket API in Django with Postman Testing
  • ???? Part 3: Monitoring LLM Apps with Datadog: synthetic tests, OpenAI, and Pinecone usage tracking

This post will dive into Part 1, setting up scheduled tasks with Celery Beat to automatically upsert embeddings into the Pinecone vector database. And we’ll set up slack updates for easy monitoring. Let’s get started!

LLMs typically have training data cut off date, the current gpt-4-turbo was cut off at 2023-Dec (to my writing day -2024-April). The promise of using RAG is that we can equip LLMs with more fresh and domain specific data to reduce hallucinations and improve user experience. Thus the question: how can we keep the knowledge base fresh and up to date? The answer is — using Celery and Celery Beat to schedule a periodical task (daily or weekly) to embed newly published…

Source link

Technology

gaitQ and machineMD secure million dollar research grant to monitor Parkinson’s development in UK and Switzerland

Oxford-based medical technology start-up gaitQ and Swiss medical device company machineMD have announced the joint award of a million dollar research grant from Innovate UK and Innosuisse to enable the collection and analysis of critical movement data from people with Parkinson’s (PwP). The grant will fund an 18-month research project that will record movement data […]

Read More
Technology

Take-Two plans to lay off 5 percent of its employees by the end of 2024

Take-Two Interactive plans to lay off 5 percent of its workforce, or about 600 employees, by the end of the year, as reported in an SEC filing Tuesday. The studio is also canceling several in-development projects. These moves are expected to cost $160 million to $200 million to implement, and should result in $165 million […]

Read More
Technology

10 tips to avoid planting AI timebombs in your organization

At the recent HIMSS Global Health Conference & Exhibition in Orlando, I delivered a talk focused on protecting against some of the pitfalls of artificial intelligence in healthcare. The objective was to encourage healthcare professionals to think deeply about the realities of AI transformation, while providing them with real-world examples of how to proceed safely […]

Read More