# Dash-LangChain App Building Challenge

**URL:** <https://community.plotly.com/t/dash-langchain-app-building-challenge/79663>\
**Category:** Dash Python\
**Created:** [October 27, 2023, 6:56pm UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663 "2023-10-27T18:56:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [October 27, 2023, 6:56pm UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/1 "2023-10-27T18:56:29Z")

</div>

Hey Everyone,  
Starting today, we challenge the LLM builder community to develop large language models with [LangChain](https://python.langchain.com/docs/get_started/introduction) and create front-end app interfaces for them with [Dash](https://dash.plotly.com/).

The winning apps will be judged according to the following categories:

- Usefulness of App
- App UI/UX Design
- Use of LangChain LLMs in the Dash app

Please submit your app as a new post in this thread. Please include a link to the app, code on GitHub, and a short description of the app.

Submission deadline is the end of the year, December 31, 2023.

The winners will be announced in January 2024 and will receive a reward of:

🥇 $125

🥈 $75

🥉 $50

A few lucky app-challenge participants will get the chance to showcase their app to the world at the Plotly Community Webinar planned for the beginning of 2024.

For any questions, please email Adam at [adam@plotly.com](mailto:adam@plot.ly).

## App Ideas:

- App that summarizes an earnings report
- App that summarizes risks and opportunities in a financial report
- App that can answer questions about a document or a manual
- App that provides automated customer support
- App that allows users to engage in interactive storytelling

## App Examples:

Dash-LangChain minimal app example:

- **[App code](https://raw.githubusercontent.com/plotly/datasets/master/Blog/Dash-Langchain-app1.py)**

![](https://lh7-us.googleusercontent.com/6HWW9gMG9ytHmSQz9p5CYiF3sWrJ860q1j6wKh9Mos2AxFYzBb-M55LK3WN0W9jvJPDG1JZ559dDCz7bdtnUENC36PzStmkhHcM2jacMCKNf-nh2O27uiH7HmNj4qC87QhmhSW-i_ZzGNFmv2K_1dec)

Dash-LangChain earning report summary example:

- **[App code](https://raw.githubusercontent.com/plotly/datasets/master/Blog/Dash-Langchain-app2.py)**

**![](https://lh7-us.googleusercontent.com/1ZyzfKme0W23AEWm0Po-jU-4sRzYaOi03BYpOdsAZNxQU-AGs8lW-1Dm3VXmtAyiyqwX2xNySO4HRO7KJjPzcJc2fzYXo90YZTFRfuUw6gRP4x_ga0X_pNifrrFG3EYUZLxiO6y4YKxhSFVpco0MSIY)**

---

<div class="post-metadata">

**Author:** ![Obaude](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/obaude/32/31271_2.png) [@Obaude](https://community.plotly.com/u/Obaude)\
**Post date:** [December 30, 2023, 9:38pm UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/2 "2023-12-30T21:38:39Z")

</div>

Subject: Dash-Langchain App Building Challenge Submission

Hello Plotly Community,

I’m thrilled to submit my entry for the Dash-Langchain App Building Challenge. Introducing my creation, the Financial Report Summarizer!

🚀 \*\ ***App Overview:** \*\*  
Explore financial insights, summarize earnings reports, and gain actionable information with my interactive Dash app. Leveraging the power of LangChain’s language models, this application provides a seamless experience for users to analyze financial data.

🌐 \*\ ***Try it Live:** \*\*  
Experience the app interface at [Langchain Financial App develop with plotly and dash](https://langchain-app-h152.onrender.com/).

📁 \*\ ***GitHub Repository:** \*\*  
Dive into the code on [GitHub](https://github.com/OBAUDE95/Plotly-and-Dash-Langchain-Competition-by-Obaude-Ayodeji).

🔍 \*\ ***Features:** \*\*

- Earnings report summarization
- Identification of risks and opportunities
- Interactive querying for deeper insights

🎥 Demonstration video

[![](https://i.vimeocdn.com/video/1775859712-339de8bfc4db09dcc9c8d541fef5eda913a64b644d3712a7c6bcc1c2febb0ad5-d?f=webp "PLOTLY AND DASH COMPETITION Langchain demonstration app") ](https://vimeo.com/898805940)

🙌 \*\ ***Acknowledgments:** \*\*  
A special thanks to the Plotly community for this opportunity. Your feedback is invaluable.

🌟 \*\ ***Join the Journey:** \*\*  
Feel free to explore, contribute, and share your thoughts. I’m eager to showcase the fusion of LangChain and Dash for financial analysis.

Thank you for considering my submission. Looking forward to the results!

Best regards,  
Obaude Ayodeji Michael

---

<div class="post-metadata">

**Author:** ![manguilar22](https://avatars.discourse-cdn.com/v4/letter/m/ecb155/32.png) [@manguilar22](https://community.plotly.com/u/manguilar22)\
**Post date:** [December 31, 2023, 12:02am UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/3 "2023-12-31T00:02:02Z")

</div>

Hello, Plotly community

**Introduction** :

Participating in the building challenge I wanted to explore LLMs in the Dash app. I developed a conversational agent utilizing Chat-GPT to automate responses on biological data. The application leverages data from [UniProt.org](http://UniProt.org), a comprehensive knowledge base for proteins and genes. To enrich responses, the gene and protein data undergo a conversion into text embeddings, serving as context for the model when responding.

More info on [Github](https://github.com/manguilar22/langchain-dash-app).

Key Features:

- Retrieval-augmented generation.
- Interactive storytelling.
- Answer questions based on the documents retrieved.

**App Overview** :

The application provides an interactive platform for processing biological data from UniProt, facilitating the formulation of assumptions and dispelling uncertainties. The model can summarize comments, offer insight into gene sequences, and provide identifiers for each gene and protein in external databases.

**Video Demo** : [Screencast from 12-28-2023 01:50:09 PM.webm - Google Drive](https://drive.google.com/file/d/1gGtB-i9iP47BBN31JKfrUUVH7BorFKPy/view?usp=sharing)

**Live Demo** :  
[http://ec2-52-90-222-83.compute-1.amazonaws.com](http://ec2-52-90-222-83.compute-1.amazonaws.com)

---

<div class="post-metadata">

**Author:** ![tieandrews](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tieandrews](https://community.plotly.com/u/tieandrews)\
**Post date:** [December 31, 2023, 4:45am UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/4 "2023-12-31T04:45:57Z")

</div>

# Introducing DashGPT

Having learned alot from these forums and really wanting a proper chat interface in Dash I’m happy to share and introduce **DashGPT, a full-featured LLM chat interface template with optimized UI/UX, RAG support and text streaming.**

Key functionality:  
✨ Retrieval-augmented generation  
💁 User feedback functionality  
⚙ Custom user settings and user guides  
📡 Text streaming functionality  
📱 Optimized for mobile and desktop

Here’s a brief demo:  
 ![dashgpt-demo_v1](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/7/2/72d6ac6ce5da1aa91222f0c0ba7fb9b075cd938c.gif)

# 🔗 Live Demo

A live demo is available here to try: [https://dashgpt.live](https://dashgpt.live)

# 📁 Repo & Code

The source code can be found here: [GitHub - tieandrews/dashGPT: A high quality chat interface built entirely with Plotly Dash incorporating functionality for RAG, feedback and more.](https://github.com/tieandrews/dashGPT)

I used LangChain for document retrieval and to get a smooth UX for telling users what’s happening behind the scenes had to write some custom logic.

# Acknowledgements

Big thanks to the Plotly team and previous challenge submissions which I’ve learned a lot from!

# Please Star/Follow!

If you like this app, want to adapt it for your use case, or collaborate on improving it, please give it a star or reach out and we can continue to make great projects!

Cheers,  
Ty  
Find me on Linkedin: [[https://www.linkedin.com/in/ty-andrews/](https://www.linkedin.com/in/ty-andrews/)]([https://www.linkedin.com/in/ty-andrews/](https://www.linkedin.com/in/ty-andrews/)]

---

<div class="post-metadata">

**Author:** ![AIMPED](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/aimped/32/21758_2.png) [@AIMPED](https://community.plotly.com/u/AIMPED)\
**Post date:** [December 31, 2023, 12:47pm UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/5 "2023-12-31T12:47:29Z")

</div>

Nice app @tieandrews, I was planning to do something similar.

I tried yours out and it seemed to have problems to “forget” the first query. I used one of the preset questions- tell a joke about something. Later on I used another query not related to jokes but creating python code and your app told me jokes about python 🤣

---

<div class="post-metadata">

**Author:** ![tieandrews](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tieandrews](https://community.plotly.com/u/tieandrews)\
**Post date:** [December 31, 2023, 5:46pm UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/6 "2023-12-31T17:46:11Z")

</div>

Thanks @AIMPED, yeah I set it up to only remember one previous message to keep my open ai costs down on the demo site 😬.

The system prompt says to try and tell a joke given the question and uses the retrieved Reddit Jokes in the context to answer, so not terribly surprising it told you a python joke! 😅

---

<div class="post-metadata">

**Author:** ![amazing\_gosha](https://avatars.discourse-cdn.com/v4/letter/a/0ea827/32.png) [@amazing\_gosha](https://community.plotly.com/u/amazing_gosha)\
**Post date:** [December 31, 2023, 5:58pm UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/7 "2023-12-31T17:58:56Z")

</div>

Hi Everyone! And Happy New Year! 🎄

**Introduction**

I developed my project, _Document Assistant_ , with the hope of being able to create and safely use AI/ML applications based on customers’ private sensitive data. Additionally, it can serve as a useful tool for novice AI/ML enthusiasts like myself and students to create and utilize _RAG_.

**APP - Framework Overview**  
The `Document Assistant` project is a RAG (Retrieval-Augmented Generation) end-to-end framework designed to merge private vector stores with unstructured documents and LLMs, facilitating a locally runnable _D.O.T._ (Document Of Things) - Chat/QA application. It utilizes _LangChain_, _ChromaDB_, and _PyTorch_, and is compatible with multiple document formats.

The application’s setup involves creating a vector store and transforming documents into textual splits. The project’s core is its ability to create a private, customized database for enhanced retrieval and generation tasks, demonstrating a significant advancement in leveraging LLMs for personalized and efficient data handling​.

🔗 More information can be found in my [GitHub project](https://github.com/gosha70/document-assistant) .  
🥳 You are welcome to use or contribute to it.

**Demo**

1. 🔗[Creating Vector Store](https://drive.google.com/file/d/19xbVvnTvkTTV4lZ3rcFIe08WJn3hMLbG)
2. 🔗[D.O.T. as Q/A about Quantum Computing](https://drive.google.com/file/d/1OxAUQoNFPsGm9yvhaencaYZCxuqhlcL6)

Regards,  
– _George_ [[LinkedIn](https://www.linkedin.com/in/george-ivan-b50aab88/)]

 ![Screenshot 2023-12-31 at 1.10.37 PM](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/0/6/0666a46aadcc7ccc661b167053e8343e2ab6d1ab.png)

---

<div class="post-metadata">

**Author:** ![TroyScribner](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@TroyScribner](https://community.plotly.com/u/TroyScribner)\
**Post date:** [January 1, 2024, 3:00am UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/8 "2024-01-01T03:00:19Z")

</div>

**StockSavvy**

Happy New Year everyone! I wanted to share a dash app that I developed for this competition I’m calling StockSavvy. This app showcases Dash integrated with LangChain in order to provide users with an AI agent that can read recent news stories about stocks in the S&P500, summarize the news and answer questions about it. It uses the LangChain conversational retrieval agent, so the agent will remember the previous elements of the conversation, which allows you to ask follow up questions.

 ![StockSavvy](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/3/d/3df46f0fc0a66dc7f843fcceb6c85a7c0689eeb1.jpeg)

**Demo**  
You can test the live demo here:  
[http://34.207.77.108:8050/market](http://34.207.77.108:8050/market)

This app does require an OpenAI API key as well as an AlphaVantage API Key in order to download market news through. You can get a free API key here: [Customer Support | Alpha Vantage](https://www.alphavantage.co/support/#api-key)

**Features**  
The main feature is the conversational agent that answers questions about stock market news. The page also lists up to 50 news stories that are organized in a dash-ag-grid table for easy search. There is a polar graph that shows the relative strength of different financial metrics (price to earnings, debt to equity, etc) for each stock relative to the other stocks in the S&P500, as well as a chart of the stock price over the past 2 years.

**Github Code**  
The source code can be found here:

> **[GitHub - troyscribner/stocknews: Stocknews integrates Dash and LangChain to...](https://github.com/troyscribner/stocknews)**
>
> Stocknews integrates Dash and LangChain to create an interactive dashboard for querying LLM models about stock market events. - GitHub - troyscribner/stocknews: Stocknews integrates Dash and LangC...

**Acknowledgements**  
Appreciate the Plotly team for the fantastic tools and the community for the opportunity to learn.

Troy Scribner

---

<div class="post-metadata">

**Author:** ![vic.zommers](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/vic.zommers/32/26317_2.png) [@vic.zommers](https://community.plotly.com/u/vic.zommers)\
**Post date:** [January 1, 2024, 7:22pm UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/9 "2024-01-01T19:22:16Z")

</div>

A bit late to the party 🎉  
RAG-LLM using Chroma.  
Discover what top institutions **really think** about current economic conditions (price inflation, unemployment, interest rates). Plotly Dash App is built to extract main highlights and query latest central banking publications/pdfs from Fed, ECB, Bank of England…

Download here: [**GitHub Link**](https://github.com/viczommers/CentralBank-LLM/tree/main)  
and here is the Tutorial!  
**Part 1:**  
 ![Part1](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/1/d/1d77d79c0267d639b3bb5de31355e3d0516e925b.gif)

**Part 2:**  
 ![Part2](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/c/2/c2f28cb14b243a6f566a01e667a5f1a0b89a5055.gif)

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [January 2, 2024, 3:21pm UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/10 "2024-01-02T15:21:26Z")

</div>

Thank you everyone for your app submissions. These apps are incredible and they are a testament of how much one can do when combining Langchain with Dash ⭐

We will review all apps and post the results in a couple of weeks.

---

<div class="post-metadata">

**Author:** ![adamschroeder](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/adamschroeder/32/17280_2.png) [@adamschroeder](https://community.plotly.com/u/adamschroeder)\
**Post date:** [January 17, 2024, 7:33pm UTC](https://community.plotly.com/t/dash-langchain-app-building-challenge/79663/11 "2024-01-17T19:33:16Z")

</div>

Thank you everyone for participating in the Dash-Langchain App Building Challenge. The apps that were submitted by the community went far and beyond our expectations! Absolutely amazing.

Over the last couple of weeks, a group of Plotly staff judges had the pleasure of reviewing each app and voted for the top three app winners. And the winners are…🥁

🥇 StockSavvy [Dash App](http://34.207.77.108:8050/market), created by [Troy](https://community.plotly.com/u/troyscribner/summary), with the following [code](https://github.com/troyscribner/stocknews).

This app combines LangChain LLMs with Dash AG Grid and the Plotly Polar Bar chart in flawless fashion.

Using your [openAI API key](https://platform.openai.com/account/api-keys) and a free [Alphavantage API key](https://www.alphavantage.co/support/#api-key), you can choose a stock ticker and get the latest news stories relevant to that stock. Then, you can access the conversational agent that answers questions about the stock market news.

The Polar Bar chart shows the relative strength of different financial metrics (price to earnings, debt to equity, etc) for each stock, relative to the other stocks in the S&P 500.

This app is a great tool for a quick visual stock analysis.

![](https://lh7-us.googleusercontent.com/_tf4qE2ovnk293U4P0LGqqOngKRBU6lQJHCLqHf8Wi41jq1k5H8RM2QQobXgM5EyO9Gf711KdD01yA8lWu3zrjOR5CGewhwEnmt5o-pyudW-FF9BT0pTQlJw_a3Qd5G4niF1NjoJJLjL9_zsqhg4uko)

🥈 CentralBank-LLM Dash App, created by [Vic](https://community.plotly.com/u/vic.zommers/summary), with the following [code](https://github.com/viczommers/CentralBank-LLM/tree/main).

An impressive app, indeed! We loved the user interface and the clear description of steps needed for exploring the three currencies.

Using your [openAI API key](https://platform.openai.com/account/api-keys), you simply need to select a currency, let the latest reports download and process into a vectorized database; then, ask your question.

Once you get an answer to your prompt, the model tells you where in the documents it found the information to put together your answer.

The graphs at the bottom part of the app is a sweet addition so you’re not just reading text but can quickly visualize currency trends over time.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/6/1/619ad5f7bfbfda203d842ec9445ffa466a6aa9e8.png)

🥉 Document Assistant Dash App, created by [George](https://community.plotly.com/u/amazing_gosha/summary), with the following [code](https://github.com/gosha70/document-assistant).

This app combines technical innovation with practical business applications. It is locally runnable and uses private data as well, which means it can be customized according to users’ needs.

The app is a RAG (Retrieval-Augmented Generation) end-to-end framework designed to merge private vector stores with unstructured documents and LLMs, facilitating a locally runnable D.O.T. (Document Of Things) - Chat/QA application.

Simply git-clone the repository, install the libraries from the requirements.txt file, and follow the [Quick Start guide](https://github.com/gosha70/document-assistant?tab=readme-ov-file#quick-sstart-guide) to run the app on your computer.

![](https://lh7-us.googleusercontent.com/uF0-2L0XiwETCncPUidIB_GH1ZgLCcnTvlP6M_TNaI8gsOlrIMvpYXlEcaBRxBli68mIm-b-EJWN25Bc5ePpTBG4bFhWbckWSAlylUZM4I84nOQWwkk8QQ29Zt80FtPu5qt35m1XKt0Z_C2mlYWnNvs)

A big thank-you and a shout-out to all the other community members and the apps that they submitted to the challenge:

- [Financial report summarizer app](https://customer-churn-dashboard.onrender.com/) by [Obaude](https://community.plotly.com/u/Obaude/summary)
- [UniProt Conversational Agent](http://ec2-52-90-222-83.compute-1.amazonaws.com/) by [Manuel](https://community.plotly.com/u/manguilar22/summary)
- [DashGPT](https://dashgpt.live/) by [Ty](https://community.plotly.com/u/tieandrews/summary)

[Join us on January 30](https://go.plotly.com/dash-langchain) to see the apps submitted to this challenge in action. This is a great opportunity to see how much is possible when combining Dash with LangChain as well as learn from the Dash app creators themselves.
